[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog f887a4b3f0 085/166: ENHANCED: provide caller pr
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog f887a4b3f0 085/166: ENHANCED: provide caller predicate in xref-find-references |
Date: |
Fri, 30 Sep 2022 04:59:28 -0400 (EDT) |
branch: elpa/sweeprolog
commit f887a4b3f0f749d95f3a22a9beee1e0855865435
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
ENHANCED: provide caller predicate in xref-find-references
---
sweep.el | 7 ++++---
sweep.pl | 13 ++++++++-----
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/sweep.el b/sweep.el
index f996831067..932eec322e 100644
--- a/sweep.el
+++ b/sweep.el
@@ -1201,9 +1201,10 @@ Interactively, a prefix arg means to prompt for BUFFER."
(cl-defmethod xref-backend-references ((_backend (eql 'sweep)) mfn)
(let ((refs (sweep-predicate-references mfn)))
(seq-map (lambda (loc)
- (let ((path (car loc))
- (line (or (cdr loc) 1)))
- (xref-make (concat path ":" (number-to-string line))
(xref-make-file-location path line 0))))
+ (let ((by (car loc))
+ (path (cadr loc))
+ (line (or (cddr loc) 1)))
+ (xref-make by (xref-make-file-location path line 0))))
refs)))
(cl-defmethod xref-backend-apropos ((_backend (eql 'sweep)) pattern)
diff --git a/sweep.pl b/sweep.pl
index bdbebf9fea..1c90e853c9 100644
--- a/sweep.pl
+++ b/sweep.pl
@@ -139,7 +139,6 @@ sweep_identifier_at_point([Contents0, Path, Point],
Identifier) :-
:- dynamic sweep_current_identifier_at_point/1.
-
sweep_identifier_at_point_(Path0, Point, Contents, Identifier) :-
atom_string(Path, Path0),
( xref_module(Path, M)
@@ -360,13 +359,17 @@ sweep_module_description([M0|P], [M|[P]]) :-
atom_string(M0, M).
sweep_predicate_references(MFN, Refs) :-
term_string(M:F/N, MFN),
pi_head(F/N, H),
- findall([Path|Line],
- (xref_called(Path0, H, _, _, Line),
+ findall([B,Path|Line],
+ (xref_called(Path0, H, B0, _, Line),
+ pi_head(B1, B0),
+ term_string(B1, B),
atom_string(Path0, Path)),
Refs,
Tail),
- findall([Path|Line],
- (xref_called(Path0, M:H, _, _, Line),
+ findall([B,Path|Line],
+ (xref_called(Path0, M:H, B0, _, Line),
+ pi_head(B1, B0),
+ term_string(B1, B),
atom_string(Path0, Path)),
Tail).
- [nongnu] elpa/sweeprolog face064afa 062/166: ADDED: custom font-lock-fontify-region-function for sweep-mode, (continued)
- [nongnu] elpa/sweeprolog face064afa 062/166: ADDED: custom font-lock-fontify-region-function for sweep-mode, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 6363ddef3a 073/166: ADDED: implemented all xref backend callback functions, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 8dc9359dca 082/166: ADDED: sweep-set-prolog-flag for setting Prolog flags, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 0f86b23be9 080/166: ENHANCED: emit Prolog messages with color coding, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 1f4b1a6dcc 079/166: MODIFIED: use executable-find to locate the swipl executable..., ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog f772a136e4 081/166: DOC: fix typos, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 75ec7290be 096/166: ADDED: sweep-load-buffer, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 3717572348 091/166: FIXED: handle more missing color terms, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 1744b29cc2 092/166: FIXED: off by one in sweep-colourise-some-terms, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 16d1a380ab 122/166: FIXED: (sweep-beginning-of-top-term): possible infinite loop, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog f887a4b3f0 085/166: ENHANCED: provide caller predicate in xref-find-references,
ELPA Syncer <=
- [nongnu] elpa/sweeprolog 49214a669b 109/166: PORT: don't depend on pos-bol added in Emacs 29, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 1aefaea2ab 106/166: ADDED: (sweep-find-file-at-point): new function, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog ce88557fdc 104/166: DOC: NEWS.org: new file, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 28170f629f 124/166: FIXED: (sweep--colourise): handle the dict_content color term, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 6d1509a06a 090/166: FIXED: sweep-beginning-of-top-term stopping at comment start, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 9dfbbf9e9b 128/166: ADDED: new user option for choosing indentation increments, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 19d725b869 129/166: New make target: make info, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog a563bc36dc 121/166: FIXED: package-lint complaint about autoloaded private function, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog c94b509fcb 119/166: DOC: Add Top-level history section, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog fc6c2964d9 105/166: ADDED: (sweep-file-at-point): new function, ELPA Syncer, 2022/09/30