all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

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 --
     [not found] <mailman.4504.1186523154.32220.help-gnu-emacs@gnu.org>
2007-08-08 11:55 ` How to detect C-u supplied arguments from other prefix arguments 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
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>
2007-08-08  8:32   ` dieter.wilhelm

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.