(pcase-lambda (`(,beg ,len ,bin))
(when (<= beg pos (+ beg len)) bin))
all)))
- (if dec (seq-keep (pcase-lambda (`(,sym ,len ,bin))
- (when (equal bin dec)
- (let* ((beg-end (save-excursion
- (goto-char sym)
- (cons (pos-bol) (pos-eol))))
- (beg (car beg-end))
- (end (cdr beg-end))
- (line (buffer-substring-no-properties beg end))
- (cur (- sym beg)))
- (add-face-text-property cur (+ len cur)
- 'xref-match t line)
- (xref-make line (xref-make-buffer-location
- (current-buffer) sym)))))
- all)
+ (if (numberp dec)
+ (seq-keep (pcase-lambda (`(,sym ,len ,bin))
+ (when (equal bin dec)
+ (let* ((beg-end (save-excursion
+ (goto-char sym)
+ (cons (pos-bol) (pos-eol))))
+ (beg (car beg-end))
+ (end (cdr beg-end))
+ (line (buffer-substring-no-properties beg end))
+ (cur (- sym beg)))
+ (add-face-text-property cur (+ len cur)
+ 'xref-match t line)
+ (xref-make line (xref-make-buffer-location
+ (current-buffer) sym)))))
+ all)
(cl-call-next-method backend identifier))))
(defun elisp--xref-filter-definitions (definitions namespace symbol)