emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/consult 9e5db55: consult-xref--preview: Use cl-typecase


From: ELPA Syncer
Subject: [elpa] externals/consult 9e5db55: consult-xref--preview: Use cl-typecase (Fix #349)
Date: Fri, 2 Jul 2021 09:57:06 -0400 (EDT)

branch: externals/consult
commit 9e5db5571738113728887c565af5f0cab2dbf6e1
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    consult-xref--preview: Use cl-typecase (Fix #349)
---
 consult-xref.el | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/consult-xref.el b/consult-xref.el
index bda803f..e32cd47 100644
--- a/consult-xref.el
+++ b/consult-xref.el
@@ -57,15 +57,15 @@
               (consult--buffer-display display))
           (funcall preview
                    ;; Only preview file and buffer markers
-                   (cond
-                    ((xref-buffer-location-p loc)
-                     (xref-location-marker loc))
-                    ((xref-file-location-p loc)
-                     (consult--position-marker
-                      (funcall open (oref loc file))
-                      (oref loc line)
-                      (oref loc column)))
-                    (t (message "No preview for %s" (type-of loc))))
+                   (cl-typecase loc
+                     (xref-buffer-location
+                      (xref-location-marker loc))
+                     (xref-file-location
+                      (consult--position-marker
+                       (funcall open (oref loc file))
+                       (oref loc line)
+                       (oref loc column)))
+                     (t (message "No preview for %s" (type-of loc))))
                    nil)))))))
 
 (defun consult-xref--group (cand transform)



reply via email to

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