]> git.eshelyaron.com Git - emacs.git/commitdiff
(disabled-command-hook): Correctly keep the first
authorRichard M. Stallman <rms@gnu.org>
Fri, 13 Dec 1996 20:50:55 +0000 (20:50 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 13 Dec 1996 20:50:55 +0000 (20:50 +0000)
paragraph of the command's documentation.

lisp/novice.el

index 29594e6b7dc14c9774457cf7e62d8d779c9eef78..424ef693fd117de6d494ba5133bcb5ad527d5753 100644 (file)
@@ -62,14 +62,15 @@ If nil, the feature is disabled, i.e., all commands work normally.")
        ;; Print any special message saying why the command is disabled.
        (if (stringp (get this-command 'disabled))
           (princ (get this-command 'disabled)))
-       (princ (or (condition-case ()
-                     (documentation this-command)
-                   (error nil))
-                 "<< not documented >>"))
        ;; Keep only the first paragraph of the documentation.
        (save-excursion
         (set-buffer "*Help*")
-        (goto-char (point-min))
+        (goto-char (point-max))
+        (save-excursion
+          (princ (or (condition-case ()
+                         (documentation this-command)
+                       (error nil))
+                     "<< not documented >>")))
         (if (search-forward "\n\n" nil t)
             (delete-region (1- (point)) (point-max))
           (goto-char (point-max))))