emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/sweeprolog 2abad939fe 108/166: DOC: Following file specifi


From: ELPA Syncer
Subject: [nongnu] elpa/sweeprolog 2abad939fe 108/166: DOC: Following file specifications: new section
Date: Fri, 30 Sep 2022 04:59:30 -0400 (EDT)

branch: elpa/sweeprolog
commit 2abad939fef81af14d88d3a5796f4fd1221d1ac7
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>

    DOC: Following file specifications: new section
---
 NEWS.org   | 11 +++++++++--
 README.org | 24 ++++++++++++++++++++++++
 sweep.el   |  2 +-
 3 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index fb6f1e5d9b..d8d2628106 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -16,10 +16,17 @@ This file is about changes in =sweep= up to version
 Loads a =sweep-mode= buffer.  If called from a =sweep-mode= buffer, loads
 the current buffer by default.
 
+** New command =sweep-find-file-at-point=.
+
+Follows file specifications in =sweep-mode= buffers.
+
 * New keybindings in =sweep-mode= buffers
 
-=C-c C-l= is now bound to =sweep-load-buffer=.
+** =C-c C-l= is now bound to =sweep-load-buffer=.
+
+** =C-c C-o= is now bound to =sweep-find-file-at-point=.
+
 
 * New keybindings in =sweep-prefix-map=
 
-The key =l= is now bound under =sweep-prefix-map= to =sweep-load-buffer=.
+** The =l= key is now bound to =sweep-load-buffer=.
diff --git a/README.org b/README.org
index 368f829d1a..d726b72d72 100644
--- a/README.org
+++ b/README.org
@@ -329,6 +329,27 @@ This enables the many commands that the =xref= interface 
provides, like
 [[info:emacs#Find Identifiers][Find Identifiers in the Emacs manual]] for an 
overview of the available
 commands.
 
+** Following file specifications
+:PROPERTIES:
+:CUSTOM_ID: following-file-specs
+:END:
+
+#+FINDEX: sweep-find-file-at-point
+File specifications that occur in =sweep-mode= buffers can be followed
+with =C-c C-o= (or =M-x sweep-find-file-at-point=) whenever point is over
+a valid file specification.  For example, consider a Prolog file buffer with 
the common
+directive =use_module/1=:
+
+#+begin_src prolog
+:- use_module(library(lists)).
+#+end_src
+
+With point in any position inside =library(lists)=, typing =C-c C-o= will
+open the =lists.pl= file in the Prolog library.
+
+For more information about file specifications in SWI-Prolog, see
+[[https://www.swi-prolog.org/pldoc/doc_for?object=absolute_file_name/3][absolute_file_name/3]]
 in the SWI-Prolog manual.
+
 ** Loading buffers
 :PROPERTIES:
 :CUSTOM_ID: loading-buffers
@@ -347,6 +368,9 @@ otherwise.  To choose a different buffer to load while 
visiting a
 =sweep-mode= buffer, invoke =sweep-load-buffer= with a prefix argument
 (=C-u C-c C-l=).
 
+More relevant information about loading code in SWI-Prolog can be
+found in [[https://www.swi-prolog.org/pldoc/man?section=consulting][Loading 
Prolog source files]] in the SWI-Prolog manual.
+
 * The Prolog top-level
 :PROPERTIES:
 :CUSTOM_ID: prolog-top-level
diff --git a/sweep.el b/sweep.el
index f2f89dbca9..490dd6e35e 100644
--- a/sweep.el
+++ b/sweep.el
@@ -1218,7 +1218,7 @@ Interactively, a prefix arg means to prompt for BUFFER."
   "Find file specificed by the Prolog file spec at POINT.
 
 Interactively, POINT is set to the current point."
-  (interactive "d" sweep-mode sweep-top-level-mode)
+  (interactive "d" sweep-mode)
   (if-let ((file (sweep-file-at-point point)))
       (find-file file)
     (user-error "No file specification found at point!")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]