[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog 8d7379f786 4/4: DOC: document sweeprolog-xref-p
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog 8d7379f786 4/4: DOC: document sweeprolog-xref-project-source-files in the manual |
Date: |
Thu, 10 Nov 2022 14:59:32 -0500 (EST) |
branch: elpa/sweeprolog
commit 8d7379f7861c475317e0b099d42fde6890d1841d
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
DOC: document sweeprolog-xref-project-source-files in the manual
---
NEWS.org | 17 ++++++++++++++++-
README.org | 30 ++++++++++++++++++++++++++++++
sweeprolog.el | 5 +++--
3 files changed, 49 insertions(+), 3 deletions(-)
diff --git a/NEWS.org b/NEWS.org
index 62a84556b7..8a30a5f380 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -11,6 +11,22 @@ SWI-Prolog in Emacs.
For further details, please consult the manual:
<https://eshelyaron.com/sweep.html>.
+* Version 0.8.5 on 2022-11-10
+
+** New command ~sweeprolog-xref-project-source-files~
+
+This command updates ~sweep~'s cross reference data for all Prolog
+source files in the current project. Bound to ~X~ in
+~sweeprolog-prefix-map~.
+
+** Minor bug fixed
+
+- Fixed issue where ~sweeprolog-predicate-location~ sometimes returned a
+ file importing the predicate in question, rather than actually
+ defining it.
+- Fixed issue where the ~kill-buffer-hook~ of top-level buffers would
+ throw an error when the corresponding top-level thread already died.
+
* Version 0.8.4 on 2022-11-09
** Various bug fixes
@@ -22,7 +38,6 @@ For further details, please consult the manual:
immediately when the error is fixed (e.g. a fullstop is inserted at
the end of a clause).
-
* Version 0.8.3 on 2022-11-07
** New commands that operate on entire predicate definitions
diff --git a/README.org b/README.org
index 7baf76aa8b..1220b1b3cf 100644
--- a/README.org
+++ b/README.org
@@ -665,7 +665,9 @@ directly:
:DESCRIPTION: Commands for finding cross-references for Prolog predicates
:END:
+#+CINDEX: cross reference
#+CINDEX: xref
+#+KINDEX: M-.
=sweeprolog-mode= integrates with the Emacs =xref= API to facilitate quick
access to predicate definitions and references in Prolog code buffers.
This enables the many commands that the =xref= interface provides, like
@@ -674,12 +676,23 @@ This enables the many commands that the =xref= interface
provides, like
commands.
#+CINDEX: imenu
+#+KINDEX: M-g i
=sweeprolog-mode= also integrates with Emacs's =imenu=, which provides a simple
facility for looking up and jumping to definitions in the current
buffer. To jump to a definition in the current buffer, type =M-x imenu=
(bound by default to =M-g i= in Emacs version 29). For information
about customizing =imenu=, see [[info:emacs#Imenu][Imenu in the Emacs manual]].
+#+FINDEX: sweeprolog-xref-project-source-files
+#+KINDEX: M-?
+The command ~M-x sweeprolog-xref-project-source-files~ can be used to
+update ~sweep~'s cross reference data for all Prolog source files in the
+current project, as determined by the function ~project-current~ (see
+[[info:emacs#Projects][Projects in the Emacs manual]]). When searching for
references to
+Prolog predicates with ~M-?~ (~xref-find-references~), this command is
+invoked implicitly to ensure up to date references are found
+throughout the current project.
+
** Predicate definition boundaries
:PROPERTIES:
:CUSTOM_ID: predicate-boundaries
@@ -1284,6 +1297,23 @@ As an example, with the above binding the =sweep=
top-level can be
accessed from anywhere with =C-c p t=, which invokes the command
=sweeprolog-top-level=.
+The full list of keybindings in ~sweeprolog-prefix-map~ is given below:
+
+| Key | Command | Documentation
|
+|-----+--------------------------------------+-----------------------------------|
+| ~F~ | ~sweeprolog-set-prolog-flag~ | [[*Setting Prolog
flags][Setting Prolog Flags]] |
+| ~P~ | ~sweeprolog-pack-install~ | [[*Installing Prolog
packages][Installing Prolog packages]] |
+| ~R~ | ~sweeprolog-restart~ | [[*Prolog initialization
and cleanup][Prolog Initialization and Cleanup]] |
+| ~T~ | ~sweeprolog-list-top-levels~ | [[#top-level-menu][The
Top-level Menu Buffer]] |
+| ~X~ | ~sweeprolog-xref-project-source-files~ |
[[#sweeprolog-xref][Definitions and References]] |
+| ~e~ | ~sweeprolog-view-messages~ |
[[#prolog-messages][Examining Prolog Messages]] |
+| ~h p~ | ~sweeprolog-describe-predicate~ | [[#prolog-help][Prolog
Help]] |
+| ~h m~ | ~sweeprolog-describe-module~ | [[*Prolog Help][Prolog
Help]] |
+| ~l~ | ~sweeprolog-load-buffer~ | [[#loading-buffers][Loading
Buffers]] |
+| ~m~ | ~sweeprolog-find-module~ |
[[#finding-prolog-code][Finding Prolog Code]] |
+| ~p~ | ~sweeprolog-find-predicate~ | [[*Finding Prolog
code][Finding Prolog Code]] |
+| ~t~ | ~sweeprolog-top-level~ | [[#prolog-top-level][The
Prolog Top-level]] |
+
* Examining Prolog messages
:PROPERTIES:
:CUSTOM_ID: prolog-messages
diff --git a/sweeprolog.el b/sweeprolog.el
index 03db2c6917..2c9d777a66 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.8.4
+;; Package-Version: 0.8.5
;; Package-Requires: ((emacs "28.1"))
;; This file is NOT part of GNU Emacs.
@@ -704,8 +704,9 @@ FLAG and VALUE are specified as strings and read as Prolog
terms."
If PROJECT is nil, update data for the current project.
If called interactively with a prefix argument, prompt for
-PROJECT."
+PROJECT (only on Emacs 28 or later)."
(interactive (list (or (and current-prefix-arg
+ (fboundp 'project-prompt-project-dir)
(let ((default-directory
(project-prompt-project-dir)))
(project-current)))