unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eduardo Ochs <eduardoochs@gmail.com>
To: carlmarcos@tutanota.com
Cc: Emanuel Berg <incal@dataswamp.org>,
	help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Changing buffer mode
Date: Thu, 21 Jul 2022 15:41:13 -0300	[thread overview]
Message-ID: <CADs++6j95RyfpnxsTbv9Y0NW84HqAgEQUcsuu_-wpZ7CcQxJaw@mail.gmail.com> (raw)
In-Reply-To: <N7WT3at--3-2@tutanota.com>

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?
I have my own function to cycle between major modes, but it is ugly,
and I would like to rewrite it using something like cseq...
  [[]], Edrx
    http://angg.twu.net/#eev



  reply	other threads:[~2022-07-21 18:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20  3:55 Changing buffer mode carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-20 15:50 ` Emanuel Berg
2022-07-21 14:39   ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-21 14:50     ` Emanuel Berg
2022-07-21 15:55       ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-21 18:41         ` Eduardo Ochs [this message]
2022-07-21 19:02           ` tomas
2022-07-22  0:21         ` Emanuel Berg
2022-07-22  3:22           ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-22  4:00           ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-22  4:13             ` Emanuel Berg
2022-07-22 18:11               ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-22 18:21                 ` Emanuel Berg
2022-07-22 18:36                   ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-21 16:52   ` Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADs++6j95RyfpnxsTbv9Y0NW84HqAgEQUcsuu_-wpZ7CcQxJaw@mail.gmail.com \
    --to=eduardoochs@gmail.com \
    --cc=carlmarcos@tutanota.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=incal@dataswamp.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).