Subject: 25.1.50; find-library don't call find-function-after-hook

From: Tino Calancha <[email-masked]>
Date: Thu, 18 Feb 2016 09:52:54 +0900 (JST)

IMO, for consistency, find-function-after-hook should be
also run by find-library.
For instance, as mentioned above, i set this hook to always
open source code on read-only buffers.
If find-library don't run the hook, it may open a file in
writable mode.

diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index 0575ce4..b04a9d2 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -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)