Don't quote nil and t in doc strings and comments

* test/src/minibuf-tests.el (test-try-completion-ignore-case):
* test/lisp/url/url-auth-tests.el
(url-auth-test-digest-auth-retrieve-cache):
* test/lisp/subr-tests.el (subr-tests-add-hook-depth):
* test/lisp/so-long-tests/so-long-tests.el
(so-long-tests-invisible-buffer-function):
* test/lisp/emacs-lisp/tabulated-list-test.el (tabulated-list-sort):
* src/xfaces.c:
* src/process.c (Finterrupt_process):
(syms_of_process):
* src/minibuf.c (Fread_from_minibuffer):
(Fcompleting_read):
(syms_of_minibuf):
* src/dispnew.c (syms_of_display):
* src/data.c:
* lisp/so-long.el (so-long--hack-local-variables):
* lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions):
(elisp--xref-find-definitions):
* lisp/org/ox-html.el (org-html-htmlize-output-type):
* lisp/org/org-agenda.el (org-agenda-do-in-region):
* lisp/net/tramp.el:
* lisp/minibuffer.el (set-minibuffer-message):
* lisp/isearch.el (isearch-wrap-pause):
(isearch-repeat-on-direction-change):
* lisp/emacs-lisp/timer.el (timer):
* lisp/emacs-lisp/package.el (package-read-archive-contents):
* lisp/emacs-lisp/faceup.el (faceup-next-property-change):
* lisp/emacs-lisp/comp.el (comp-func):
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-empty-p):
* lisp/emacs-lisp/cl-macs.el (cl-do):
(cl-do*):
(cl--self-tco):
* lisp/emacs-lisp/bytecomp.el (byte-compile-unresolved-functions):
(byte-compile-cond-jump-table): Don't quote t and nil.
This commit is contained in:
Lars Ingebrigtsen 2021-09-21 22:11:43 +02:00
parent 636e082e45
commit 85e9e5f616
24 changed files with 39 additions and 40 deletions

View file

@ -551,7 +551,7 @@ has the form (autoload . FILENAME).")
"Alist of undefined functions to which calls have been compiled.
Each element in the list has the form (FUNCTION POSITION . CALLS)
where CALLS is a list whose elements are integers (indicating the
number of arguments passed in the function call) or the constant `t'
number of arguments passed in the function call) or the constant t
if the function is called indirectly.
This variable is only significant whilst compiling an entire buffer.
Used for warnings when a function is not known to be defined or is later
@ -4417,7 +4417,7 @@ Return (TAIL VAR TEST CASES), where:
(cases (nth 2 switch))
jump-table test-objects body tag default-tag)
;; TODO: Once :linear-search is implemented for `make-hash-table'
;; set it to `t' for cond forms with a small number of cases.
;; set it to t for cond forms with a small number of cases.
(let ((nvalues (apply #'+ (mapcar (lambda (case) (length (car case)))
cases))))
(setq jump-table (make-hash-table
@ -4446,7 +4446,7 @@ Return (TAIL VAR TEST CASES), where:
(byte-compile-out 'byte-switch)
;; When the opcode argument is `byte-goto', `byte-compile-goto' sets
;; `byte-compile-depth' to `nil'. However, we need `byte-compile-depth'
;; `byte-compile-depth' to nil. However, we need `byte-compile-depth'
;; to be non-nil for generating tags for all cases. Since
;; `byte-compile-depth' will increase by at most 1 after compiling
;; all of the clause (which is further enforced by cl-assert below)

View file

@ -1762,7 +1762,7 @@ Once the END-TEST becomes true, the RESULT forms are evaluated (with
the VARs still bound to their values) to produce the result
returned by `cl-do'.
Note that the entire loop is enclosed in an implicit `nil' block, so
Note that the entire loop is enclosed in an implicit nil block, so
that you can use `cl-return' to exit at any time.
Also note that END-TEST is checked before evaluating BODY. If END-TEST
@ -1791,7 +1791,7 @@ Once the END-TEST becomes true, the RESULT forms are evaluated (with
the VARs still bound to their values) to produce the result
returned by `cl-do*'.
Note that the entire loop is enclosed in an implicit `nil' block, so
Note that the entire loop is enclosed in an implicit nil block, so
that you can use `cl-return' to exit at any time.
Also note that END-TEST is checked before evaluating BODY. If END-TEST
@ -2071,7 +2071,7 @@ Like `cl-flet' but the definitions can refer to previous ones.
;; even handle mutually recursive functions.
(letrec
((done nil) ;; Non-nil if some TCO happened.
;; This var always holds the value `nil' until (just before) we
;; This var always holds the value nil until (just before) we
;; exit the loop.
(retvar (make-symbol "retval"))
(ofargs (mapcar (lambda (s) (if (memq s cl--lambda-list-keywords) s

View file

@ -134,7 +134,7 @@ Integer values are handled in the `range' slot.")
:neg (neg cstr))))
(defsubst comp-cstr-empty-p (cstr)
"Return t if CSTR is equivalent to the `nil' type specifier or nil otherwise."
"Return t if CSTR is equivalent to the nil type specifier or nil otherwise."
(with-comp-cstr-accessors
(and (null (typeset cstr))
(null (valset cstr))

View file

@ -901,8 +901,8 @@ non local exit (ends with an `unreachable' insn)."))
(lap () :type list
:documentation "LAP assembly representation.")
(ssa-status nil :type symbol
:documentation "SSA status either: 'nil', 'dirty' or 't'.
Once in SSA form this *must* be set to 'dirty' every time the topology of the
:documentation "SSA status either: nil, `dirty' or t.
Once in SSA form this *must* be set to `dirty' every time the topology of the
CFG is mutated by a pass.")
(frame-size nil :type integer)
(vframe-size 0 :type integer)

View file

@ -795,7 +795,7 @@ See `faceup-properties' for a list of tracked properties."
nil
(if (and (null pos)
(faceup-has-any-text-property (point-min)))
;; `pos' is `nil' and the character at `point-min' contains a
;; `pos' is nil and the character at `point-min' contains a
;; tracked property, return `point-min'.
(point-min)
(unless pos

View file

@ -1586,7 +1586,7 @@ If the archive version is too new, signal an error."
(if package
(package--add-to-archive-contents package archive)
(lwarn '(package refresh) :warning
"Ignoring `nil' package on `%s' package archive" archive))))))
"Ignoring nil package on `%s' package archive" archive))))))
(defvar package--old-archive-priorities nil
"Store currently used `package-archive-priorities'.

View file

@ -49,7 +49,7 @@
function args ;What to do when triggered.
idle-delay ;If non-nil, this is an idle-timer.
psecs
;; A timer may be created with `t' as the TIME, which means that we
;; A timer may be created with t as the TIME, which means that we
;; want to run at specific integral multiples of `repeat-delay'. We
;; then have to recompute this (because the machine may have gone to
;; sleep, etc).

View file

@ -176,11 +176,11 @@ command history."
(defcustom isearch-wrap-pause t
"Define the behavior of wrapping when there are no more matches.
When `t' (by default), signal an error when no more matches are found.
When t (by default), signal an error when no more matches are found.
Then after repeating the search, wrap with `isearch-wrap-function'.
When `no', wrap immediately after reaching the last match.
When `no-ding', wrap immediately without flashing the screen.
When `nil', never wrap, just stop at the last match."
When nil, never wrap, just stop at the last match."
:type '(choice (const :tag "Pause before wrapping" t)
(const :tag "No pause before wrapping" no)
(const :tag "No pause and no flashing" no-ding)
@ -189,9 +189,9 @@ When `nil', never wrap, just stop at the last match."
(defcustom isearch-repeat-on-direction-change nil
"Whether a direction change should move to another match.
When `nil', the default, a direction change moves point to the other
When nil, the default, a direction change moves point to the other
end of the current search match.
When `t', a direction change moves to another search match, if there
When t, a direction change moves to another search match, if there
is one."
:type '(choice (const :tag "Remain on the same match" nil)
(const :tag "Move to another match" t))

View file

@ -848,7 +848,7 @@ via `set-message-function'."
(run-with-timer minibuffer-message-clear-timeout nil
#'clear-minibuffer-message)))
;; Return `t' telling the caller that the message
;; Return t telling the caller that the message
;; was handled specially by this function.
t))))

View file

@ -183,7 +183,7 @@ See the variable `tramp-encoding-shell' for more information."
:version "24.1"
:type '(choice (const nil) string))
;; Since Emacs 26.1, `system-name' can return `nil' at build time if
;; Since Emacs 26.1, `system-name' can return nil at build time if
;; Emacs is compiled with "--no-build-details". We do expect it to be
;; a string. (Bug#44481)
(defconst tramp-system-name (or (system-name) "")

View file

@ -8842,7 +8842,7 @@ Point is in the buffer where the item originated.")
(defun org-agenda-do-in-region (beg end cmd &optional arg force-arg delete)
"Between region BEG and END, call agenda command CMD.
When optional argument ARG is non-nil or FORCE-ARG is `t', pass
When optional argument ARG is non-nil or FORCE-ARG is t, pass
ARG to CMD. When optional argument DELETE is non-nil, assume CMD
deletes the agenda entry and don't move to the next entry."
(save-excursion

View file

@ -874,7 +874,7 @@ link's path."
(defcustom org-html-htmlize-output-type 'inline-css
"Output type to be used by htmlize when formatting code snippets.
Choices are `css' to export the CSS selectors only,`inline-css'
to export the CSS attribute values inline in the HTML or `nil' to
to export the CSS attribute values inline in the HTML or nil to
export plain text. We use as default `inline-css', in order to
make the resulting HTML self-containing.

View file

@ -990,7 +990,7 @@ namespace but with lower confidence."
;; First call to find-lisp-object-file-name for an object
;; defined in C; the doc strings from the C source have
;; not been loaded yet. Second call will return "src/*.c"
;; in file; handled by 't' case below.
;; in file; handled by t case below.
(push (elisp--xref-make-xref nil symbol (help-C-file-name (symbol-function symbol) 'subr)) xrefs))
((and (setq doc (documentation symbol t))
@ -1034,7 +1034,7 @@ namespace but with lower confidence."
specializers))
(file (find-lisp-object-file-name met-name 'cl-defmethod)))
(dolist (item specializers)
;; default method has all 't' in specializers
;; Default method has all t in specializers.
(setq non-default (or non-default (not (equal t item)))))
(when (and file

View file

@ -1686,7 +1686,7 @@ File-local header comments are currently an exception, and are processed by
`so-long--check-header-modes' (see which for details)."
;; The first arg to `hack-local-variables' is HANDLE-MODE since Emacs 26.1,
;; and MODE-ONLY in earlier versions. In either case we are interested in
;; whether it has the value `t'.
;; whether it has the value t.
(let ((retval (apply orig-fun handle-mode args)))
(and (eq handle-mode t)
retval ; A file-local mode was set.

View file

@ -681,7 +681,7 @@ global value outside of any lexical scope. */)
/* It has been previously suggested to make this function an alias for
symbol-function, but upon discussion at Bug#23957, there is a risk
breaking backward compatibility, as some users of fboundp may
expect `t' in particular, rather than any true value. */
expect t in particular, rather than any true value. */
DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0,
doc: /* Return t if SYMBOL's function definition is not void. */)
(Lisp_Object symbol)

View file

@ -6704,7 +6704,7 @@ See `buffer-display-table' for more information. */);
DEFVAR_LISP ("tab-bar-position", Vtab_bar_position,
doc: /* Specify on which side from the tool bar the tab bar shall be.
Possible values are `t' (below the tool bar), `nil' (above the tool bar).
Possible values are t (below the tool bar), nil (above the tool bar).
This option affects only builds where the tool bar is not external. */);
pdumper_do_now_and_after_load (syms_of_display_for_pdumper);

View file

@ -1292,8 +1292,8 @@ Fifth arg HIST, if non-nil, specifies a history list and optionally
HISTPOS is the initial position for use by the minibuffer history
commands. For consistency, you should also specify that element of
the history as the value of INITIAL-CONTENTS. Positions are counted
starting from 1 at the beginning of the list. If HIST is the symbol
`t', history is not recorded.
starting from 1 at the beginning of the list. If HIST is t, history
is not recorded.
If `history-add-new-input' is non-nil (the default), the result will
be added to the history list using `add-to-history'.
@ -2037,8 +2037,7 @@ HIST, if non-nil, specifies a history list and optionally the initial
(This is the only case in which you should use INITIAL-INPUT instead
of DEF.) Positions are counted starting from 1 at the beginning of
the list. The variable `history-length' controls the maximum length
of a history list. If HIST is the symbol `t', history is not
recorded.
of a history list. If HIST is t, history is not recorded.
DEF, if non-nil, is the default value or the list of default values.
@ -2486,7 +2485,7 @@ is added with
(set minibuffer-history-variable
(cons STRING (symbol-value minibuffer-history-variable)))
If the variable is the symbol `t', no history is recorded. */);
If the variable is t, no history is recorded. */);
XSETFASTINT (Vminibuffer_history_variable, 0);
DEFVAR_LISP ("minibuffer-history-position", Vminibuffer_history_position,

View file

@ -6887,7 +6887,7 @@ If CURRENT-GROUP is `lambda', and if the shell owns the terminal,
don't send the signal.
This function calls the functions of `interrupt-process-functions' in
the order of the list, until one of them returns non-`nil'. */)
the order of the list, until one of them returns non-nil. */)
(Lisp_Object process, Lisp_Object current_group)
{
return CALLN (Frun_hook_with_args_until_success, Qinterrupt_process_functions,
@ -8514,7 +8514,7 @@ thus favoring processes with lower descriptors. */);
doc: /* List of functions to be called for `interrupt-process'.
The arguments of the functions are the same as for `interrupt-process'.
These functions are called in the order of the list, until one of them
returns non-`nil'. */);
returns non-nil. */);
Vinterrupt_process_functions = list1 (Qinternal_default_interrupt_process);
DEFVAR_LISP ("internal--daemon-sockname", Vinternal__daemon_sockname,

View file

@ -2420,11 +2420,11 @@ evaluate_face_filter (Lisp_Object filter, struct window *w,
/* Determine whether FACE_REF is a "filter" face specification (case
#4 in merge_face_ref). If it is, evaluate the filter, and if the
filter matches, return the filtered face spec. If the filter does
not match, return `nil'. If FACE_REF is not a filtered face
not match, return nil. If FACE_REF is not a filtered face
specification, return FACE_REF.
On error, set *OK to false, having logged an error message if
ERR_MSGS is true, and return `nil'. Otherwise, *OK is not touched.
ERR_MSGS is true, and return nil. Otherwise, *OK is not touched.
W is either NULL or a window used to evaluate filters. If W is
NULL, no window-based face specification filter matches.

View file

@ -96,7 +96,7 @@
(should (equal (get-text-property (point) 'tabulated-list-column-name)
"name-2"))
(tabulated-list-sort)
;; Check a `t' as the sorting predicate.
;; Check a t as the sorting predicate.
(should (string= text (buffer-substring-no-properties (point-min) (point-max))))
;; Invert.
(tabulated-list-sort 1)

View file

@ -229,7 +229,7 @@
((obsolete run-window-configuration-change-hook))
(run-window-configuration-change-hook)))))
(so-long-tests-assert-and-revert 'so-long-mode))
;; `so-long-invisible-buffer-function' is `nil'.
;; `so-long-invisible-buffer-function' is nil.
(with-temp-buffer
(insert "#!emacs\n")
(normal-mode)

View file

@ -492,11 +492,11 @@ See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19350."
(should (equal subr-tests--hook '(f5 f2 f1 f4 f3)))
(add-hook 'subr-tests--hook 'f6)
(should (equal subr-tests--hook '(f5 f6 f2 f1 f4 f3)))
;; Make sure `t' is equivalent to 90.
;; Make sure t is equivalent to 90.
(add-hook 'subr-tests--hook 'f7 90)
(add-hook 'subr-tests--hook 'f8 t)
(should (equal subr-tests--hook '(f5 f6 f2 f1 f4 f3 f7 f8)))
;; Make sure `nil' is equivalent to 0.
;; Make sure nil is equivalent to 0.
(add-hook 'subr-tests--hook 'f9 0)
(add-hook 'subr-tests--hook 'f10)
(should (equal subr-tests--hook '(f5 f10 f9 f6 f2 f1 f4 f3 f7 f8)))

View file

@ -154,7 +154,7 @@ Essential is how realms and paths are matched."
auth)
(dolist (row (list
;; If :expected-user is `nil' it indicates
;; If :expected-user is nil it indicates
;; authentication information shouldn't be found.
;; non-existent server

View file

@ -406,7 +406,7 @@
(should (equal (try-completion "bar" '("bArfoo" "barbaz"))
(try-completion "bar" '("barbaz" "bArfoo"))))
;; bug#11339
(should (equal (try-completion "baz" '("baz" "bAz")) "baz")) ;And not `t'!
(should (equal (try-completion "baz" '("baz" "bAz")) "baz")) ;And not t!
(should (equal (try-completion "baz" '("bAz" "baz"))
(try-completion "baz" '("baz" "bAz"))))))