emacs-diffs
[Top][All Lists]
Advanced

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

master 3ea0a33: New commands xref-next-line-no-show and xref-prev-line-n


From: Juri Linkov
Subject: master 3ea0a33: New commands xref-next-line-no-show and xref-prev-line-no-show (bug#44611)
Date: Tue, 16 Mar 2021 14:07:50 -0400 (EDT)

branch: master
commit 3ea0a334dca81faeb619e8a52ecfaf7ad072eaf4
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    New commands xref-next-line-no-show and xref-prev-line-no-show (bug#44611)
    
    * lisp/progmodes/xref.el (xref-next-line-no-show)
    (xref-prev-line-no-show): New commands.
    (xref-next-line, xref-prev-line): Use them.
---
 lisp/progmodes/xref.el | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index c066d9d..ea52bef 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -609,16 +609,26 @@ SELECT is `quit', also quit the *xref* window."
     (when xref
       (xref--show-location (xref-item-location xref)))))
 
+(defun xref-next-line-no-show ()
+  "Move to the next xref but don't display its source."
+  (interactive)
+  (xref--search-property 'xref-item))
+
 (defun xref-next-line ()
   "Move to the next xref and display its source in the appropriate window."
   (interactive)
-  (xref--search-property 'xref-item)
+  (xref-next-line-no-show)
   (xref-show-location-at-point))
 
+(defun xref-prev-line-no-show ()
+  "Move to the previous xref but don't display its source."
+  (interactive)
+  (xref--search-property 'xref-item t))
+
 (defun xref-prev-line ()
   "Move to the previous xref and display its source in the appropriate window."
   (interactive)
-  (xref--search-property 'xref-item t)
+  (xref-prev-line-no-show)
   (xref-show-location-at-point))
 
 (defun xref-next-group ()



reply via email to

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