"Hook for `xref-backend-functions'."
'sweep)
-(cl-defmethod xref-backend-identifier-at-point ((_backend (eql 'sweep)))
+(cl-defmethod xref-backend-identifier-at-point ((_backend (eql sweep)))
(sweep-identifier-at-point))
-(cl-defmethod xref-backend-identifier-completion-table ((_backend (eql 'sweep)))
+(cl-defmethod xref-backend-identifier-completion-table ((_backend (eql sweep)))
(completion-table-with-cache #'sweep-predicates-collection))
-(cl-defmethod xref-backend-identifier-completion-ignore-case ((_backend (eql 'sweep)))
+(cl-defmethod xref-backend-identifier-completion-ignore-case ((_backend (eql sweep)))
"Case is always significant for Prolog identifiers, so return nil."
nil)
-(cl-defmethod xref-backend-definitions ((_backend (eql 'sweep)) mfn)
+(cl-defmethod xref-backend-definitions ((_backend (eql sweep)) mfn)
(when-let ((loc (sweep-predicate-location mfn))
(path (car loc))
(line (or (cdr loc) 1)))
(list (xref-make (concat path ":" (number-to-string line)) (xref-make-file-location path line 0)))))
-(cl-defmethod xref-backend-references ((_backend (eql 'sweep)) mfn)
+(cl-defmethod xref-backend-references ((_backend (eql sweep)) mfn)
(let ((refs (sweep-predicate-references mfn)))
(seq-map (lambda (loc)
(let ((by (car loc))
(xref-make by (xref-make-file-location path line 0))))
refs)))
-(cl-defmethod xref-backend-apropos ((_backend (eql 'sweep)) pattern)
+(cl-defmethod xref-backend-apropos ((_backend (eql sweep)) pattern)
(let ((matches (sweep-predicate-apropos pattern)))
(seq-map (lambda (match)
(let ((mfn (car match))