changeset 9854:f810a558acf6

(describe-key, describe-mode, view-lossage, describe-function, describe-variable): Set help-mode in *Help* buffer.
author Karl Heuer <kwzh@gnu.org>
date Wed, 09 Nov 1994 05:50:09 +0000
parents 2018a5a1da69
children 9caa80b065fc
files lisp/help.el
diffstat 1 files changed, 18 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help.el	Wed Nov 09 05:50:05 1994 +0000
+++ b/lisp/help.el	Wed Nov 09 05:50:09 1994 +0000
@@ -211,6 +211,9 @@
 	(if (documentation defn)
 	    (princ (documentation defn))
 	  (princ "not documented"))
+	(save-excursion
+	  (set-buffer standard-output)
+	  (help-mode))
 	(print-help-return-message)))))
 
 (defun describe-mode ()
@@ -248,6 +251,9 @@
     (princ mode-name)
     (princ " mode:\n")
     (princ (documentation major-mode))
+    (save-excursion
+      (set-buffer standard-output)
+      (help-mode))
     (print-help-return-message)))
 
 ;; So keyboard macro definitions are documented correctly
@@ -320,7 +326,8 @@
       (goto-char (point-min))
       (while (progn (move-to-column 50) (not (eobp)))
 	(search-forward " " nil t)
-	(insert "\n")))
+	(insert "\n"))
+      (help-mode))
     (print-help-return-message)))
 
 (defalias 'help 'help-for-help)
@@ -461,8 +468,11 @@
 	(princ "not documented"))
       )
     (print-help-return-message)
-    ;; Return the text we displayed.
-    (save-excursion (set-buffer standard-output) (buffer-string))))
+    (save-excursion
+      (set-buffer standard-output)
+      (help-mode)
+      ;; Return the text we displayed.
+      (buffer-string))))
 
 (defun variable-at-point ()
   (condition-case ()
@@ -510,8 +520,11 @@
 	  (princ (substitute-command-keys doc))
 	(princ "not documented as a variable.")))
     (print-help-return-message)
-    ;; Return the text we displayed.
-    (save-excursion (set-buffer standard-output) (buffer-string))))
+    (save-excursion
+      (set-buffer standard-output)
+      (help-mode)
+      ;; Return the text we displayed.
+      (buffer-string))))
 
 (defun where-is (definition)
   "Print message listing key sequences that invoke specified command.