emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 26381d5: Use the elisp xref backend in profiler buf


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 26381d5: Use the elisp xref backend in profiler buffers
Date: Tue, 30 Jul 2019 06:04:31 -0400 (EDT)

branch: master
commit 26381d56e2e39700c60e17ca22c418028a3bfbd9
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Use the elisp xref backend in profiler buffers
    
    * lisp/profiler.el (profiler--xref-backend): New function (bug#23455).
    (profiler-report-mode): Use it to use the elisp xref handler when
    hitting `M-.' in profiler buffers.
---
 lisp/profiler.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/profiler.el b/lisp/profiler.el
index ee11ff6..92495e2 100644
--- a/lisp/profiler.el
+++ b/lisp/profiler.el
@@ -615,9 +615,12 @@ return it."
       (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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]