unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: daniela-spit@gmx.it
To: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Keybinding that cycles call to a function
Date: Fri, 27 Nov 2020 02:00:41 +0100	[thread overview]
Message-ID: <trinity-d7d93dff-5c3d-416e-87cc-f405fd444da2-1606438841162@3c-app-mailcom-bs06> (raw)

If I have a function that takes a number.  How can a make a
keybinding that cycles through the values n  = 0, 1, 2?

(defun fn (n)
   (interactive "n Enter Value: ")
   body-of-func)



             reply	other threads:[~2020-11-27  1:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27  1:00 daniela-spit [this message]
2020-11-27 20:47 ` Keybinding that cycles call to a function Michael Heerdegen

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=trinity-d7d93dff-5c3d-416e-87cc-f405fd444da2-1606438841162@3c-app-mailcom-bs06 \
    --to=daniela-spit@gmx.it \
    --cc=help-gnu-emacs@gnu.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).