help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing buffer mode


From: tomas
Subject: Re: Changing buffer mode
Date: Thu, 21 Jul 2022 21:02:00 +0200

On Thu, Jul 21, 2022 at 03:41:13PM -0300, Eduardo Ochs wrote:
> On Thu, 21 Jul 2022 at 12:56, carlmarcos--- via Users list for the GNU
> Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> > Have started with the following but with few ideas of how to supply 
> > appropriate value to buffer.
> >
> > (defun mode-sweep (mode)
> >   "Cycle the buffer through three major modes (text, org, normal)."
> >
> >   (interactive
> >    (list
> >     (let ( (cseq '("org-mode" "text-mode" "normal-mode")) )
> >       (completing-read "Major-mode: " cseq nil t "normal-mode"))))
> >
> >   (with-current-buffer buffer
> >    (funcall (intern mode))) )
> 
> Is cseq an existing function? Where can I find it?

No, in the above code it is a variable just being declared in
the `let'.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]