all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard G Riley <rileyrgdev@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: interactive function calls
Date: Mon, 09 Jun 2008 11:43:13 +0200	[thread overview]
Message-ID: <g2itvl$jad$1@registered.motzarella.org> (raw)


I have this in my .emacs

(define-key mode-specific-map [?F] 'fortune-from-region)

The problem is that in the code for fortune-append we see something
like:

,----
|     (unless interactive
|       (save-buffer)
|       (if fortune-always-compile
| 	  (fortune-compile file)))))
| 
`----

Following a chat on #emacs on irc, I tried creating my own rgrfortune
function which was then called from the key binding and then I was told
it would call 'fortune-from-region "non interactively" - but this did not
work e.g

,----
| (defun rgrfortune()
|   (fortune-from-region (region-beginning) (region-end) fortune-file))
| 
| (define-key mode-specific-map [?F] (lambda()(interactive)(rgrfortune)))
`----

The reason I want it called "non interactive" is simply that thats
the way to save and compile the fortune file as the fortune-append
snippet above shows.

How to do it?





             reply	other threads:[~2008-06-09  9:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-09  9:43 Richard G Riley [this message]
2008-06-09 16:46 ` interactive function calls Nikolaj Schumacher
     [not found] ` <mailman.12949.1213029992.18990.help-gnu-emacs@gnu.org>
2008-06-09 18:53   ` Richard G Riley

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

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

  git send-email \
    --in-reply-to='g2itvl$jad$1@registered.motzarella.org' \
    --to=rileyrgdev@gmail.com \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.