X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/315f675857250c2204d024748e9eafa57c68410f..3f9549e874035d963eb5ca02f24d51dc935e6326:/lisp/help-mode.el diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 85c1e62e2c..662f431d3c 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -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 @@ -30,7 +30,6 @@ ;;; Code: (require 'button) -(require 'view) (eval-when-compile (require 'easymenu)) (defvar help-mode-map @@ -266,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")) + (defvar bookmark-make-record-function) @@ -288,10 +296,7 @@ Commands: ;;;###autoload (defun help-mode-finish () (when (eq major-mode 'help-mode) - ;; View mode's read-only status of existing *Help* buffer is lost - ;; by with-output-to-temp-buffer. - (toggle-read-only 1) - + (setq buffer-read-only t) (save-excursion (goto-char (point-min)) (let ((inhibit-read-only t)) @@ -503,11 +508,9 @@ that." (or (documentation-property sym 'variable-documentation) - (condition-case nil - (documentation-property - (indirect-variable sym) - 'variable-documentation) - (cyclic-variable-indirection nil)))) + (documentation-property + (indirect-variable sym) + 'variable-documentation))) (help-xref-button 8 'help-variable sym)) ((fboundp sym) (help-xref-button 8 'help-function sym))))))) @@ -674,7 +677,8 @@ help buffer." " is also a " "face." "\n\n" facedoc)) ;; Don't record the `describe-function' item in the stack. (setq help-xref-stack-item nil) - (help-setup-xref (list #'help-xref-interned symbol) nil))))))) + (help-setup-xref (list #'help-xref-interned symbol) nil)))) + (goto-char (point-min))))) ;; Navigation/hyperlinking with xrefs