From: Lars Ingebrigtsen <larsi@gnus.org>
To: Juliusz Chroboczek <jch@pps.univ-paris-diderot.fr>
Cc: 23455@debbugs.gnu.org
Subject: bug#23455: 25.0.93; profiler-report doesn't configure xref for elisp
Date: Sun, 28 Jul 2019 16:38:55 +0200 [thread overview]
Message-ID: <87ftmqb4w0.fsf@mouse.gnus.org> (raw)
In-Reply-To: <87oa8li7cu.wl-jch@pps.univ-paris-diderot.fr> (Juliusz Chroboczek's message of "Thu, 05 May 2016 04:09:05 +0200")
Juliusz Chroboczek <jch@pps.univ-paris-diderot.fr> writes:
> Pressing M-. in the buffer generated by profiler-report prompts me for
> a TAGS file rather than behaving like it does in an elisp buffer.
(I'm going through old Emacs bug reports that haven't received any
response.)
The following patch seems to make `M-.' work as expected in the report
buffers, but I'm wholly unfamiliar with how xref works -- I just
cargo-culted the code in elisp-mode.el.
Perhaps somebody who knows how this works can say whether it looks OK:
diff --git a/lisp/profiler.el b/lisp/profiler.el
index ee11ff68c5..92495e2de8 100644
--- a/lisp/profiler.el
+++ b/lisp/profiler.el
@@ -615,9 +615,12 @@ profiler-report-setup-buffer
(profiler-report-render-calltree))
buffer))
+(defun profiler--xref-backend () 'elisp)
+
(define-derived-mode profiler-report-mode special-mode "Profiler-Report"
"Profiler Report Mode."
(add-to-invisibility-spec '(profiler . t))
+ (add-hook 'xref-backend-functions #'profiler--xref-backend nil t)
(setq buffer-read-only t
buffer-undo-list t
truncate-lines t))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2019-07-28 14:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-05 2:09 bug#23455: 25.0.93; profiler-report doesn't configure xref for elisp Juliusz Chroboczek
2019-07-28 14:38 ` Lars Ingebrigtsen [this message]
2019-07-29 23:15 ` Dmitry Gutov
2019-07-30 10:05 ` Lars 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=87ftmqb4w0.fsf@mouse.gnus.org \
--to=larsi@gnus.org \
--cc=23455@debbugs.gnu.org \
--cc=jch@pps.univ-paris-diderot.fr \
/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.