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 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'.