[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog cf90a2144e 3/6: Add docstring for 'sweeprolog-d
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog cf90a2144e 3/6: Add docstring for 'sweeprolog-definition-at-point' |
Date: |
Tue, 6 Jun 2023 04:01:34 -0400 (EDT) |
branch: elpa/sweeprolog
commit cf90a2144e8ac1ed4000df8f854fd88898de1bf2
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
Add docstring for 'sweeprolog-definition-at-point'
---
sweeprolog.el | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/sweeprolog.el b/sweeprolog.el
index ce8be3fb87..8027059a3e 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -3567,6 +3567,21 @@ of them signal success by returning non-nil."
(remove-hook 'sweeprolog-analyze-region-fragment-hook cb t)))
(defun sweeprolog-definition-at-point (&optional point)
+ "Get information about the Prolog definition at POINT.
+
+If POINT is nil, it defaults to point.
+
+If POINT is not inside a clause, return nil. Otherwise, return a
+list (BEG FUNCTOR ARITY END NECK MODULE).
+
+When the head term of clause is module-qualified, MODULE is the
+name of that module. If the head is not module-qualified, MODULE
+is nil. FUNCTOR and ARITY are the functor and arity of predicate
+that the clause is part of, and NECK is the neck operator that it
+uses (e.g. \"-->\" for DCG rules).
+
+BEG and END are buffer positions corresponding to the beginning
+and end positions of the clause."
(save-excursion
(when point (goto-char point))
(let ((functor nil)
- [nongnu] elpa/sweeprolog updated (d3682fb27b -> a9ce19bd33), ELPA Syncer, 2023/06/06
- [nongnu] elpa/sweeprolog 1542c821e3 4/6: Use 'ignore-errors' instead of 'condition-case' with no handlers, ELPA Syncer, 2023/06/06
- [nongnu] elpa/sweeprolog a9ce19bd33 6/6: Announce recent changes in NEWS.org and bump version to 0.18.4, ELPA Syncer, 2023/06/06
- [nongnu] elpa/sweeprolog ef2bca22bb 5/6: ENHANCED: Add tooltip info for string-stye DCG terminals, ELPA Syncer, 2023/06/06
- [nongnu] elpa/sweeprolog 62fe11b8ab 2/6: ENHANCED: Export DCG non-terminals as 'foo//N', not 'foo/N+2', ELPA Syncer, 2023/06/06
- [nongnu] elpa/sweeprolog cf90a2144e 3/6: Add docstring for 'sweeprolog-definition-at-point',
ELPA Syncer <=
- [nongnu] elpa/sweeprolog cd6b743a54 1/6: ENHANCED: Highlight string-style DCG terminals, ELPA Syncer, 2023/06/06