X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/59b5723c9b613f14cd60cd3239cfdbc0d2343b18..05d76dba6604f78e4b2b7b9f8b30c916cad7d32a:/lisp/help-mode.el diff --git a/lisp/help-mode.el b/lisp/help-mode.el index e1fc9fd198..e008698618 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -1,6 +1,6 @@ ;;; help-mode.el --- `help-mode' used by *Help* buffers -;; Copyright (C) 1985-1986, 1993-1994, 1998-2015 Free Software +;; Copyright (C) 1985-1986, 1993-1994, 1998-2016 Free Software ;; Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org @@ -107,7 +107,7 @@ The format is (FUNCTION ARGS...).") (defun help-button-action (button) "Call BUTTON's help function." - (help-do-xref (button-start button) + (help-do-xref nil (button-get button 'help-function) (button-get button 'help-args))) @@ -202,6 +202,7 @@ The format is (FUNCTION ARGS...).") (let ((location (find-function-search-for-symbol fun type file))) (pop-to-buffer (car location)) + (run-hooks 'find-function-after-hook) (if (cdr location) (goto-char (cdr location)) (message "Unable to find location in file")))) @@ -231,6 +232,7 @@ The format is (FUNCTION ARGS...).") (setq file (help-C-file-name var 'var))) (let ((location (find-variable-noselect var file))) (pop-to-buffer (car location)) + (run-hooks 'find-function-after-hook) (if (cdr location) (goto-char (cdr location)) (message "Unable to find location in file")))) @@ -294,11 +296,13 @@ Commands: ;;;###autoload (defun help-mode-setup () + "Enter Help Mode in the current buffer." (help-mode) (setq buffer-read-only nil)) ;;;###autoload (defun help-mode-finish () + "Finalize Help Mode setup in current buffer." (when (derived-mode-p 'help-mode) (setq buffer-read-only t) (help-make-xrefs (current-buffer))))