]> git.eshelyaron.com Git - dict.git/log
dict.git
19 months agoAdd sweeprolog-view-news command and bump version to 0.14.0 V9.1.3-sweep-0.14.0
Eshel Yaron [Mon, 23 Jan 2023 09:07:22 +0000 (11:07 +0200)]
Add sweeprolog-view-news command and bump version to 0.14.0

* sweeprolog.el (sweeprolog-view-news): new command for viewing the
Sweep News file.

19 months agoDocument sweeprolog-file-at-point, file-name-at-point-functions
Eshel Yaron [Sun, 22 Jan 2023 20:04:15 +0000 (22:04 +0200)]
Document sweeprolog-file-at-point, file-name-at-point-functions

19 months ago* (sweeprolog-xref-project-source-files): add progress reporting
Eshel Yaron [Sun, 22 Jan 2023 19:05:01 +0000 (21:05 +0200)]
* (sweeprolog-xref-project-source-files): add progress reporting

19 months agodon't use file-name-split for compatibility with older Emacsen
Eshel Yaron [Sun, 22 Jan 2023 08:20:13 +0000 (10:20 +0200)]
don't use file-name-split for compatibility with older Emacsen

19 months ago* sweeprolog.el: capitalize "Sweep" in major mode names
Eshel Yaron [Sun, 22 Jan 2023 06:24:40 +0000 (08:24 +0200)]
* sweeprolog.el: capitalize "Sweep" in major mode names

19 months agoADDED: command to pipe output of Prolog goals to Emacs buffers
Eshel Yaron [Sun, 22 Jan 2023 06:13:15 +0000 (08:13 +0200)]
ADDED: command to pipe output of Prolog goals to Emacs buffers

* sweep.c (sweep_open_channel(), sweep_fd_open()): new helper
functions for obtaining Prolog streams from Emacs pipe buffers.
* sweep.pl (sweep_async_goal/2, sweep_interrupt_async_goal/2): new
predicates.
* sweeprolog.el (sweeprolog-async-goal): new command, executes a goal
in a separate thread and redirects its output to a buffer with mode..
(sweeprolog-async-goal-output-mode): new major mode, derived from
Compilation mode.
(sweeprolog-mode-map, sweeprolog-prefix-map, sweeprolog-menu): bind
sweeprolog-async-goal.
* README.org (Executing Prolog Asynchronously): new manual section.

19 months agoFIXED: possible race condition when signaling new top-level threads
Eshel Yaron [Sat, 21 Jan 2023 20:46:35 +0000 (22:46 +0200)]
FIXED: possible race condition when signaling new top-level threads

19 months agoAnnounce recent changes in NEWS.org and bump version to 0.13.0 V9.1.3-sweep-0.13.0
Eshel Yaron [Fri, 20 Jan 2023 19:47:47 +0000 (21:47 +0200)]
Announce recent changes in NEWS.org and bump version to 0.13.0

19 months agoENHANCED: consult with library index for finding predicate defs
Eshel Yaron [Fri, 20 Jan 2023 18:45:14 +0000 (20:45 +0200)]
ENHANCED: consult with library index for finding predicate defs

* sweep.pl (sweep_predicate_location_/4): also check library_index/3.
* sweeprolog-tests.el: add test for finding the source location of a
predicate in the package clib.

20 months agoexpose new arithmetic functions support in library(prolog_colour)
Eshel Yaron [Fri, 20 Jan 2023 11:50:55 +0000 (13:50 +0200)]
expose new arithmetic functions support in library(prolog_colour)

20 months agoFIXED: stale xref data when jumping across files with M-.
Eshel Yaron [Fri, 20 Jan 2023 11:49:51 +0000 (13:49 +0200)]
FIXED: stale xref data when jumping across files with M-.

20 months agoADDED: right-click context menus in sweeprolog-mode
Eshel Yaron [Thu, 19 Jan 2023 09:15:35 +0000 (11:15 +0200)]
ADDED: right-click context menus in sweeprolog-mode

* sweeprolog.el (sweeprolog-context-menu-find-module)
(sweeprolog-context-menu-find-module-other-window)
(sweeprolog-context-menu-describe-module)
(sweeprolog-context-menu-find-file)
(sweeprolog-context-menu-find-file-other-window)
(sweeprolog-context-menu-describe-predicate): new commands, add to context menus by...
(sweeprolog-context-menu-for-predicate)
(sweeprolog-context-menu-for-module)
(sweeprolog-context-menu-for-file): new functions, used in...
(sweeprolog-context-menu-functions): new abnormal hook, used by...
(sweeprolog-context-menu-function): new function.
(sweeprolog-mode): add it to context-menu-functions.

* README.org (Context Menu): new section.

20 months agoAnnounce recent changes in NEWS.org and bump version to 0.12.0 V9.1.3-sweep-0.12.0
Eshel Yaron [Mon, 16 Jan 2023 21:12:24 +0000 (23:12 +0200)]
Announce recent changes in NEWS.org and bump version to 0.12.0

20 months agoADDED: short description for tokens on mouse hover (help-echo)
Eshel Yaron [Mon, 16 Jan 2023 19:02:03 +0000 (21:02 +0200)]
ADDED: short description for tokens on mouse hover (help-echo)

* sweep.pl (sweep_predicate_dependencies/2): new predicate.
* sweeprolog.el (sweeprolog-enable-help-echo): new user-option, when
non-nil sweeprolog-analyze-region-start-hook and
sweeprolog-analyze-region-fragment-hook are extended with...
(sweeprolog-analyze-start-help-echo)
(sweeprolog-analyze-fragment-help-echo): new functions, manage the
help-echo text property for Prolog text.
* README.org ("Hover for Help"): new section about help-echo.

20 months agoENHANCED: improve semantic highlighting for several constructs
Eshel Yaron [Mon, 16 Jan 2023 18:58:31 +0000 (20:58 +0200)]
ENHANCED: improve semantic highlighting for several constructs

* sweep.pl (sweep_color_normalized_/4): fix handling of non-callable
terms, propagate type error expected type to Elisp.
(sweeprolog_goal_kind_normalized/2): rename to...
(sweep_goal_kind_normalized/2): normalize all goal and head classes.
* sweeprolog.el (sweeprolog-analyze-fragment-to-faces): adapt to new
info from sweep_goal_kind_normalized/2, and highlight some missing
token kinds.

20 months agoAnnounce recent changes in NEWS.org and bump version to 0.11.3 V9.1.3-sweep-0.11.3
Eshel Yaron [Sun, 15 Jan 2023 12:35:45 +0000 (14:35 +0200)]
Announce recent changes in NEWS.org and bump version to 0.11.3

20 months ago* README.org ("Initialization and Cleanup"): improve listings
Eshel Yaron [Sun, 15 Jan 2023 09:36:45 +0000 (11:36 +0200)]
* README.org ("Initialization and Cleanup"): improve listings

20 months ago* README.org: use ~code~ over =verbatim= more consistently
Eshel Yaron [Sat, 14 Jan 2023 20:36:00 +0000 (22:36 +0200)]
* README.org: use ~code~ over =verbatim= more consistently

20 months ago* README.org ("High-level Architecture"): fix out-of-date docs
Eshel Yaron [Sat, 14 Jan 2023 20:34:50 +0000 (22:34 +0200)]
* README.org ("High-level Architecture"): fix out-of-date docs

20 months ago* README.org ("Initialization and Cleanup"): use title case
Eshel Yaron [Sat, 14 Jan 2023 20:32:39 +0000 (22:32 +0200)]
* README.org ("Initialization and Cleanup"): use title case

20 months ago* README.org ("Querying Prolog"): improve function listing
Eshel Yaron [Sat, 14 Jan 2023 20:31:25 +0000 (22:31 +0200)]
* README.org ("Querying Prolog"): improve function listing

20 months ago* (sweeprolog-prefix-map): bind sweeprolog-top-level-send-goal to q
Eshel Yaron [Sat, 14 Jan 2023 09:47:14 +0000 (11:47 +0200)]
* (sweeprolog-prefix-map): bind sweeprolog-top-level-send-goal to q

20 months agoDOC: improve listings in the "Editing Prolog Code" section
Eshel Yaron [Sat, 14 Jan 2023 09:07:19 +0000 (11:07 +0200)]
DOC: improve listings in the "Editing Prolog Code" section

20 months agoBind C-c S-TAB to sweeprolog-backward-hole for symmetry
Eshel Yaron [Sat, 14 Jan 2023 07:07:02 +0000 (09:07 +0200)]
Bind C-c S-TAB to sweeprolog-backward-hole for symmetry

20 months agoAdd a couple of missing docstrings
Eshel Yaron [Sat, 14 Jan 2023 07:05:58 +0000 (09:05 +0200)]
Add a couple of missing docstrings

* sweeprolog.el
(sweeprolog-read-predicate-documentation-with-holes)
(sweeprolog-read-predicate-documentation-default-function): add
docstrings.

20 months ago* sweeprolog.el: fix some typos in docstrings
Eshel Yaron [Sat, 14 Jan 2023 07:05:20 +0000 (09:05 +0200)]
* sweeprolog.el: fix some typos in docstrings

20 months agoRefer to Sweep as a whole as "Sweep" without verbatim format
Eshel Yaron [Thu, 12 Jan 2023 19:20:42 +0000 (21:20 +0200)]
Refer to Sweep as a whole as "Sweep" without verbatim format

20 months agoADDED: command for sending a goal to top-level from any buffer
Eshel Yaron [Thu, 12 Jan 2023 11:27:17 +0000 (13:27 +0200)]
ADDED: command for sending a goal to top-level from any buffer

* sweeprolog.el (sweeprolog-top-level): extract buffer setup logic to...
(sweeprolog-top-level-buffer): new function.
(sweeprolog-top-level-send-string): new function, used by...
(sweeprolog-top-level-send-goal): new command, reads a goal from the
minibuffer and sends it to a Prolog top-level buffer.
(sweeprolog-mode-map): bind it to C-c C-q.
(sweeprolog-menu): add "Send Goal to Top-level" entry.
* README.org ("Sending Goals to the Top-level"): new manual section.

20 months agoSupport completion when reading a goal from the minibuffer
Eshel Yaron [Thu, 12 Jan 2023 11:22:21 +0000 (13:22 +0200)]
Support completion when reading a goal from the minibuffer

* sweeprolog.el (sweeprolog-read-goal-map): new keymap, derived from
sweeprolog-read-term-map.
(sweeprolog-goals-at-point): new function, similar to
sweeprolog-terms-at-point but only returns goal terms.
(sweeprolog-read-goal): use them.

20 months agoDOC: explain how to follow source locations in top-level messages V9.1.3
Eshel Yaron [Sun, 8 Jan 2023 14:39:11 +0000 (16:39 +0200)]
DOC: explain how to follow source locations in top-level messages

20 months agoMODIFIED: do not force set next-error buffer to Prolog buffer
Eshel Yaron [Sun, 8 Jan 2023 14:35:52 +0000 (16:35 +0200)]
MODIFIED: do not force set next-error buffer to Prolog buffer

20 months agoAnnounce recent changes in NEWS.org and bump version 0.11.1 V9.1.2-sweep-0.11.2
Eshel Yaron [Sat, 7 Jan 2023 06:33:07 +0000 (08:33 +0200)]
Announce recent changes in NEWS.org and bump version 0.11.1

20 months agoENHANCED: use terms at point as "future history" for term-search
Eshel Yaron [Sat, 7 Jan 2023 06:20:01 +0000 (08:20 +0200)]
ENHANCED: use terms at point as "future history" for term-search

* sweep.pl (sweep_terms_at_point/2): new predicate.
* sweeprolog.el (sweeprolog-terms-at-point): new function.
(sweeprolog-read-term): use it for setting the future history.
(sweeprolog-read-goal): new function.
(sweeprolog-term-search): use it for reading a goal when called with
prefix argument.

20 months agoAnnounce recent changes in NEWS.org and bump version to 0.11.1 V9.1.2-sweep-0.11.1
Eshel Yaron [Fri, 6 Jan 2023 09:51:06 +0000 (11:51 +0200)]
Announce recent changes in NEWS.org and bump version to 0.11.1

20 months agoENHANCED: Support refining term searches with arbitrary goals
Eshel Yaron [Fri, 6 Jan 2023 07:16:33 +0000 (09:16 +0200)]
ENHANCED: Support refining term searches with arbitrary goals

* sweep.pl (sweep_term_search/2): extend with an extra goal argument.
* sweeprolog.el (sweeprolog-read-term): new function, similar to
read--expression but for Prolog terms rather than Elisp expressions.
(sweeprolog-term-search): use it, and prompt for goal with prefix arg.

20 months agoAnnounce recent changes in NEWS.org and bump version to 0.11.0 V9.1.2-sweep-0.11.0
Eshel Yaron [Thu, 5 Jan 2023 11:30:34 +0000 (13:30 +0200)]
Announce recent changes in NEWS.org and bump version to 0.11.0

20 months agoENHANCED: restore original point when a term search is quit
Eshel Yaron [Thu, 5 Jan 2023 11:08:21 +0000 (13:08 +0200)]
ENHANCED: restore original point when a term search is quit

20 months ago* sweep.pl (list_tail/2): Fix possible non-termination
Eshel Yaron [Wed, 4 Jan 2023 08:06:37 +0000 (10:06 +0200)]
* sweep.pl (list_tail/2): Fix possible non-termination

20 months agoADDED: command for finding terms subsumed by a given term
Eshel Yaron [Tue, 3 Jan 2023 22:22:34 +0000 (00:22 +0200)]
ADDED: command for finding terms subsumed by a given term

* sweep.pl (sweep_term_search/2): new predicate.
* sweeprolog.el (sweeprolog-term-search-in-buffer): new function.
(sweeprolog-term-search): new command.
* README.org ("Term Search"): new manual section.

20 months agoFIXED: find next predicate definition more reliably
Eshel Yaron [Sun, 1 Jan 2023 20:17:22 +0000 (22:17 +0200)]
FIXED: find next predicate definition more reliably

* sweep.pl (sweeprolog_beginning_of_last_predicate/2)
(sweeprolog_beginning_of_last_predicate/2): explicitly sort results,
don't assume xref_defined/3 yields ordered results.

20 months agoAnnounce recent changes in NEWS.org and bump version to 0.10.1 V9.1.2-sweep-0.10.1
Eshel Yaron [Sun, 1 Jan 2023 15:11:39 +0000 (17:11 +0200)]
Announce recent changes in NEWS.org and bump version to 0.10.1

20 months agoUpdate copyright year
Eshel Yaron [Sun, 1 Jan 2023 13:46:33 +0000 (15:46 +0200)]
Update copyright year

20 months agoADDED: user option to control predicate documentation composition
Eshel Yaron [Sun, 1 Jan 2023 12:32:01 +0000 (14:32 +0200)]
ADDED: user option to control predicate documentation composition

* sweeprolog.el
(sweeprolog-insert-pldoc-for-predicate): remove in favor of...
(sweeprolog-insert-predicate-documentation): new function.
 (sweeprolog-format-term-with-holes): new utility
function, used by...
(sweeprolog-read-predicate-documentation-with-holes)
(sweeprolog-read-predicate-documentation-default-function): new
functions, used for...
(sweeprolog-read-predicate-documentation-function): new user option,
used by...
(sweeprolog-read-predicate-documentation): new function, used by...
(sweeprolog-document-predicate-at-point): refactor.

20 months agoAvoid excessive analysis in presence of unbalanced quotes
Eshel Yaron [Sat, 31 Dec 2022 11:10:17 +0000 (13:10 +0200)]
Avoid excessive analysis in presence of unbalanced quotes

* sweeprolog.el (sweeprolog-analyze-fragment-fullstop): new function,
adds a dedicated text property to fullstops.
(sweeprolog-analyze-region-fragment-hook): add it.
(sweeprolog-at-fullstop-p)
(sweeprolog-end-of-last-fullstop, sweeprolog-end-of-next-fullstop):
new functions.
(sweeprolog-end-of-top-term): use them for restricting to region
between last fullstop and next fullstop.

20 months agoFix some typos in the manual section about holes
Eshel Yaron [Sun, 25 Dec 2022 18:54:21 +0000 (20:54 +0200)]
Fix some typos in the manual section about holes

20 months agoAnnounce recent changes in NEWS.org and bump version to 0.10.0 V9.1.2-sweep-0.10.0
Eshel Yaron [Sun, 25 Dec 2022 17:53:38 +0000 (19:53 +0200)]
Announce recent changes in NEWS.org and bump version to 0.10.0

20 months agoADDED: New command sweeprolog-insert-term-with-holes
Eshel Yaron [Thu, 22 Dec 2022 14:51:47 +0000 (16:51 +0200)]
ADDED: New command sweeprolog-insert-term-with-holes

* sweep.pl (sweep_format_term/2, sweep_current_functors/2): new
predicates.
* sweeprolog.el (sweeprolog-read-functor-history): new variable,
history list for...
(sweeprolog-read-functor): new function.
(sweeprolog-forward-hole-repeat-mode): rename to...
(sweeprolog-forward-hole-repeat-map): corrected name for keymap.
(sweeprolog-analyze-end-font-lock): don't rely on
sweeprolog--next-hole to move point.
(sweeprolog-at-hole-p, sweeprolog-beginning-of-hole)
(sweeprolog-end-of-hole): new functions, used by...
(sweeprolog--previous-hole, sweeprolog--next-hole): revise.
(sweeprolog--precedence-at-point): new function, used by...
(sweeprolog-insert-term-with-holes): new command.
(sweeprolog-mode-map): bind it to C-c C-m
* sweeprolog-tests: test it.
* README.org ("Filling Holes"): move to top and rename to...
("Holes"): document sweeprolog-insert-term-with-holes.

20 months agoENHANCED: use variable names from docs when inserting next clause
Eshel Yaron [Wed, 21 Dec 2022 20:41:59 +0000 (22:41 +0200)]
ENHANCED: use variable names from docs when inserting next clause

* sweep.pl (sweep_format_head/2): new predicate.
* sweeprolog.el (sweeprolog-insert-clause): use it.

20 months agoImprove sweeprolog-menu entry names
Eshel Yaron [Wed, 21 Dec 2022 18:21:24 +0000 (20:21 +0200)]
Improve sweeprolog-menu entry names

* sweeprolog.el (sweeprolog-info-manual): new function.
(sweeprolog-menu): add it, improve entry names.

20 months agoENHANCED: highlight holes in incomplete terms
Eshel Yaron [Wed, 21 Dec 2022 17:51:48 +0000 (19:51 +0200)]
ENHANCED: highlight holes in incomplete terms

* sweeprolog.el (sweeprolog-predicate-completion-at-point): fontify
holes when inserting them.
(sweeprolog-analyze-start-font-lock): reset font-lock-face in analyzed
region.
(sweeprolog-analyze-fragment-to-faces): fix syntax error handling,
don't highlight holes as it is done by...
(sweeprolog-analyze-end-font-lock): new function, highlights holes in
analyzed region when sweeprolog-highlight-holes is non-nil.
(sweeprolog-analyze-region-end-hook): add it.
(sweeprolog--hole): fix text property used for setting stickiness.

21 months agoFIXED: possible crash after calling sweeprolog-restart
Eshel Yaron [Sun, 18 Dec 2022 11:41:16 +0000 (13:41 +0200)]
FIXED: possible crash after calling sweeprolog-restart

21 months ago* (sweeprolog-menu): add entry for sweeprolog-infer-indent-style
Eshel Yaron [Sun, 18 Dec 2022 11:40:05 +0000 (13:40 +0200)]
* (sweeprolog-menu): add entry for sweeprolog-infer-indent-style

21 months agoDuplicate LaTeX label. V9.1.2
Jan Wielemaker [Sun, 18 Dec 2022 15:34:14 +0000 (16:34 +0100)]
Duplicate LaTeX label.

21 months agoAnnounce recent changes in NEW.org and bump version to 0.9.6 V9.0.3 V9.1.1-sweep-0.9.6
Eshel Yaron [Sat, 17 Dec 2022 14:47:37 +0000 (16:47 +0200)]
Announce recent changes in NEW.org and bump version to 0.9.6

21 months ago* README.org: refine a couple of ALT_TITLEs
Eshel Yaron [Sat, 17 Dec 2022 14:32:24 +0000 (16:32 +0200)]
* README.org: refine a couple of ALT_TITLEs

21 months agoAdd short titles to all manual nodes to act as menu items
Eshel Yaron [Sat, 17 Dec 2022 06:01:12 +0000 (08:01 +0200)]
Add short titles to all manual nodes to act as menu items

21 months agoADDED: new command sweeprolog-infer-indent-style
Eshel Yaron [Sat, 17 Dec 2022 05:58:43 +0000 (07:58 +0200)]
ADDED: new command sweeprolog-infer-indent-style

* sweeprolog.el (sweeprolog-infer-indent-style): new command.
* sweeprolog-tests.el: test it.
* README.org ("Indentation"): mention it.

21 months agoUse indent-to instead manually indenting with spaces
Eshel Yaron [Fri, 16 Dec 2022 22:02:33 +0000 (00:02 +0200)]
Use indent-to instead manually indenting with spaces

* sweeprolog.el (sweeprolog-indent-line): use indent-to.
(sweeprolog-indent-offset): tweak docstring.
(sweeprolog-indent-line-after-prefix): use it instead of hard-coded
offset.
(sweeprolog-export-predicate): don't override indent-tabs-mode.

21 months ago* (sweeprolog-indent-or-forward-hole): simplify
Eshel Yaron [Mon, 12 Dec 2022 18:01:05 +0000 (20:01 +0200)]
* (sweeprolog-indent-or-forward-hole): simplify

21 months agoAnnounce recent changes in NEW.org and bump version to 0.9.5 V9.1.1-sweep-0.9.5
Eshel Yaron [Sat, 10 Dec 2022 11:07:05 +0000 (13:07 +0200)]
Announce recent changes in NEW.org and bump version to 0.9.5

21 months ago* (sweeprolog-mode): enable comment-multi-line
Eshel Yaron [Sat, 10 Dec 2022 10:03:20 +0000 (12:03 +0200)]
* (sweeprolog-mode): enable comment-multi-line

21 months ago* (sweeprolog-mode): Improve interaction with auto-fill-mode
Eshel Yaron [Sat, 10 Dec 2022 07:35:41 +0000 (09:35 +0200)]
* (sweeprolog-mode): Improve interaction with auto-fill-mode

21 months ago* (sweeprolog-beginning-of-predicate-at-point): fix hang near bob
Eshel Yaron [Sat, 10 Dec 2022 06:28:44 +0000 (08:28 +0200)]
* (sweeprolog-beginning-of-predicate-at-point): fix hang near bob

21 months ago* (sweeprolog-align-spaces): extend to also work in comments
Eshel Yaron [Fri, 9 Dec 2022 15:10:02 +0000 (17:10 +0200)]
* (sweeprolog-align-spaces): extend to also work in comments

21 months agoFIXED: stale predicate locations in loaded modified buffers
Eshel Yaron [Thu, 8 Dec 2022 20:10:04 +0000 (22:10 +0200)]
FIXED: stale predicate locations in loaded modified buffers

* sweep.pl (sweep_predicate_location_/2,3): prefer xref over loaded
predicate properties.
* sweeprolog.el (sweeprolog-predicate-location): first analyze buffer
if modified to update xref data.

21 months agoAnnounce recent changes in NEWS.org and bump version to 0.9.4 V9.1.1-sweep-0.9.4
Eshel Yaron [Tue, 6 Dec 2022 19:50:08 +0000 (21:50 +0200)]
Announce recent changes in NEWS.org and bump version to 0.9.4

21 months agoUse built-in file_autoload_directives/3 to update deps V9.0.1 V9.0.2 V9.1.1
Eshel Yaron [Sun, 4 Dec 2022 17:09:30 +0000 (19:09 +0200)]
Use built-in file_autoload_directives/3 to update deps

* sweep.pl (sweep_file_missing_dependencies/2): new predicate.
* sweeprolog.el (sweeprolog-update-dependencies): use it.
* sweeprolog-tests.el: add another test case for
sweeprolog-update-dependencies.

21 months ago* README.org ("Filling Holes"): improve indexing
Eshel Yaron [Sun, 4 Dec 2022 16:14:52 +0000 (18:14 +0200)]
* README.org ("Filling Holes"): improve indexing

21 months ago* (sweeprolog--ensure-module): detect and report missing sweep.pl
Eshel Yaron [Sat, 3 Dec 2022 18:13:20 +0000 (20:13 +0200)]
* (sweeprolog--ensure-module): detect and report missing sweep.pl

21 months agoADDED: ability to pass command line args directly to swipl
Eshel Yaron [Sat, 3 Dec 2022 16:09:18 +0000 (18:09 +0200)]
ADDED: ability to pass command line args directly to swipl

* sweeprolog.el (sweeprolog-handle-command-line-args): new function,
sets up command line argument handling using...
(sweeprolog-command-line-function): new function.

21 months agoADDED: minor mode for moving to the next hole with TAB
Eshel Yaron [Fri, 2 Dec 2022 11:41:32 +0000 (13:41 +0200)]
ADDED: minor mode for moving to the next hole with TAB

* sweeprolog.el (sweeprolog-forward-hole-on-tab-mode): new minor mode,
binding TAB to...
(sweeprolog-indent-or-forward-hole): new command.
* README.org ("Filling Holes"): rephrase and mention new minor mode.

21 months agoENHANCED: indentation after infix operators
Eshel Yaron [Fri, 2 Dec 2022 09:47:58 +0000 (11:47 +0200)]
ENHANCED: indentation after infix operators

* sweeprolog.el (sweeprolog-indent-line-after-infix): adhere to last line
indentation even if non-standard, handle DCG RHS contexts and SSU
guards.
* sweeprolog-tests.el: add more tests for indentation.

21 months ago* (sweeprolog-identifier-at-point): reliably qualify local heads
Eshel Yaron [Wed, 30 Nov 2022 18:45:45 +0000 (20:45 +0200)]
* (sweeprolog-identifier-at-point): reliably qualify local heads

21 months agoAnnounce recent changes in NEWS.org and bump version to 0.9.3 V9.1.0-sweep-0.9.3
Eshel Yaron [Sun, 27 Nov 2022 19:44:52 +0000 (21:44 +0200)]
Announce recent changes in NEWS.org and bump version to 0.9.3

21 months agoAdd test for predicate completion with named arguments
Eshel Yaron [Sun, 27 Nov 2022 19:34:32 +0000 (21:34 +0200)]
Add test for predicate completion with named arguments

21 months agoENHANCED: use argument names for holes in predicate completion
Eshel Yaron [Sun, 27 Nov 2022 19:08:14 +0000 (21:08 +0200)]
ENHANCED: use argument names for holes in predicate completion

* sweep.pl (predicate_argument_names/2): new predicate.
(sweep_format_predicate/2): use it, and revise into...
(sweep_format_predicate/4): new predicate.
(sweep_predicate_completion_candidates): use it.

21 months ago* (sweeprolog-analyze-fragment-flymake): fix typo
Eshel Yaron [Sun, 27 Nov 2022 19:07:31 +0000 (21:07 +0200)]
* (sweeprolog-analyze-fragment-flymake): fix typo

21 months agoAdd repeat keymap for sweeprolog-forward-hole
Eshel Yaron [Sat, 26 Nov 2022 16:18:35 +0000 (18:18 +0200)]
Add repeat keymap for sweeprolog-forward-hole

* sweeprolog.el (sweeprolog-backward-hole): new command.
(sweeprolog-forward-hole-repeat-mode): new repeat keymap.

21 months ago* README.org ("Things To Do"): remove outdated item
Eshel Yaron [Sat, 26 Nov 2022 16:15:04 +0000 (18:15 +0200)]
* README.org ("Things To Do"): remove outdated item

21 months agoAnnounce recent changes in NEWS.org and bump version to 0.9.2 V9.1.0-sweep-0.9.2
Eshel Yaron [Sat, 26 Nov 2022 14:25:41 +0000 (16:25 +0200)]
Announce recent changes in NEWS.org and bump version to 0.9.2

21 months agoADDED: make flymake optionally complain about implicit autoloads
Eshel Yaron [Sat, 26 Nov 2022 14:10:04 +0000 (16:10 +0200)]
ADDED: make flymake optionally complain about implicit autoloads

* sweeprolog.el (sweeprolog-note-implicit-autoloads): new user-option.
(sweeprolog-analyze-fragment-flymake): use it.
* README.org ("Managing Dependencies"): mention it.

21 months ago* README.org: ("Managing Dependencies"): new section.
Eshel Yaron [Sat, 26 Nov 2022 13:51:25 +0000 (15:51 +0200)]
* README.org: ("Managing Dependencies"): new section.

21 months agoADDED: new command for updating use_module/autoload directives
Eshel Yaron [Sat, 26 Nov 2022 13:29:48 +0000 (15:29 +0200)]
ADDED: new command for updating use_module/autoload directives

* sweep.pl (sweep_file_path_in_library/2): new predicate.
(sweep_color_normalized/3): normalize autoload source paths.
* sweeprolog.el (sweeprolog-analyze-buffer-with): new helper function.
(sweeprolog-update-dependencies): new command.

21 months agoAnnounce recent changes in NEWS.org and bump version to 0.9.1 V9.1.0-sweep-0.9.1
Eshel Yaron [Fri, 25 Nov 2022 21:31:32 +0000 (23:31 +0200)]
Announce recent changes in NEWS.org and bump version to 0.9.1

21 months agoAdjust arity of predicates according to completion context
Eshel Yaron [Fri, 25 Nov 2022 21:01:40 +0000 (23:01 +0200)]
Adjust arity of predicates according to completion context

* sweep.pl (sweep_context_callable): track required arity adjustment.
(sweep_predicate_completion_candidates): take arity difference as
argument, adjust and filter candidates according to it.
* sweeprolog.el (sweeprolog-predicate-completion-at-point): use it.
* sweeprolog-tests.el: test it.

21 months agoRecognize and highlight XPCE string comments as docstrings
Eshel Yaron [Fri, 25 Nov 2022 14:39:09 +0000 (16:39 +0200)]
Recognize and highlight XPCE string comments as docstrings

* sweeprolog.el (sweeprolog-analyze-fragment-to-faces): recognize
string comments.

21 months agoRecognize and highlight built-in predicate definitions
Eshel Yaron [Fri, 25 Nov 2022 10:50:21 +0000 (12:50 +0200)]
Recognize and highlight built-in predicate definitions

* sweeprolog.el (sweeprolog-analyze-fragment-to-faces): recognize
"def_swi" and "def_iso" predicate head kinds .

21 months agoDo not highlight other occurrences of anonymous variables
Eshel Yaron [Fri, 25 Nov 2022 10:44:47 +0000 (12:44 +0200)]
Do not highlight other occurrences of anonymous variables

* sweeprolog.el (sweeprolog-analyze-fragment-variable): check for
anonymous variables ("_").

21 months agoFix typos in README.org
Eshel Yaron [Fri, 25 Nov 2022 10:44:09 +0000 (12:44 +0200)]
Fix typos in README.org

21 months agoAnnounce recent changes in NEWS.org and bump version to 0.9.0 V8.5.20-sweep-0.9.0 V9.0.0 V9.1.0
Eshel Yaron [Wed, 23 Nov 2022 19:40:38 +0000 (21:40 +0200)]
Announce recent changes in NEWS.org and bump version to 0.9.0

21 months agoADDED: PlUnit tests block skeleton and command for inserting it
Eshel Yaron [Wed, 23 Nov 2022 19:25:39 +0000 (21:25 +0200)]
ADDED: PlUnit tests block skeleton and command for inserting it

* sweeprolog.el (sweeprolog-format-string-as-atom): new function.
(sweeprolog-module-header-skeleton): use define-skeleton, making it a
command instead of a defconst.
(sweeprolog-plunit-testset-skeleton): new skeleton and command.
* sweeprolog-tests: test it.
* README.org ("Writing Tests"): new section.
("Using templates for creating new modules"): rename to "Creating New
Modules".

21 months ago* (sweeprolog-beginning-of-next-top-term): revise and add tests
Eshel Yaron [Wed, 23 Nov 2022 15:55:35 +0000 (17:55 +0200)]
* (sweeprolog-beginning-of-next-top-term): revise and add tests

21 months agoBump version to 0.8.13 (bug fix release) V8.5.20-sweep-0.8.13
Eshel Yaron [Wed, 23 Nov 2022 08:41:05 +0000 (10:41 +0200)]
Bump version to 0.8.13 (bug fix release)

21 months agoFIXED: instantiation error in color term normalization
Eshel Yaron [Wed, 23 Nov 2022 08:40:12 +0000 (10:40 +0200)]
FIXED: instantiation error in color term normalization

21 months agoAnnounce recent changes in NEWS.org and bump version to 0.8.12 V8.5.20-sweep-0.8.12
Eshel Yaron [Tue, 22 Nov 2022 19:54:10 +0000 (21:54 +0200)]
Announce recent changes in NEWS.org and bump version to 0.8.12

21 months agoNew user-option to controlling highlighting of holes
Eshel Yaron [Tue, 22 Nov 2022 18:42:48 +0000 (20:42 +0200)]
New user-option to controlling highlighting of holes

* sweeprolog.el (sweeprolog-highlight-holes): new user-option.
(sweeprolog-analyze-fragment-to-faces): respect it.

21 months agoHandle module-qualification in next-clause insertion
Eshel Yaron [Tue, 22 Nov 2022 18:14:46 +0000 (20:14 +0200)]
Handle module-qualification in next-clause insertion

* sweeprolog.el (sweeprolog-definition-at-point): also return module
name when the head term is qualified.
(sweeprolog-maybe-insert-next-clause): pass module name to...
(sweeprolog-insert-clause): new argument module.
* sweeprolog-tests.el: add a couple of relevant test cases.

21 months ago* (sweeprolog-hole-face): new face for highlighting holes
Eshel Yaron [Tue, 22 Nov 2022 14:24:12 +0000 (16:24 +0200)]
* (sweeprolog-hole-face): new face for highlighting holes

21 months agoFIXED: sweeprolog-beginning-of-next-top-term: other possible loop
Eshel Yaron [Tue, 22 Nov 2022 10:59:41 +0000 (12:59 +0200)]
FIXED: sweeprolog-beginning-of-next-top-term: other possible loop

* sweeprolog.el (sweeprolog-beginning-of-next-top-term): don't loop
when called in the last term of the buffer
* sweeprolog-tests.el (beginning-of-next-top-term-at-last-clause): new
test case

21 months ago* (sweeprolog-top-level-mode-map): bind sweeprolog-forward-hole
Eshel Yaron [Tue, 22 Nov 2022 09:37:10 +0000 (11:37 +0200)]
* (sweeprolog-top-level-mode-map): bind sweeprolog-forward-hole