From 6eab93747210a3cdb21a20789db157ac61312b86 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 10 Dec 2022 13:07:05 +0200 Subject: [PATCH] Announce recent changes in NEW.org and bump version to 0.9.5 --- NEWS.org | 27 +++++++++++++++++++++++++++ README.org | 14 +++++++++++--- sweeprolog.el | 2 +- 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/NEWS.org b/NEWS.org index 8f785a5..244e91f 100644 --- a/NEWS.org +++ b/NEWS.org @@ -11,6 +11,33 @@ SWI-Prolog in Emacs. For further details, please consult the manual: . +* Version 0.9.5 on 2022-12-10 + +** ~sweeprolog-align-spaces~ now works also in comments + +You can now use ~sweeprolog-align-spaces~ (or ~cycle-spacing~ in Emacs +28+) to get the "right" amount of whitespace around the cursor +position inside comments. + +** Improved interaction with ~auto-fill-mode~ + +~sweeprolog-mode~ now customizes some settings related to text filling +to make ~auto-fill-mode~ work as expected with SWI-Prolog comments. + +** Fixes + +- In previous versions, using ~sweeprolog-predicate-location~ on a + loaded predicate would give precedence to the location from which a + predicate was loaded, even if its source file has since been + modified causing its location to differ. This behavior is fixed in + the current version, which means that ~M-.~ and friends should always + find the up-to-date location of predicate definitions. +- Fixed possible infinite loop in + ~sweeprolog-beginning-of-predicate-at-point~ near the beginning of the + buffer. This issue could be seen by calling + ~sweeprolog-document-predicate-at-point~ (~C-c C-d~) with point in the + first clause of the buffer. + * Version 0.9.4 on 2022-12-06 ** New minor mode for moving to holes with ~TAB~ diff --git a/README.org b/README.org index e3b19e9..9e338ca 100644 --- a/README.org +++ b/README.org @@ -904,6 +904,8 @@ information about =auto-insert= and its customization options, see :DESCRIPTION: Commands for adding documentation to Prolog predicate definitions :END: +#+CINDEX: document code +#+CINDEX: comments #+CINDEX: pldoc SWI-Prolog predicates can be documented with specially structured comments placed above the predicate definition, which are processed by @@ -926,9 +928,15 @@ and initial contents of the predicate documentation. =sweeprolog-document-predicate-at-point= leaves the cursor at the end of the newly inserted documentation comment for the user to extend or edit it if needed. To add another comment line, use =M-j= -(=comment-indent-new-line=) which starts a new line with the comment -prefix filled in. To reformat the current paragraph of =PlDoc= -comments, use =M-q= (=fill-paragraph=). +(=default-indent-new-line=) which starts a new line with the comment +prefix filled in. Emacs also has other powerful built-in features for +working with comments in code buffers that you can leverage to edit +=PlDoc= comments. For full details, see [[info:emacs#Comments][Manipulating Comments]]. +Furthermore you can make use of the rich support Emacs provides for +editing natural language text when working on =PlDoc= comments. For +example, to nicely format a paragraph of text, use ~M-q~ +(~fill-paragraph~). Many useful commands for editing text are +documented in [[info:emacs#Text][Commands for Human Languages]], which see. For more information about =PlDoc= and source documentation in SWI-Prolog, see [[https://www.swi-prolog.org/pldoc/doc_for?object=section(%27packages/pldoc.html%27)][the PlDoc manual]]. diff --git a/sweeprolog.el b/sweeprolog.el index a66b587..beeb080 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -6,7 +6,7 @@ ;; Maintainer: Eshel Yaron <~eshel/dev@lists.sr.ht> ;; Keywords: prolog languages extensions ;; URL: https://git.sr.ht/~eshel/sweep -;; Package-Version: 0.9.4 +;; Package-Version: 0.9.5 ;; Package-Requires: ((emacs "28.1")) ;; This file is NOT part of GNU Emacs. -- 2.39.2