From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard G Riley Newsgroups: gmane.emacs.help Subject: interactive function calls Date: Mon, 09 Jun 2008 11:43:13 +0200 Organization: A noiseless patient Spider Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1213008058 19207 80.91.229.12 (9 Jun 2008 10:40:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Jun 2008 10:40:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 09 12:41:41 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K5eof-0002Rv-Hw for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Jun 2008 12:41:33 +0200 Original-Received: from localhost ([127.0.0.1]:60698 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K5ens-00009U-Bn for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Jun 2008 06:40:44 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!news.glorb.com!feeder.erje.net!news.motzarella.org!motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-X-Trace: feeder.motzarella.org U2FsdGVkX18q6ITuIvrm/igsxFS46wEhh6nqz/t1CjKCcIHfitNCB0fN1ZlJ23gTC0dNRSq7wziYK2QiFDKPGiTVfD3pPfenoH/grLMXu41d0WfNU+Lj0CqgaVuKtMw/Opp+yiF4mSejCaC3suYOnw== Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Mon, 9 Jun 2008 09:43:17 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1+4IXZPyNSBIMHGhgDrkIf4rgQk9ojdx6nPIfOkmheyxw== Cancel-Lock: sha1:dMW3FuwQlp6ryp/01rR4+h2HGJ0= User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:159277 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54636 Archived-At: 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?