]> code.delx.au - gnu-emacs/blobdiff - lisp/help-mode.el
* term.el (term-default-fg-color, term-default-bg-color): Fix custom type.
[gnu-emacs] / lisp / help-mode.el
index 7b6490b6b13092a5b1df72fc7cb0a7180c36ed71..33c3ab3b7177cea6983fae215ad46184e270738a 100644 (file)
@@ -1,7 +1,7 @@
 ;;; help-mode.el --- `help-mode' used by *Help* buffers
 
-;; Copyright (C) 1985-1986, 1993-1994, 1998-2012
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1993-1994, 1998-2013 Free Software
+;; Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: help, internal
@@ -265,6 +265,15 @@ The format is (FUNCTION ARGS...).")
   :supertype 'help-xref
   'help-function 'customize-create-theme
   'help-echo (purecopy "mouse-2, RET: edit this theme file"))
+
+(define-button-type 'help-dir-local-var-def
+  :supertype 'help-xref
+  'help-function (lambda (var &optional file)
+                  ;; FIXME: this should go to the point where the
+                  ;; local variable was defined.
+                  (find-file file))
+  'help-echo (purecopy "mouse-2, RET: open directory-local variables file"))
+
 \f
 (defvar bookmark-make-record-function)
 
@@ -496,14 +505,12 @@ that."
                            ((and
                              (or (boundp sym)
                                  (get sym 'variable-documentation))
-                             (condition-case err
-                                 (or
-                                  (documentation-property
-                                   sym 'variable-documentation)
-                                  (documentation-property
-                                   (indirect-variable sym)
-                                   'variable-documentation))
-                               (error (message "No doc found: %S" err) nil)))
+                             (or
+                              (documentation-property
+                               sym 'variable-documentation)
+                              (documentation-property
+                               (indirect-variable sym)
+                               'variable-documentation)))
                             (help-xref-button 8 'help-variable sym))
                            ((fboundp sym)
                             (help-xref-button 8 'help-function sym)))))))