[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: define-key and functions
From: |
François Fleuret |
Subject: |
Re: define-key and functions |
Date: |
06 Dec 2003 20:06:17 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
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