Ar an t-aonú lá déag de mí Eanair, scríobh steven Mitchell:
Is there a way to get a list of all named-keyboard macros in memory?
Some may be defined and/or loaded from the init.el and
some may be created, named, during the current session
and not yet saved to a file.
Some may be named and assigned to keys, and some
might not be assigned to a key sequence yet.
Not sure how to identify them to compile a list of them...
They’re all in obarray, you can construct a list like so:
(let (kbd-macros)
(mapatoms
#'(lambda (symbol)
(if (and (fboundp symbol) (arrayp (symbol-function symbol)))
(push (cons symbol (events-to-keys (symbol-function symbol)))
kbd-macros)))
obarray)
kbd-macros)
--
‘Liston operated so fast that he once accidentally amputated an assistant’s
fingers along with a patient’s leg, […] The patient and the assistant both
died of sepsis, and a spectator reportedly died of shock, resulting in the
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta