]> git.eshelyaron.com Git - emacs.git/commitdiff
; Run find-function-after-hook after finding a symbol
authorTino Calancha <f92capac@gmail.com>
Mon, 25 Apr 2016 17:27:06 +0000 (19:27 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 25 Apr 2016 17:27:42 +0000 (19:27 +0200)
* lisp/emacs-lisp/find-func.el (find-library):
* lisp/help-mode.el (help-function-def, help-variable-def):
Run `find-function-after-hook' inside the help-function of the
buttons (bug#22583).

etc/NEWS
lisp/emacs-lisp/find-func.el
lisp/help-mode.el

index eff5472e1bdb019d38e29c7cbfec3e25c138dc01..6bdb648a7b0f56529666aec8de00efca408c3949 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -56,7 +56,10 @@ affected by this, as SGI stopped supporting IRIX in December 2013.
 \f
 * Changes in Emacs 25.2
 
---
+** `find-library', `help-function-def' and `help-variable-def' now run
+`find-function-after-hook'.
+
+---
 ** 'process-attributes' on Darwin systems now returns more information.
 
 +++
index 0575ce49f80330a468566cc96c1bae8f22c68aea..b04a9d2dea53f57f1e30cacfb28a78255795a043 100644 (file)
@@ -283,7 +283,11 @@ LIBRARY should be a string (the name of the library)."
                         "Library name: ")
                       table nil nil nil nil def))))
   (let ((buf (find-file-noselect (find-library-name library))))
-    (condition-case nil (switch-to-buffer buf) (error (pop-to-buffer buf)))))
+    (condition-case nil
+        (prog1
+            (switch-to-buffer buf)
+          (run-hooks 'find-function-after-hook))
+      (error (pop-to-buffer buf)))))
 
 ;;;###autoload
 (defun find-function-search-for-symbol (symbol type library)
index 7b95e5fb04e195373974dc2423904b1f9ade86e8..e008698618c73a5acbdbb180d5d62b5485a77c46 100644 (file)
@@ -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"))))