[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog 1a19f7b3be 074/166: DOC: document font-lock and
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog 1a19f7b3be 074/166: DOC: document font-lock and xref integration for sweep-mode |
Date: |
Fri, 30 Sep 2022 04:59:27 -0400 (EDT) |
branch: elpa/sweeprolog
commit 1a19f7b3beb7d06bf972d902f2b1794acf605f25
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
DOC: document font-lock and xref integration for sweep-mode
---
README.org | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/README.org b/README.org
index 03c7b6afb2..2808819cba 100644
--- a/README.org
+++ b/README.org
@@ -279,6 +279,58 @@ sweep-mode=. To instruct Emacs to always open Prolog
files in
(add-to-list 'auto-mode-alist '("\\.plt\\'" . sweep-mode))
#+end_src
+** Semantic highlighting
+:PROPERTIES:
+:CUSTOM_ID: semantic-highlighting
+:END:
+
+#+CINDEX: fontification
+=sweep-mode= integrates with the standard Emacs =font-lock= system which
+is used for highlighting text in buffers (see [[info:emacs#Font Lock][Font
Lock in the Emacs
+manual]]). =sweep-mode= highlights different tokens in Prolog code
+according to their semantics, determined through static analysis which
+is performed on demand. When a buffer is first opened in =sweep-mode=,
+its entire contents are analyzed to collect and cache cross reference
+data, and the buffer is highlighted accordingly. In contrast, when
+editing and moving around the buffer, a faster, local analysis is
+invoked to updated the semantic highlighting.
+
+#+FINDEX: sweep-colourise-buffer
+At any point in a =sweep-mode= buffer, the command =C-c C-c= (or =M-x
+sweep-colourise-buffer=) can be used to update the cross reference
+cache and highlight the buffer accordingly. This may be useful
+e.g. after defining a new predicate.
+
+#+CINDEX: sweep-faces
+=sweep= defines more than 60 different faces (named sets of properties
+that determine the appearance of a specific text in Emacs buffers, see
+also [[info:emacs#Faces][Faces in the Emacs manual]]) to signify the specific
semantics of
+each token in a Prolog code buffer. For example, calls to built in
+Prolog predicates are highlighted with the =sweep-built-in-face=, while
+recursive calls to predicates in their own definitions are assigned
+the =sweep-recursion-face=. The different appearance properties
+associated which each face, like color, font, etc., can be customized
+according to best suite the user's preferences. By default, =sweep=
+defines its faces to inherit from standard Emacs faces such as
+=font-lock-variable-face= commonly used for variables in different
+programming languages, which =sweep= uses a basis for
+=sweep-variable-face=. To view and customize all of the faces defined
+and used in =sweep=, type =M-x customize-group RET sweep-faces RET=.
+
+** Definitions and references
+:PROPERTIES:
+:CUSTOM_ID: sweep-xref
+:END:
+
+#+CINDEX: xref
+=sweep-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
+=M-.= for jumping to the definition of the predicate at point. Refer to
+[[info:emacs#Find Identifiers][Find Identifiers in the Emacs manual]] for an
overview of the available
+commands.
+
+
* The Prolog top-level
:PROPERTIES:
:CUSTOM_ID: prolog-top-level
- [nongnu] elpa/sweeprolog 48e8fb7c65 155/166: ENHANCED: (sweep--colour-term-to-face): return multiple regions, (continued)
- [nongnu] elpa/sweeprolog 48e8fb7c65 155/166: ENHANCED: (sweep--colour-term-to-face): return multiple regions, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 1c87ca72e3 163/166: DOC: document new variable highlighting in the manual, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog a8d186092f 157/166: ENHANCED: More indicative error on failure to locate sweep-module, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 97856b5c85 159/166: DOC: add installation instructions from NonGNU ELPA, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 348294a57f 002/166: Add swipl-devel submodule, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog b2838d5477 004/166: Cleanup, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 4f96499382 011/166: DOC: expand README.org, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5c4aef50f2 041/166: Run `ninja install` as root in CI, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog a6e37f306b 069/166: ENHANCED: fontify mutlifile predicate calls in a dedicated face, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 4299c39d62 070/166: ENHANCED: indentation edge cases handling, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 1a19f7b3be 074/166: DOC: document font-lock and xref integration for sweep-mode,
ELPA Syncer <=
- [nongnu] elpa/sweeprolog 1c6d2e96a8 078/166: ENHANCED: allow user to specify location of swipl binary, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5a8f70149f 099/166: FIXED: (sweep-load-buffer): error after prompting for a buffer, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 7327016d15 095/166: FIXED: sweep_predicates_collection/2: include preds defined in user, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog a70a730f48 087/166: PORT: don't use the 2nd arg to looking-at, added only in Emacs 29, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog d1a2913f75 115/166: ENHANCED: Update semantic highlighting on idle timer in sweep-mode, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog b168465391 098/166: FIXED: sweep_load_buffer/3: load files in the context of "user", ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog db7ef44a61 083/166: DOC: add manual section about setting Prolog flags, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 521a4bfde5 132/166: BUILD: replaced Makefile with CMakeLists.txt, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog ecf601dd54 133/166: FIXED: indentation error when typing at end of buffer, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 7bca15bd1e 141/166: DOC: fix copy-paste error in README.org, ELPA Syncer, 2022/09/30