* bug#23455: 25.0.93; profiler-report doesn't configure xref for elisp
@ 2016-05-05 2:09 Juliusz Chroboczek
2019-07-28 14:38 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Juliusz Chroboczek @ 2016-05-05 2:09 UTC (permalink / raw)
To: 23455
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#23455: 25.0.93; profiler-report doesn't configure xref for elisp
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
2019-07-29 23:15 ` Dmitry Gutov
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-28 14:38 UTC (permalink / raw)
To: Juliusz Chroboczek; +Cc: 23455
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#23455: 25.0.93; profiler-report doesn't configure xref for elisp
2019-07-28 14:38 ` Lars Ingebrigtsen
@ 2019-07-29 23:15 ` Dmitry Gutov
2019-07-30 10:05 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2019-07-29 23:15 UTC (permalink / raw)
To: Lars Ingebrigtsen, Juliusz Chroboczek; +Cc: 23455
On 28.07.2019 17:38, Lars Ingebrigtsen wrote:
> 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:
It does, thanks. Please feel free to install.
> 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)
You could also use elisp--xref-backend directly, but this way we'll have
a direct place for future improvements.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-30 10:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-07-29 23:15 ` Dmitry Gutov
2019-07-30 10:05 ` Lars Ingebrigtsen
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.