emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/help.el [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/help.el [emacs-unicode-2]
Date: Wed, 27 Oct 2004 01:48:06 -0400

Index: emacs/lisp/help.el
diff -c emacs/lisp/help.el:1.259.4.5 emacs/lisp/help.el:1.259.4.6
*** emacs/lisp/help.el:1.259.4.5        Thu Oct 14 08:49:59 2004
--- emacs/lisp/help.el  Wed Oct 27 05:41:58 2004
***************
*** 573,586 ****
                         (if (symbolp defn) defn (prin1-to-string defn)))))))))
  
  
! (defun describe-key (key &optional untranslated)
    "Display documentation of the function invoked by KEY.
  KEY should be a key sequence--when calling from a program,
  pass a string or a vector.
  If non-nil UNTRANSLATED is a vector of the untranslated events.
  It can also be a number in which case the untranslated events from
  the last key hit are used."
!   (interactive "kDescribe key: \np")
    (if (numberp untranslated)
        (setq untranslated (this-single-command-raw-keys)))
    (save-excursion
--- 573,586 ----
                         (if (symbolp defn) defn (prin1-to-string defn)))))))))
  
  
! (defun describe-key (key &optional untranslated up-event)
    "Display documentation of the function invoked by KEY.
  KEY should be a key sequence--when calling from a program,
  pass a string or a vector.
  If non-nil UNTRANSLATED is a vector of the untranslated events.
  It can also be a number in which case the untranslated events from
  the last key hit are used."
!   (interactive "kDescribe key: \np\nU")
    (if (numberp untranslated)
        (setq untranslated (this-single-command-raw-keys)))
    (save-excursion
***************
*** 608,613 ****
--- 608,624 ----
            (prin1 defn)
            (princ "\n   which is ")
            (describe-function-1 defn)
+           (when up-event
+             (let ((defn (or (string-key-binding up-event) (key-binding 
up-event))))
+               (unless (or (null defn) (integerp defn) (equal defn 'undefined))
+                 (princ "\n\n-------------- up event ---------------\n\n")
+                 (princ (key-description up-event))
+                 (if (windowp window)
+                     (princ " at that spot"))
+                 (princ " runs the command ")
+                 (prin1 defn)
+                 (princ "\n   which is ")
+                 (describe-function-1 defn))))
            (print-help-return-message)))))))
  
  
***************
*** 651,657 ****
                 (push (list pretty-minor-mode mode indicator)
                       minor-modes))))
        (if auto-fill-function
!           (push '("Auto Fill" auto-fill-mode " Fill")
                  minor-modes))
        (setq minor-modes
              (sort minor-modes
--- 662,669 ----
                 (push (list pretty-minor-mode mode indicator)
                       minor-modes))))
        (if auto-fill-function
!           ;; copy pure string so we can add face property to it below.
!           (push (list (copy-sequence "Auto Fill") 'auto-fill-mode " Fill")
                  minor-modes))
        (setq minor-modes
              (sort minor-modes




reply via email to

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