+++
** 'progress-reporter-update' accepts a suffix string to display.
+---
+** New variable 'xref-file-name-display' controls the display of file
+names in xref buffers.
\f
* Editing Changes in Emacs 27.1
;;;; Commonly needed location classes are defined here:
+(defcustom xref-file-name-display 'abs
+ "Style of file name display in *xref* buffers."
+ :type '(choice (const :tag "absolute file name" abs)
+ (const :tag "nondirectory file name" nondirectory))
+ :version "27.1")
+
;; FIXME: might be useful to have an optional "hint" i.e. a string to
;; search for in case the line number is slightly out of date.
(defclass xref-file-location (xref-location)
(point-marker))))))
(cl-defmethod xref-location-group ((l xref-file-location))
- (oref l file))
+ (cl-ecase xref-file-name-display
+ (abs (oref l file))
+ (nondirectory (file-name-nondirectory (oref l file)))))
(defclass xref-buffer-location (xref-location)
((buffer :type buffer :initarg :buffer)