(defgroup reftex): Update home page url-link.
[bpt/emacs.git] / lisp / help-fns.el
index d30fc02..53e280f 100644 (file)
@@ -534,7 +534,8 @@ it is displayed along with the global value."
                         (error nil))))
                  (when location
                    (with-current-buffer (car location)
-                     (goto-char (cdr location))
+                     (when (cdr location)
+                       (goto-char (cdr location)))
                      (when (re-search-backward
                             "^;;; Generated autoloads from \\(.*\\)" nil t)
                        (setq file-name (match-string 1)))))))
@@ -630,6 +631,7 @@ it is displayed along with the global value."
                              (indirect-variable variable)
                            (error variable)))
                    (obsolete (get variable 'byte-obsolete-variable))
+                  (safe-var (get variable 'safe-local-variable))
                    (doc (or (documentation-property variable 'variable-documentation)
                             (documentation-property alias 'variable-documentation))))
               (unless (eq alias variable)
@@ -641,6 +643,13 @@ it is displayed along with the global value."
                 (princ (if (stringp (car obsolete)) (car obsolete)
                          (format "use `%s' instead." (car obsolete))))
                 (terpri))
+             (when safe-var
+               (princ "This variable is safe as a file local variable ")
+               (princ "if its value\nsatisfies the predicate ")
+               (princ (if (byte-code-function-p safe-var)
+                          "which is byte-compiled expression.\n"
+                        (format "`%s'.\n" safe-var)))
+               (terpri))
              (princ "Documentation:\n")
               (princ (or doc "Not documented as a variable.")))
            ;; Make a link to customize if this variable can be customized.