unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to detect C-u supplied arguments from other prefix arguments
@ 2007-08-07 21:46 Dieter Wilhelm
  2007-08-08  5:06 ` Kevin Rodgers
       [not found] ` <mailman.4513.1186549602.32220.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Dieter Wilhelm @ 2007-08-07 21:46 UTC (permalink / raw)
  To: help-gnu-emacs

Hi

I'd like to detect whether prefix arguments of a command are supplied
by C-u or otherwise.

My idea is to use this-command-keys and compare it to some string,
like the following pseudo code:

(defun bla (arg)
  (interactive "p")
  (when (string= "C-u" (substring (this-command-keys) 0 2))
    (message "hurray")))

I just don't understand how to compare key sequences.  Or maybe
there's better way of doing it?

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <mailman.4504.1186523154.32220.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2007-08-09 20:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-07 21:46 How to detect C-u supplied arguments from other prefix arguments Dieter Wilhelm
2007-08-08  5:06 ` Kevin Rodgers
     [not found] ` <mailman.4513.1186549602.32220.help-gnu-emacs@gnu.org>
2007-08-08  8:32   ` dieter.wilhelm
     [not found] <mailman.4504.1186523154.32220.help-gnu-emacs@gnu.org>
2007-08-08 11:55 ` Johan Bockgård
2007-08-08 12:27   ` dieter.wilhelm
2007-08-09  4:04     ` Barry Margolin
2007-08-09  6:52       ` Dieter Wilhelm
2007-08-09 17:49 ` Stefan Monnier
2007-08-09 20:16   ` Dieter Wilhelm

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).