summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-09-27 23:56:55 +0200
committerStefan Kangas <stefan@marxist.se>2021-10-05 02:06:57 +0200
commit0a7bab689c4a113dd295c9db55d8e76a34d5f9e1 (patch)
tree48b28bc4a1a8b261b46dd419a060ddb09fca6274 /lisp/emacs-lisp
parente2861e2d08afd5dba9f676aa1e1d151a4d7dbc8f (diff)
; Minor stylistic fixes found by checkdoc
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/autoload.el10
-rw-r--r--lisp/emacs-lisp/avl-tree.el3
-rw-r--r--lisp/emacs-lisp/byte-run.el3
-rw-r--r--lisp/emacs-lisp/bytecomp.el6
-rw-r--r--lisp/emacs-lisp/cl-extra.el2
-rw-r--r--lisp/emacs-lisp/ert.el2
-rw-r--r--lisp/emacs-lisp/ewoc.el4
-rw-r--r--lisp/emacs-lisp/lisp-mode.el4
-rw-r--r--lisp/emacs-lisp/smie.el2
-rw-r--r--lisp/emacs-lisp/tabulated-list.el2
-rw-r--r--lisp/emacs-lisp/timer.el19
11 files changed, 32 insertions, 25 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index f620cdbb335..aaacba2c8e5 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -462,7 +462,7 @@ if `autoload-timestamps' is non-nil, otherwise a fixed fake time is inserted)."
(insert "\n" generate-autoload-section-continuation))))))
(defun autoload-find-file (file)
- "Fetch file and put it in a temp buffer. Return the buffer."
+ "Fetch FILE and put it in a temp buffer. Return the buffer."
;; It is faster to avoid visiting the file.
(setq file (expand-file-name file))
(with-current-buffer (get-buffer-create " *autoload-file*")
@@ -482,10 +482,10 @@ if `autoload-timestamps' is non-nil, otherwise a fixed fake time is inserted)."
"File local variable to prevent scanning this file for autoload cookies.")
(defun autoload-file-load-name (file outfile)
- "Compute the name that will be used to load FILE."
- ;; OUTFILE should be the name of the global loaddefs.el file, which
- ;; is expected to be at the root directory of the files we're
- ;; scanning for autoloads and will be in the `load-path'.
+ "Compute the name that will be used to load FILE.
+OUTFILE should be the name of the global loaddefs.el file, which
+is expected to be at the root directory of the files we are
+scanning for autoloads and will be in the `load-path'."
(let* ((name (file-relative-name file (file-name-directory outfile)))
(names '())
(dir (file-name-directory outfile)))
diff --git a/lisp/emacs-lisp/avl-tree.el b/lisp/emacs-lisp/avl-tree.el
index 4382985eb85..3f803107a17 100644
--- a/lisp/emacs-lisp/avl-tree.el
+++ b/lisp/emacs-lisp/avl-tree.el
@@ -330,8 +330,7 @@ inserted data."
data)))
(if (or (funcall cmpfun newdata data)
(funcall cmpfun data newdata))
- (error "avl-tree-enter:\
- updated data does not match existing data"))
+ (error "avl-tree-enter: Updated data does not match existing data"))
(setf (avl-tree--node-data br) newdata)
(cons nil newdata)) ; return value
))))
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 35c80e524cf..da86fa5cecf 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -422,7 +422,8 @@ was first made obsolete, for example a date or a release number."
&optional docstring)
"Set OBSOLETE-NAME's function definition to CURRENT-NAME and mark it obsolete.
-\(define-obsolete-function-alias \\='old-fun \\='new-fun \"28.1\" \"old-fun's doc.\")
+\(define-obsolete-function-alias \\='old-fun \\='new-fun \"28.1\" \
+\"old-fun's doc.\")
is equivalent to the following two lines of code:
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 0856626b7bb..3f050d1b799 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1082,7 +1082,7 @@ If STR is something like \"Buffer foo.el\", return #<buffer foo.el>
(defconst emacs-lisp-compilation-parse-errors-filename-function
#'emacs-lisp-compilation-file-name-or-buffer
"The value for `compilation-parse-errors-filename-function' for when
-we go into emacs-lisp-compilation-mode.")
+we go into `emacs-lisp-compilation-mode'.")
(defcustom emacs-lisp-compilation-search-path '(nil)
"Directories to search for files named in byte-compile error messages.
@@ -2810,8 +2810,8 @@ not to take responsibility for the actual compilation of the code."
t)))))
(defun byte-compile-output-as-comment (exp quoted)
- "Print Lisp object EXP in the output file, inside a comment,
-and return the file (byte) position it will have.
+ "Print Lisp object EXP in the output file, inside a comment.
+Return the file (byte) position it will have.
If QUOTED is non-nil, print with quoting; otherwise, print without quoting."
(with-current-buffer byte-compile--outbuffer
(let ((position (point)))
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 0ed75475097..499d26b737b 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -336,7 +336,7 @@ non-nil value.
;;;###autoload
(defun cl-isqrt (x)
- "Return the integer square root of the (integer) argument."
+ "Return the integer square root of the (integer) argument X."
(if (and (integerp x) (> x 0))
(let ((g (ash 2 (/ (logb x) 2)))
g2)
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index 72fe19461f7..98cb1fd1cf6 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -262,7 +262,7 @@ DATA is displayed to the user and should state the reason for skipping."
;; See Bug#24402 for why this exists
(defun ert--should-signal-hook (error-symbol data)
"Stupid hack to stop `condition-case' from catching ert signals.
-It should only be stopped when ran from inside ert--run-test-internal."
+It should only be stopped when ran from inside `ert--run-test-internal'."
(when (and (not (symbolp debugger)) ; only run on anonymous debugger
(memq error-symbol '(ert-test-failed ert-test-skipped)))
(funcall debugger 'error (cons error-symbol data))))
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el
index 68f94edafd9..8636dc92a1c 100644
--- a/lisp/emacs-lisp/ewoc.el
+++ b/lisp/emacs-lisp/ewoc.el
@@ -49,7 +49,7 @@
;;
;; Ewoc is a package that implements a connection between an
;; dll (a doubly linked list) and the contents of a buffer.
-;; Possible uses are dired (have all files in a list, and show them),
+;; Possible uses are Dired (have all files in a list, and show them),
;; buffer-list, kom-prioritize (in the LysKOM elisp client) and
;; others. pcl-cvs.el and vc.el use ewoc.el.
;;
@@ -381,7 +381,7 @@ arguments will be passed to MAP-FUNCTION."
(defun ewoc-filter (ewoc predicate &rest args)
"Remove all elements in EWOC for which PREDICATE returns nil.
-Note that the buffer for EWOC will be current-buffer when PREDICATE
+Note that the buffer for EWOC will be the current buffer when PREDICATE
is called. PREDICATE must restore the current buffer before it returns
if it changes it.
The PREDICATE is called with the element as its first argument. If any
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index eac3c03cd1e..fc7a7362cd7 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -556,7 +556,7 @@ This will generate compile-time constants from BINDINGS."
"Gaudy highlighting from Emacs Lisp mode used in Backtrace mode.")
(defun lisp-string-in-doc-position-p (listbeg startpos)
- "Return true if a doc string may occur at STARTPOS inside a list.
+ "Return non-nil if a doc string may occur at STARTPOS inside a list.
LISTBEG is the position of the start of the innermost list
containing STARTPOS."
(let* ((firstsym (and listbeg
@@ -589,7 +589,7 @@ containing STARTPOS."
(= (point) startpos))))))
(defun lisp-string-after-doc-keyword-p (listbeg startpos)
- "Return true if `:documentation' symbol ends at STARTPOS inside a list.
+ "Return non-nil if `:documentation' symbol ends at STARTPOS inside a list.
LISTBEG is the position of the start of the innermost list
containing STARTPOS."
(and listbeg ; We are inside a Lisp form.
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index d775f152b36..8e14faea3a4 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -1302,7 +1302,7 @@ Only meaningful when called from within `smie-rules-function'."
(let ((tok (funcall smie-forward-token-function)))
(unless tok
(with-demoted-errors
- (error "smie-rule-separator: can't skip token %s"
+ (error "smie-rule-separator: Can't skip token %s"
smie--token))))
(skip-chars-forward " ")
(unless (eolp) (point)))))
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index 5210b2be5e0..0ae355e5917 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -256,7 +256,7 @@ Populated by `tabulated-list-init-header'.")
(defvar tabulated-list--header-overlay nil)
(defun tabulated-list-line-number-width ()
- "Return the width taken by display-line-numbers in the current buffer."
+ "Return the width taken by `display-line-numbers' in the current buffer."
;; line-number-display-width returns the value for the selected
;; window, which might not be the window in which the current buffer
;; is displayed.
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index 382f6bb1fa3..1ef4931b7be 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -125,9 +125,12 @@ of SECS seconds since the epoch. SECS may be a fraction."
(time-convert (cons (- more-ticks (% more-ticks trunc-s-ticks)) hz)))))
(defun timer-relative-time (time secs &optional usecs psecs)
- "Advance TIME by SECS seconds and optionally USECS microseconds
-and PSECS picoseconds. SECS may be either an integer or a
-floating point number."
+ "Advance TIME by SECS seconds.
+
+Optionally also advance it by USECS microseconds and PSECS
+picoseconds.
+
+SECS may be either an integer or a floating point number."
(let ((delta secs))
(if (or usecs psecs)
(setq delta (time-add delta (list 0 0 (or usecs 0) (or psecs 0)))))
@@ -138,9 +141,13 @@ floating point number."
(time-less-p (timer--time t1) (timer--time t2)))
(defun timer-inc-time (timer secs &optional usecs psecs)
- "Increment the time set in TIMER by SECS seconds, USECS microseconds,
-and PSECS picoseconds. SECS may be a fraction. If USECS or PSECS are
-omitted, they are treated as zero."
+ "Increment the time set in TIMER by SECS seconds.
+
+Optionally also increment it by USECS microseconds, and PSECS
+picoseconds. If USECS or PSECS are omitted, they are treated as
+zero.
+
+SECS may be a fraction."
(setf (timer--time timer)
(timer-relative-time (timer--time timer) secs usecs psecs)))