[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23455: 25.0.93; profiler-report doesn't configure xref for elisp
From: |
Lars Ingebrigtsen |
Subject: |
bug#23455: 25.0.93; profiler-report doesn't configure xref for elisp |
Date: |
Sun, 28 Jul 2019 16:38:55 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
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
- bug#23455: 25.0.93; profiler-report doesn't configure xref for elisp,
Lars Ingebrigtsen <=