From: Luc Teirlinck <teirllm@dms.auburn.edu>
Subject: C-h k, C-h f and keyboard macros: Patch.
Date: Mon, 10 Feb 2003 17:56:29 -0600 (CST) [thread overview]
Message-ID: <200302102356.RAA04775@eel.dms.auburn.edu> (raw)
Currently, `describe-key' (usually C-h k) and `describe-function'
(usually C-h f) produce confusing output when confronted with a
keyboard macro. Bind any key to a keyboard macro and do C-h k. The
output looks like:
C-c 3 runs the command ott
which is a keyboard macro.
It is bound to C-c 3.
[Missing arglist. Please make a bug report.]
Keyboard macro.
There is no missing arglist. The following patch would replace the
confusing "[Missing arglist. Please make a bug report.]" with a
description of the macro, provided by `kmacro-display'.
New C-h k output:
C-c 3 runs the command ott
which is a keyboard macro.
It is bound to C-c 3.
Macro: SPC one SPC two SPC three SPC
Keyboard macro.
It also seems to work well for keys bound directly to the macro
definition:
C-c d runs the command [24 100 126]
which is a keyboard macro.
It is bound to C-c d.
Macro: C-x d ~
Keyboard macro.
In other words, we get the "readable" and the "formal" definition,
yielding no duplication in this case.
An alternative to printing the `kmacro-display' output would be to
just erase the offending line and not replace it with anything, but I
find the `kmacro-display' output useful in situations where I do
C-h k. The patch affects C-h f in the same way as C-h k.
Change log:
2003-02-10 Luc Teirlinck <teirllm@mail.auburn.edu>
* help-fns.el (describe-function-1): Change output for
keyboard macros.
Patch:
===File ~/help-fns-diff=====================================
cd /usr/local/share/emacs/21.3.50/lisp/
diff -c /usr/local/share/emacs/21.3.50/lisp/help-fns.el /usr/local/share/emacs/21.3.50/lisp/help-fns.new.el
*** /usr/local/share/emacs/21.3.50/lisp/help-fns.el Tue Feb 4 22:37:29 2003
--- /usr/local/share/emacs/21.3.50/lisp/help-fns.new.el Mon Feb 10 16:22:57 2003
***************
*** 293,299 ****
(when (commandp function)
(let* ((remapped (remap-command function))
(keys (where-is-internal
! (or remapped function) overriding-local-map nil nil)))
(when remapped
(princ "It is remapped to `")
(princ (symbol-name remapped))
--- 293,299 ----
(when (commandp function)
(let* ((remapped (remap-command function))
(keys (where-is-internal
! (or remapped function) overriding-local-map nil nil)))
(when remapped
(princ "It is remapped to `")
(princ (symbol-name remapped))
***************
*** 323,328 ****
--- 323,331 ----
function)))))
usage)
(car usage))
+ ((or (stringp def)
+ (vectorp def))
+ (kmacro-display def))
(t "[Missing arglist. Please make a bug report.]")))
(terpri))
(let ((obsolete (and
Diff finished at Mon Feb 10 16:47:18
============================================================
next reply other threads:[~2003-02-10 23:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-10 23:56 Luc Teirlinck [this message]
2003-02-11 13:10 ` C-h k, C-h f and keyboard macros: Patch Kim F. Storm
2003-02-11 12:52 ` Juanma Barranquero
2003-02-11 14:13 ` Kim F. Storm
2003-02-11 14:07 ` Juanma Barranquero
2003-02-11 15:18 ` Kim F. Storm
2003-02-11 14:27 ` Juanma Barranquero
2003-02-11 15:36 ` Kim F. Storm
2003-02-11 14:47 ` Juanma Barranquero
2003-02-11 16:19 ` Stefan Monnier
2003-02-11 20:58 ` Kim F. Storm
2003-02-12 20:34 ` Richard Stallman
2003-02-13 0:16 ` Kim F. Storm
2003-02-11 16:03 ` Luc Teirlinck
2003-02-12 7:19 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200302102356.RAA04775@eel.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.