[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-stklos 66eae79 22/30: Fix docstrings as per checkdo
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-stklos 66eae79 22/30: Fix docstrings as per checkdoc advice |
Date: |
Sun, 1 Aug 2021 18:32:44 -0400 (EDT) |
branch: elpa/geiser-stklos
commit 66eae79045425267e534e95b01f8a99b2bbedaab
Author: Jeronimo Pellegrini <j_p@aleph0.info>
Commit: Jeronimo Pellegrini <j_p@aleph0.info>
Fix docstrings as per checkdoc advice
---
geiser-stklos.el | 46 ++++++++++++++++++++++++++++++----------------
1 file changed, 30 insertions(+), 16 deletions(-)
diff --git a/geiser-stklos.el b/geiser-stklos.el
index 3018249..d5c54c2 100644
--- a/geiser-stklos.el
+++ b/geiser-stklos.el
@@ -72,8 +72,8 @@
;; is a parameter object!
(geiser-custom--defcustom geiser-stklos-case-sensitive
t
- "Non-nil means keyword highlighting is case-sensitive. You need
-to restart Geiser in order for it to see you've changed this
+ "Non-nil means keyword highlighting is case-sensitive.
+You need to restart Geiser in order for it to see you've changed this
option."
:type 'boolean
:group 'geiser-stklos)
@@ -88,6 +88,7 @@ option."
;; returns the name of the executable.
(defun geiser-stklos--binary ()
+ "Return the name of the executable."
(if (listp geiser-stklos-binary)
(car geiser-stklos-binary)
geiser-stklos-binary))
@@ -112,6 +113,9 @@ This function uses `geiser-stklos-init-file' if it exists."
;; Translates symbols into Scheme procedure calls from
;; geiser.stk :
(defun geiser-stklos--geiser-procedure (proc &rest args)
+ "Translates symbols into Scheme procedure calls from geiser.stk.
+Argument PROC is the procedure to be called.
+Optional argument ARGS are the arguments to the procedure."
(cl-case proc
((eval compile)
(let ((form (mapconcat 'identity (cdr args) " "))
@@ -132,18 +136,16 @@ This function uses `geiser-stklos-init-file' if it
exists."
;;; Modules
-;; Regular expression used to try to guess which module
-;; the current file is associated to.
(defconst geiser-stklos--module-re
+ "Regular expression used to try to guess which module the current file is
associated to."
"(define-module +\\([^) ]+\\)")
-;; from the start point, which must be an opening
-;; ( or [, find its closing match and return its
-;; position, or the end of buffer position if a
-;; closing match is not found.
(defun geiser-stklos--find-close-par (&optional start-point)
- (interactive)
+"Find the matching close parenthesis of an opening one.
+From the START-POINT, which must be an opening ( or [, find the
+closing match and return its position, or the end of buffer position
+if a closing match is not found."
(let ((start (if (null start-point)
(point)
start-point))
@@ -160,7 +162,7 @@ This function uses `geiser-stklos-init-file' if it exists."
(cond ((member c closing)
(pop stack))
((member c opening)
- (push c stack))))
+ (push c stack))))
(setq p (+ 1 p))) ;; FIXME: incf breaks ert tests (?)
p)))
@@ -171,6 +173,7 @@ This function uses `geiser-stklos-init-file' if it exists."
;; the current module should be taken as that one, so defines and sets
;; will be done inside that module.
(defun geiser-stklos--get-module (&optional module)
+ "Find which MODULE should be used for the position where the cursor is."
(cond ((null module)
(let ((here (point)))
(save-excursion
@@ -198,11 +201,12 @@ This function uses `geiser-stklos-init-file' if it
exists."
;; string sent to STklos to tell it to enter a module.
(defun geiser-stklos--enter-command (module)
+ "The string sent to STklos to tell it to enter MODULE."
(format "(select-module %s)" module))
-;; Finds the beginning of the symbol around point.
(defun geiser-stklos--symbol-begin (module)
+ "Find the beginning of the symbol around the point, inside MODULE."
(if module
(max (save-excursion (beginning-of-line) (point))
(save-excursion (skip-syntax-backward "^(>") (1- (point))))
@@ -211,17 +215,21 @@ This function uses `geiser-stklos-init-file' if it
exists."
;; string sent to STklos to tell it to load a module.
(defun geiser-stklos--import-command (module)
+ "The string sent to STklos to tell it to load MODULE."
(format "(require \"%s\")" module))
;; string sent to STklos to tell it to exit.
;; (this could also be ",q"...)
-(defun geiser-stklos--exit-command () "(exit 0)")
+(defun geiser-stklos--exit-command ()
+ "The string sent to STklos to tell it to exit."
+ "(exit 0)")
;;; Error display
(defun geiser-stklos--display-error (module key msg)
+ "Display an error, given current MODULE, key KEY and message MSG."
(newline)
(when (stringp msg)
(save-excursion (insert msg))
@@ -244,9 +252,11 @@ This function uses `geiser-stklos-init-file' if it exists."
;; but there is a string "stklos>" there. I see no way
;; to prevent this.
(defconst geiser-stklos--guess-re
+ "Regular expression used to detect the STklos REPL."
(regexp-opt '("stklos>")))
(defun geiser-stklos--guess ()
+ "Try to ascertain whether a buffer is STklos Scheme."
(save-excursion
(goto-char (point-min))
(re-search-forward geiser-stklos--guess-re nil t)))
@@ -255,11 +265,15 @@ This function uses `geiser-stklos-init-file' if it
exists."
;; Minimum version of STklos supported. If a less recent version
;; is used, Geiser will refuse to start.
-(defconst geiser-stklos-minimum-version "1.50")
+(defconst geiser-stklos-minimum-version
+ "A string containing the minimum version of STklos that we support."
+ "1.50")
;; this function obtains the version of the STklos binary
;; available.
(defun geiser-stklos--version (binary)
+ "Obtains the version of the STklos binary available.
+Argument BINARY is a string containing the binary name."
;; use SRFI-176!!!
(cadr (assoc 'version
(read (shell-command-to-string
@@ -269,12 +283,13 @@ This function uses `geiser-stklos-init-file' if it
exists."
;; Function ran at startup
(defun geiser-stklos--startup (remote)
+ "Hook for startup. The argument REMOTE is ignored."
(let ((geiser-log-verbose-p t))
(compilation-setup t)))
-;; These are symbols that we want to be highlighted in STklos code.
(defconst geiser-stklos-builtin-keywords
+ "These are symbols that we want to be highlighted in STklos code."
'("assume"
"fluid-let"
"dotimes"
@@ -283,9 +298,8 @@ This function uses `geiser-stklos-init-file' if it exists."
"call/ec"
"with-handler" ))
-;; The symbols that are to be highlighted as keywords, besides
-;; the standard Scheme ones
(defun geiser-stklos--keywords ()
+ "The symbols that are to be highlighted as keywords, besides the standard
Scheme ones."
(append (geiser-syntax--simple-keywords geiser-stklos-extra-keywords)
(geiser-syntax--simple-keywords geiser-stklos-builtin-keywords)))
- [nongnu] branch elpa/geiser-stklos created (now be482a0), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos 95b1dc7 06/30: More updates to README, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos 3210fd8 20/30: Fix small remaining packaging bugs, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos 8700063 25/30: Add LICENSE, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos 8166008 27/30: Mention installation from MELPA, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos fb42842 04/30: Updates to README, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos 5ffe3fd 10/30: eval geiser:... procedures in GEISER module, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos d87d1ac 14/30: Update README.md - autodoc is supported!, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos b806d13 17/30: Merge branch 'master' of gitlab.com:emacs-geiser/stklos, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos 330330a 15/30: Add tests on both (STklos and Emacs) sides., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos 66eae79 22/30: Fix docstrings as per checkdoc advice,
Philip Kaludercic <=
- [nongnu] elpa/geiser-stklos 439adec 29/30: Small enhancements to documentation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos 5ab06e9 11/30: Add autodoc and symbol documentation support, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos 091aa5e 07/30: A very small quantity of tests..., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos ced9c9f 05/30: Fixing a typo in a URL, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos 6228b23 21/30: Corectly require Geiser core, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos a02d2a7 13/30: Merge branch 'master' of gitlab.com:emacs-geiser/stklos into master, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos 52acf7c 24/30: Fix fatal thinko (docstring / const value mixup), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos be482a0 30/30: Fix tests and describe them in README, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos eb2b13f 02/30: Geiser functions are now in a STklos module, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-stklos 2fe100a 12/30: Update README, Philip Kaludercic, 2021/08/01