[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog 5eb4ede8f8 113/166: ADDED: (sweep-prefix-operat
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog 5eb4ede8f8 113/166: ADDED: (sweep-prefix-operators): New function |
Date: |
Fri, 30 Sep 2022 04:59:30 -0400 (EDT) |
branch: elpa/sweeprolog
commit 5eb4ede8f8ece589f72d3f01bb67e5470769e38d
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
ADDED: (sweep-prefix-operators): New function
---
sweep.el | 10 ++++++++++
sweep.pl | 10 ++++++++++
2 files changed, 20 insertions(+)
diff --git a/sweep.el b/sweep.el
index 66dbb5a386..914155704f 100644
--- a/sweep.el
+++ b/sweep.el
@@ -342,6 +342,15 @@ FLAG and VALUE are specified as strings and read as Prolog
terms."
(forward-char))
(cons start (point))))))))
+(defun sweep-prefix-operators (&optional file)
+ (sweep-open-query "user"
+ "sweep" "sweep_prefix_ops"
+ (or file (buffer-file-name)))
+ (let ((sol (sweep-next-solution)))
+ (sweep-close-query)
+ (when (sweep-true-p sol)
+ (cdr sol))))
+
(defun sweep-completion-at-point-function ()
(when-let ((bounds (sweep-predicate-prefix-boundaries)))
(let ((start (car bounds))
@@ -1101,6 +1110,7 @@ Interactively, a prefix arg means to prompt for BUFFER."
((sweep-indent-line-ends-with-else point))
((sweep-indent-line-ends-with-arg point))
((sweep-indent-line-ends-with-neck-p) 4)
+ ;; ((sweep-indent-line-ends-with-prefix-operator))
(t (sweep-indent-line-fallback))))))
(defun sweep-indent-line-fallback ()
diff --git a/sweep.pl b/sweep.pl
index 56a25be01c..8d6297420a 100644
--- a/sweep.pl
+++ b/sweep.pl
@@ -51,6 +51,7 @@
sweep_modules_collection/2,
sweep_packs_collection/2,
sweep_pack_install/2,
+ sweep_prefix_ops/2,
sweep_module_path/2
]).
@@ -668,6 +669,15 @@ should_handle_message_kind(warning, "warning").
should_handle_message_kind(informational, "informational").
should_handle_message_kind(debug(Topic0), ["debug"|Topic]) :-
atom_string(Topic0, Topic).
+sweep_prefix_ops(Path0, Ops) :-
+ atom_string(Path, Path0),
+ findall(Op, current_op(_, fx, Op), Ops0, Tail0),
+ findall(Op, current_op(_, fy, Op), Tail0, Tail1),
+ findall(Op, xref_op(Path, op(_, fx, Op)), Tail1, Tail),
+ findall(Op, xref_op(Path, op(_, fy, Op)), Tail),
+ maplist(atom_string, Ops0, Ops1),
+ list_to_set(Ops1, Ops).
+
sweep_load_buffer([String|Path0], Result) :-
atom_string(Path, Path0),
with_buffer_stream(Stream,
- [nongnu] elpa/sweeprolog f7dfbda2f2 148/166: Update LICENSE, (continued)
- [nongnu] elpa/sweeprolog f7dfbda2f2 148/166: Update LICENSE, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog b6e444bbdc 152/166: FIXED: remove message_hook during cleanup to avoid possible crash, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 04964e36b4 143/166: ENHANCED: also update highlighting between sub terms, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 8affae71da 138/166: ADDED: sweep-faces-style user option for controlling highlighting, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 615312796c 048/166: FIXED: copy paste error (singleton variable), ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 37f83755f6 049/166: PORT: detect older swipl and disable custom GMP alloc functions, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 3139de3e6c 056/166: ENHANCED: prompt for buffer name in sweep-top-level with C-u, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog ea43b81c95 058/166: DOC: update manual section about filespec expansion, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 3351766605 103/166: sweep.el: bump Package-Version to 0.2.0, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5b9e2d7d7c 126/166: ADDED: sweep_op_info/2: new_predicate, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5eb4ede8f8 113/166: ADDED: (sweep-prefix-operators): New function,
ELPA Syncer <=
- [nongnu] elpa/sweeprolog 2abad939fe 108/166: DOC: Following file specifications: new section, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 6dd6433920 165/166: ENHANCED: fontify quasi-quotation content according to its type, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 48e8fb7c65 155/166: ENHANCED: (sweep--colour-term-to-face): return multiple regions, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 1c87ca72e3 163/166: DOC: document new variable highlighting in the manual, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog a8d186092f 157/166: ENHANCED: More indicative error on failure to locate sweep-module, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 97856b5c85 159/166: DOC: add installation instructions from NonGNU ELPA, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 348294a57f 002/166: Add swipl-devel submodule, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog b2838d5477 004/166: Cleanup, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 4f96499382 011/166: DOC: expand README.org, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5c4aef50f2 041/166: Run `ninja install` as root in CI, ELPA Syncer, 2022/09/30