From c86dc8d4888bc0c5d56016c14c134123ec623072 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 5 Dec 2020 02:57:46 +0200 Subject: [PATCH] Always show the summary * lisp/progmodes/xref.el (xref--show-defs-minibuffer): Always show the summary (at least for now). --- lisp/progmodes/xref.el | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index a78fed282cf..9f5fc57142b 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -947,24 +947,21 @@ local keymap that binds `RET' to `xref-quit-and-goto-xref'." (cl-loop for ((group . xrefs) . more1) on xref-alist do - (let ((show-summary (> (length xrefs) 1))) - (cl-loop for (xref . more2) on xrefs do - (with-slots (summary location) xref - (let* ((line (xref-location-line location)) - (line-fmt - (if line - (format #("%d:" 0 2 (face xref-line-number)) - line) - "")) - (group-fmt - (propertize - (substring group group-prefix-length) - 'face 'xref-file-header)) - (candidate - (if show-summary - (format "%s:%s%s" group-fmt line-fmt summary) - (format "%s" group-fmt)))) - (push (cons candidate xref) xref-alist-with-line-info)))))) + (cl-loop for (xref . more2) on xrefs do + (with-slots (summary location) xref + (let* ((line (xref-location-line location)) + (line-fmt + (if line + (format #("%d:" 0 2 (face xref-line-number)) + line) + "")) + (group-fmt + (propertize + (substring group group-prefix-length) + 'face 'xref-file-header)) + (candidate + (format "%s:%s%s" group-fmt line-fmt summary))) + (push (cons candidate xref) xref-alist-with-line-info))))) (setq xref (if (not (cdr xrefs)) (car xrefs) -- 2.39.5