From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: =?iso-8859-1?q?Fran=E7ois_Fleuret?= Newsgroups: gmane.emacs.help Subject: Re: define-key and functions Date: 06 Dec 2003 20:06:17 +0100 Organization: I.N.R.I.A Rocquencourt Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1070739098 24787 80.91.224.253 (6 Dec 2003 19:31:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Dec 2003 19:31:38 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 06 20:31:35 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ASi9P-0000yK-00 for ; Sat, 06 Dec 2003 20:31:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ASj58-0006Mj-Nk for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Dec 2003 15:31:14 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!newsfeed.stueberl.de!news.cs.univ-paris8.fr!jussieu.fr!univ-angers.fr!news.univ-rennes1.fr!irisa.fr!news-rocq.inria.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 Original-NNTP-Posting-Host: wasabi.inria.fr Original-X-Trace: news-rocq.inria.fr 1070737577 4639 128.93.23.201 (6 Dec 2003 19:06:17 GMT) Original-X-Complaints-To: usenet@inria.fr Original-NNTP-Posting-Date: Sat, 6 Dec 2003 19:06:17 +0000 (UTC) X-Attribution: FF X-Url: http://www-rocq.inria.fr/~fleuret User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Xref: shelby.stanford.edu gnu.emacs.help:119067 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15007 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15007 Hi, Bill Rising wrote on 06 Dec 2003 18:49:11 MET: > Is there a way to use a function which takes arguments in define-key? At least you can do something like (defun an-example (universal) (interactive "P") (if universal (message "with ctrl-u") (message "without ctrl-u"))) (define-key global-map [(control x) (control x)] 'an-example) With that C-x C-x writes "without ctrl-u" and C-u C-x C-x writes "with ctrl-u". C-h f interactive for more fancy usages of the universal argument. Regards, -- François Fleuret