(if (documentation defn)
(princ (documentation defn))
(princ "not documented"))
+ (save-excursion
+ (set-buffer standard-output)
+ (help-mode))
(print-help-return-message)))))
(defun describe-mode ()
(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
(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)
(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 ()
(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.