[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog 4b4b28f15a 007/166: Add module descriptions to
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog 4b4b28f15a 007/166: Add module descriptions to sweep-find-module annotation function |
Date: |
Fri, 30 Sep 2022 04:59:21 -0400 (EDT) |
branch: elpa/sweeprolog
commit 4b4b28f15af817b2473fb7b053b210a580d47cba
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
Add module descriptions to sweep-find-module annotation function
---
sweep.el | 15 +++++++++++----
sweep.pl | 13 ++++++++++---
2 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/sweep.el b/sweep.el
index 76916377a4..88f6c99e5a 100644
--- a/sweep.el
+++ b/sweep.el
@@ -95,14 +95,16 @@ module name, F is a functor name and N is its arity."
(sweep-open-query "user" "sweep" "sweep_modules_collection" nil)
(let ((sol (sweep-next-solution)))
(sweep-close-query)
- (when (eq '! (car sol))
+ (when (or (eq (car sol) '!)
+ (eq (car sol) t))
(cdr sol))))
(defun sweep-module-path (mod)
(sweep-open-query "user" "sweep" "sweep_module_path" mod)
(let ((sol (sweep-next-solution)))
(sweep-close-query)
- (when (eq '! (car sol))
+ (when (or (eq (car sol) '!)
+ (eq (car sol) t))
(cdr sol))))
(defun sweep-read-module-name ()
@@ -111,8 +113,13 @@ module name, F is a functor name and N is its arity."
(completion-extra-properties
(list :annotation-function
(lambda (key)
- (concat (make-string (- 32 (length key)) ? )
- (cdr (assoc-string key col)))))))
+ (let* ((val (cdr (assoc-string key col)))
+ (pat (car val))
+ (des (cdr val)))
+ (concat (make-string (- 32 (length key)) ? )
+ (if des
+ (concat pat (make-string (- 64 (length pat)) ?
) des)
+ pat)))))))
(completing-read "Module: " col)))
(defun sweep-find-module (mod)
diff --git a/sweep.pl b/sweep.pl
index 5e90a744a6..57f20cfa7d 100644
--- a/sweep.pl
+++ b/sweep.pl
@@ -170,9 +170,16 @@ sweep_module_path_(Module, Path) :-
sweep_modules_collection([], Modules) :-
- findall([M|P], ( module_property(M0, file(P0)), atom_string(M0, M),
atom_string(P0, P) ), Modules0, Tail),
- setof([M|P], M0^P0^N^('$autoload':library_index(N, M0, P0),
string_concat(P0, ".pl", P), atom_string(M0, M) ), Tail),
- list_to_set(Modules0, Modules).
+ findall([M|P], ( module_property(M, file(P0)), atom_string(P0, P) ),
Modules0, Tail),
+ setof([M|P], P0^N^('$autoload':library_index(N, M, P0), string_concat(P0,
".pl", P) ), Tail),
+ list_to_set(Modules0, Modules1),
+ maplist(sweep_module_description, Modules1, Modules).
+
+sweep_module_description([M0|P], [M|[P|D]]) :-
+ pldoc_process:doc_comment(M0:module(D0), _, _, _),
+ atom_string(M0, M),
+ atom_string(D0, D).
+sweep_module_description([M0|P], [M|[P]]) :- atom_string(M0, M).
sweep_predicate_location(MFN, [Path|Line]) :-
term_string(M:F/N, MFN),
- [nongnu] elpa/sweeprolog d4a501e9af 020/166: PORT: use rpath linker option, (continued)
- [nongnu] elpa/sweeprolog d4a501e9af 020/166: PORT: use rpath linker option, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog b75179cc6e 022/166: Revert rpath tweaks, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 2f5dd9f13c 024/166: FIXED: Use more robust Prolog to C string conversion, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5f0f223318 023/166: Use LD_PRELOAD for testing, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog ea04f467b9 027/166: ADDED: sweep-pack-install for interactively installing packs, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 25bda86c48 032/166: Use load-file-path instead of custom hack, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog c5b1504ca8 033/166: ADDED: sweep-top-level command and appropriate mode, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog a06906287f 036/166: ADDED: sweep_funcall/2, 3 for calling Elisp functions from Prolog, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5b23e9819b 038/166: DOC: Add Prolog initialization section to the manual, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 4e4d8508cd 039/166: ENHANCED: Allow using swipl compiled with GMP, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 4b4b28f15a 007/166: Add module descriptions to sweep-find-module annotation function,
ELPA Syncer <=
- [nongnu] elpa/sweeprolog 0078ef8ff0 060/166: ENHANCED: syntax errors coloring, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog e38825d0e2 066/166: ENHANCED: use a distinct face for structured comments, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 84e6182685 077/166: FIXED: detect "|:" prompt in the top-level, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 6e5c822fc8 116/166: ADDED: sweep-colourise-buffer-on-idle user option, on by default, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog a7ce69558e 111/166: Makefile: Use "--batch" instead of "-batch" for consistency, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5b54d23b8b 086/166: ENHANCED: apply an appropriate face to global predicate calls, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog d9b8ffccda 107/166: ADDED: (sweep-mode-map): bind C-c C-o to sweep-find-file-at-point, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog ecc36d67e1 089/166: FIXED: handle some missing color terms, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog f72ebe6d62 127/166: ENHANCHED: automatic syntax aware autoindentation in sweep-mode, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog ccaa53a19c 147/166: DOC: update installation instruction to reflect inclusion in swipl, ELPA Syncer, 2022/09/30