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

[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)



reply via email to

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