aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2021-03-08 19:48:28 +0200
committerJuri Linkov2021-03-08 19:48:28 +0200
commit04c43bb0477682a839187f2df816342d95bf6f21 (patch)
treefe6d3fdd37f66b76f1984d11694b152fae64ecb1
parent7ec870c5383d08b965aae898bbdc206cb9056638 (diff)
downloademacs-04c43bb0477682a839187f2df816342d95bf6f21.tar.gz
emacs-04c43bb0477682a839187f2df816342d95bf6f21.zip
* lisp/progmodes/xref.el (xref-after-update-hook): New defcustom (bug#46992).
(xref--insert-xrefs): Use run-hooks on it.
-rw-r--r--lisp/progmodes/xref.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index af46365325b..c066d9dc024 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -411,6 +411,12 @@ elements is negated: these commands will NOT prompt."
411 "Functions called after returning to a pre-jump location." 411 "Functions called after returning to a pre-jump location."
412 :type 'hook) 412 :type 'hook)
413 413
414(defcustom xref-after-update-hook nil
415 "Functions called after the xref buffer is updated."
416 :type 'hook
417 :version "28.1"
418 :package-version '(xref . "1.0.4"))
419
414(defvar xref--marker-ring (make-ring xref-marker-ring-length) 420(defvar xref--marker-ring (make-ring xref-marker-ring-length)
415 "Ring of markers to implement the marker stack.") 421 "Ring of markers to implement the marker stack.")
416 422
@@ -927,7 +933,8 @@ GROUP is a string for decoration purposes and XREF is an
927 prefix summary) 933 prefix summary)
928 (setq prev-line line 934 (setq prev-line line
929 prev-group group)))) 935 prev-group group))))
930 (insert "\n"))) 936 (insert "\n"))
937 (run-hooks 'xref-after-update-hook))
931 938
932(defun xref--analyze (xrefs) 939(defun xref--analyze (xrefs)
933 "Find common filenames in XREFS. 940 "Find common filenames in XREFS.