(undigestify-rmail-message): Better error messages.
[bpt/emacs.git] / lisp / help.el
index 96e2b19..b32cf2d 100644 (file)
           1 'font-lock-reference-face t)
      ;;
      ;; CLisp `:' keywords as references.
-     (list (concat "\\<:" sym-char "+\\>") 0 font-lock-reference-face t)))
+     (list (concat "\\<:" sym-char "+\\>") 0 'font-lock-reference-face t)))
   "Default expressions to highlight in Help mode.")
 
 (defun help-mode ()
@@ -120,6 +120,7 @@ Commands:
   (setq major-mode 'help-mode)
   (make-local-variable 'font-lock-defaults)
   (setq font-lock-defaults '(help-font-lock-keywords))
+  (view-mode)
   (run-hooks 'help-mode-hook))
 
 (defun help-quit ()
@@ -467,6 +468,7 @@ C-w print information on absence of warranty for GNU Emacs."
     (prin1 function)
     (princ ": ")
     (let* ((def (symbol-function function))
+          file-name
           (beg (if (commandp def) "an interactive " "a ")))
       (princ (cond ((or (stringp def)
                        (vectorp def))
@@ -484,21 +486,21 @@ C-w print information on absence of warranty for GNU Emacs."
                   ((eq (car-safe def) 'mocklisp)
                    "a mocklisp function")
                   ((eq (car-safe def) 'autoload)
+                   (setq file-name (nth 1 def))
                    (format "%s autoloaded Lisp %s"
                            (if (commandp def) "an interactive" "an")
                            (if (nth 4 def) "macro" "function")
-;;; Including the file name made this line too long.
-;;;                        (nth 1 def)
                            ))
                   (t "")))
-      (let ((file (describe-function-find-file function)))
-       (if file
-           (progn
-             (princ " in `")
-             ;; We used to add .el to the file name,
-             ;; but that's completely wrong when the user used load-file.
-             (princ file)
-             (princ "'"))))
+      (or file-name
+         (setq file-name (describe-function-find-file function)))
+      (if file-name
+         (progn
+           (princ " in `")
+           ;; We used to add .el to the file name,
+           ;; but that's completely wrong when the user used load-file.
+           (princ file-name)
+           (princ "'")))
       (princ ".")
       (terpri)
       (let ((arglist (cond ((byte-code-function-p def)