aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/help.el
diff options
context:
space:
mode:
authorKaroly Lorentey2004-10-31 02:05:24 +0000
committerKaroly Lorentey2004-10-31 02:05:24 +0000
commite0bc17abe6979d607e8de4684dddb96e53c60065 (patch)
treeb7cb7bc5df9f12138937fd958cdf4b9c2d19ee3a /lisp/help.el
parentf158167a84475d5fc41931531406821e6413afd7 (diff)
parent707994d2626cf0f01c3ece4028d73835068d64dc (diff)
downloademacs-e0bc17abe6979d607e8de4684dddb96e53c60065.tar.gz
emacs-e0bc17abe6979d607e8de4684dddb96e53c60065.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-639 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-640 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-641 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-642 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-643 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-644 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-645 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-646 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-647 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-648 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-649 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-651 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-652 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-59 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-60 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-61 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-62 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-63 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-263
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/lisp/help.el b/lisp/help.el
index c27bcc49055..ee35d007639 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -573,14 +573,14 @@ the last key hit are used."
573 (if (symbolp defn) defn (prin1-to-string defn))))))))) 573 (if (symbolp defn) defn (prin1-to-string defn)))))))))
574 574
575 575
576(defun describe-key (key &optional untranslated) 576(defun describe-key (key &optional untranslated up-event)
577 "Display documentation of the function invoked by KEY. 577 "Display documentation of the function invoked by KEY.
578KEY should be a key sequence--when calling from a program, 578KEY should be a key sequence--when calling from a program,
579pass a string or a vector. 579pass a string or a vector.
580If non-nil UNTRANSLATED is a vector of the untranslated events. 580If non-nil UNTRANSLATED is a vector of the untranslated events.
581It can also be a number in which case the untranslated events from 581It can also be a number in which case the untranslated events from
582the last key hit are used." 582the last key hit are used."
583 (interactive "kDescribe key: \np") 583 (interactive "kDescribe key: \np\nU")
584 (if (numberp untranslated) 584 (if (numberp untranslated)
585 (setq untranslated (this-single-command-raw-keys))) 585 (setq untranslated (this-single-command-raw-keys)))
586 (save-excursion 586 (save-excursion
@@ -608,6 +608,17 @@ the last key hit are used."
608 (prin1 defn) 608 (prin1 defn)
609 (princ "\n which is ") 609 (princ "\n which is ")
610 (describe-function-1 defn) 610 (describe-function-1 defn)
611 (when up-event
612 (let ((defn (or (string-key-binding up-event) (key-binding up-event))))
613 (unless (or (null defn) (integerp defn) (equal defn 'undefined))
614 (princ "\n\n-------------- up event ---------------\n\n")
615 (princ (key-description up-event))
616 (if (windowp window)
617 (princ " at that spot"))
618 (princ " runs the command ")
619 (prin1 defn)
620 (princ "\n which is ")
621 (describe-function-1 defn))))
611 (print-help-return-message))))))) 622 (print-help-return-message)))))))
612 623
613 624