all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tino Calancha <f92capac@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: Tino Calancha <f92capac@gmail.com>, 22583@debbugs.gnu.org
Subject: bug#22583: 25.1.50; find-function-search-for-symbol don't call find-function-after-hook
Date: Mon, 8 Feb 2016 21:50:04 +0900 (JST)	[thread overview]
Message-ID: <alpine.LRH.2.20.1602082147550.4679@calancha-ilc.kek.jp> (raw)
In-Reply-To: <56B82139.50408@yandex.ru>

[-- Attachment #1: Type: text/plain, Size: 425 bytes --]


>find-function-search-for-symbol is a querying function. It can be used by different consumers, e.g. xref-location-marker.
>I'm not sure the user would want find-function-after-hook to run in every such case.
Right: the hook may be unnecessary called many times. Not good.

>Maybe help-variable-def's button definition's help-function should run the hook explicitly instead.
Thanks for the tip. This way looks more sensible.

[-- Attachment #2: Type: text/plain, Size: 830 bytes --]

diff --git a/help-mode.el b/help-mode.el
index 22e5386..9c512bd 100644
--- a/help-mode.el
+++ b/help-mode.el
@@ -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"))))

  reply	other threads:[~2016-02-08 12:50 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 [this message]
2016-02-18  0:52 ` bug#22583: 25.1.50; find-library " Tino Calancha
2016-02-21 23:27   ` 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.1602082147550.4679@calancha-ilc.kek.jp \
    --to=f92capac@gmail.com \
    --cc=22583@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /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.