[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4d60d9face 2/2: Add a doc string to xref-current-item
From: |
Lars Ingebrigtsen |
Subject: |
master 4d60d9face 2/2: Add a doc string to xref-current-item |
Date: |
Sun, 17 Apr 2022 06:17:51 -0400 (EDT) |
branch: master
commit 4d60d9face04bbbd22b4ecf69db208165b670b4f
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Add a doc string to xref-current-item
* lisp/progmodes/xref.el (xref-after-jump-hook): Link to it.
(xref-current-item): Add a doc string to the now-public variable.
---
etc/NEWS | 10 +++++++---
lisp/progmodes/xref.el | 7 +++++--
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 560d3eecfd..445e3ae89f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -942,12 +942,16 @@ to enable the display of the buffer list.
It is bound to 'C-M-,' and jumps to the location where 'xref-go-back'
('M-,', also known as 'xref-pop-marker-stack') was invoked previously.
-*** 'xref-query-replace-in-results' does not prompt for FROM when
-called without prefix argument, to make the most common case faster:
-replacing entire matches.
++++
+*** 'xref-query-replace-in-results' prompting change.
+This command no longer prompts for FROM when called without prefix
+argument. This makes the most common case faster: replacing entire
+matches.
++++
*** New command 'xref-find-references-and-replace' to rename one identifier.
+---
*** New variable 'xref-current-item' (renamed from a private version).
*** New function 'xref-show-xrefs'.
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 277934c08a..958d4e8b9d 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -381,7 +381,8 @@ elements is negated: these commands will NOT prompt."
(defcustom xref-after-jump-hook '(recenter
xref-pulse-momentarily)
- "Functions called after jumping to an xref."
+ "Functions called after jumping to an xref.
+Also see `xref-current-item'."
:type 'hook)
(defcustom xref-after-return-hook '(xref-pulse-momentarily)
@@ -490,7 +491,9 @@ To undo, use \\[xref-go-forward]."
'xref-current-item
"29.1")
-(defvar xref-current-item nil)
+(defvar xref-current-item nil
+ "Dynamically bound to the current item being processed.
+This can be used from `xref-after-jump-hook', for instance.")
(defun xref-pulse-momentarily ()
(pcase-let ((`(,beg . ,end)