Hrvoje Niksic <hniksic(a)srce.hr> writes:
1998-05-11 Hrvoje Niksic <hniksic(a)srce.hr>
* help.el (describe-key-briefly): New argument INSERT.
* simple.el (eval-expression): New optional argument; synch with
FSF 20.3.
Damn I already did that too. :-) I should have submitted the patch
_before_ going out to eat.
You read Erik's message too, did you? However you missed where-is
(Erik didn't mention that in his message).
Here is the relevant part of my patch (without Changelog and NEWS
parts since that is
mostly the same as yours)
Index: help.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/help.el,v
retrieving revision 1.23
diff -u -r1.23 help.el
--- help.el 1998/05/10 00:25:19 1.23
+++ help.el 1998/05/12 01:10:32
@@ -1280,11 +1285,12 @@
(< (length x) (length y))))
(or separator ", ")))
-(defun where-is (definition)
+(defun where-is (definition &optional insert)
"Print message listing key sequences that invoke specified command.
Argument is a command definition, usually a symbol with a function definition.
When run interactively, it defaults to any function found by
-`function-at-point'."
+`function-at-point'.
+If INSERT (the prefix arg) is non-nil, insert the message in the buffer."
(interactive
(let ((fn (function-at-point))
(enable-recursive-minibuffers t)
@@ -1293,11 +1299,18 @@
(if fn (format "Where is command (default %s): " fn)
"Where is command: ")))
(list (if (equal (symbol-name val) "")
- fn val))))
+ fn val)
+ current-prefix-arg)))
(let ((keys (where-is-internal definition)))
(if keys
- (message "%s is on %s" definition (sorted-key-descriptions keys))
- (message "%s is not on any keys" definition)))
+ (if insert
+ (princ (format "%s (%s)" (sorted-key-descriptions keys)
+ definition) (current-buffer))
+ (message "%s is on %s" definition (sorted-key-descriptions keys)))
+ (if insert
+ (princ (format (if (commandp definition) "M-x %s RET"
+ "M-: (%s ...)") definition) (current-buffer))
+ (message "%s is not on any keys" definition))))
nil)
;; `locate-library' moved to "packages.el"