From f9218dc461156b401d0df4743bc4b8937c4e3561 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Mon, 19 Sep 2022 11:14:28 +0300 Subject: [PATCH] PORT: use (eql sweep) instead of (eql 'sweep) in cl-defmethods... ...for compatibility with Emacs 27 --- sweep.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sweep.el b/sweep.el index 3b60766..0b41fd2 100644 --- a/sweep.el +++ b/sweep.el @@ -1304,23 +1304,23 @@ Interactively, POINT is set to the current point." "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)) @@ -1329,7 +1329,7 @@ Interactively, POINT is set to the current point." (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)) -- 2.39.2