diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-03-06 16:22:16 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-03-06 16:22:16 -0500 |
commit | 0d6459dfb52188481bfd6bb53f1b2f653ecd6a5d (patch) | |
tree | 306b87fc2903ad23343f3c84be1cccfa72e5a97e /lisp/help-fns.el | |
parent | 798cb64441228d473f7bdd213183c70fb582595c (diff) | |
parent | 892777baa1739fa5f1f2d1c2975488c3e6f57bae (diff) | |
download | emacs-0d6459dfb52188481bfd6bb53f1b2f653ecd6a5d.tar.gz emacs-0d6459dfb52188481bfd6bb53f1b2f653ecd6a5d.tar.bz2 emacs-0d6459dfb52188481bfd6bb53f1b2f653ecd6a5d.zip |
Merge from trunk
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r-- | lisp/help-fns.el | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 58df45bc33c..35f8c5e8e37 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -502,7 +502,8 @@ suitable file is found, return nil." (let* ((advertised (gethash def advertised-signature-table t)) (arglist (if (listp advertised) advertised (help-function-arglist def))) - (doc (documentation function)) + (doc (condition-case err (documentation function) + (error (format "No Doc! %S" err)))) (usage (help-split-fundoc doc function))) (with-current-buffer standard-output ;; If definition is a keymap, skip arglist note. @@ -773,15 +774,21 @@ it is displayed along with the global value." (setq extra-line t) (if (member (cons variable val) dir-local-variables-alist) (let ((file (and (buffer-file-name) - (not (file-remote-p (buffer-file-name))) - (dir-locals-find-file (buffer-file-name))))) + (not (file-remote-p (buffer-file-name))) + (dir-locals-find-file + (buffer-file-name)))) + (type "file")) (princ " This variable is a directory local variable") (when file - (princ (concat "\n from the file \"" - (if (consp file) - (car file) - file) - "\""))) + (if (consp file) ; result from cache + ;; If the cache element has an mtime, we + ;; assume it came from a file. + (if (nth 2 file) + (setq file (expand-file-name + dir-locals-file (car file))) + ;; Otherwise, assume it was set directly. + (setq type "directory"))) + (princ (format "\n from the %s \"%s\"" type file))) (princ ".\n")) (princ " This variable is a file local variable.\n"))) |