help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kbd macro does not evaluate its parameter


From: Le Wang
Subject: kbd macro does not evaluate its parameter
Date: Mon, 26 Sep 2011 09:29:47 +0800

>From stackoverflow:
http://stackoverflow.com/questions/7549628/whats-wrong-with-the-following-unbind-script/7549825#7549825

User tries:

  (dolist (abcc '("C-a" "C-b"))
    (global-unset-key (kbd abcc)))

Which fails.

(defmacro kbd (keys)
  "Convert KEYS to the internal Emacs key representation.
KEYS should be a string constant in the format used for
saving keyboard macros (see `edmacro-mode')."
  (read-kbd-macro keys))

kbd should evaluate its parameter before calling the read-kbd-macro
function.  Its parameter types should all be self evaluating.

-- 
Le



reply via email to

[Prev in Thread] Current Thread [Next in Thread]