From: Tino Calancha <f92capac@gmail.com>
To: 22583@debbugs.gnu.org
Subject: bug#22583: 25.1.50; find-library don't call find-function-after-hook
Date: Thu, 18 Feb 2016 09:52:54 +0900 (JST) [thread overview]
Message-ID: <alpine.LRH.2.20.1602180949260.14344@calancha-ilc.kek.jp> (raw)
In-Reply-To: <alpine.LRH.2.20.1602080013560.4893@calancha-ilc.kek.jp>
[-- Attachment #1: Type: text/plain, Size: 255 bytes --]
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.
[-- Attachment #2: Type: text/plain, Size: 718 bytes --]
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)
next prev parent reply other threads:[~2016-02-18 0:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-07 15:18 bug#22583: 25.1.50; find-function-search-for-symbol don't call find-function-after-hook Tino Calancha
2016-02-08 5:01 ` Dmitry Gutov
2016-02-08 12:50 ` Tino Calancha
2016-02-18 0:52 ` Tino Calancha [this message]
2016-02-21 23:27 ` bug#22583: 25.1.50; find-library " Dmitry Gutov
2016-02-22 0:00 ` John Wiegley
2016-02-22 0:04 ` Dmitry Gutov
2016-02-22 17:01 ` John Wiegley
2016-02-22 17:19 ` Tino Calancha
2016-04-25 17:27 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LRH.2.20.1602180949260.14344@calancha-ilc.kek.jp \
--to=f92capac@gmail.com \
--cc=22583@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.