Commit 3ad40700 authored by Juanma Barranquero's avatar Juanma Barranquero

lisp/*.el, src/*.c: Doc fixes related to returning t vs non-nil

* lisp/progmodes/flymake-proc.el (flymake-proc--find-buffer-for-file):
Doc fix; return value is a buffer, not t.

* lisp/progmodes/ebrowse.el (ebrowse-member-display-p):
Doc fix; return value is the MEMBER argument, not nil.

* lisp/files.el (hack-one-local-variable-eval-safep):
* lisp/play/doctor.el (doctor-nounp, doctor-pronounp):
* lisp/progmodes/flymake-proc.el (flymake-proc--check-include):
* lisp/progmodes/js.el (js--broken-arrow-terminates-line-p):
Doc fix; a non-nil return value is not always t.

* lisp/image.el (image-type-available-p):
* lisp/simple.el (region-active-p):
* lisp/window.el (frame-root-window-p):
* src/buffer.c (Fbuffer_live_p):
* src/image.c (Finit_image_library):
* src/window.c (Fwindow_minibuffer_p):
Doc fix; a non-nil return value is always t.

* doc/lispref/minibuf.texi (Minibuffer Windows): Doc fix.
parent 2bb0703e
Pipeline #3676 passed with stage
in 57 minutes and 26 seconds
...@@ -2364,8 +2364,8 @@ minibuffer window according to the selected frame. ...@@ -2364,8 +2364,8 @@ minibuffer window according to the selected frame.
@c Emacs 19 feature @c Emacs 19 feature
@defun window-minibuffer-p &optional window @defun window-minibuffer-p &optional window
This function returns non-@code{nil} if @var{window} is a minibuffer This function returns @code{t} if @var{window} is a minibuffer window.
window. @var{window} defaults to the selected window. @var{window} defaults to the selected window.
@end defun @end defun
The following function returns the window showing the currently active The following function returns the window showing the currently active
......
...@@ -3853,7 +3853,7 @@ It is dangerous if either of these conditions are met: ...@@ -3853,7 +3853,7 @@ It is dangerous if either of these conditions are met:
(hack-one-local-variable-quotep exp))) (hack-one-local-variable-quotep exp)))
(defun hack-one-local-variable-eval-safep (exp) (defun hack-one-local-variable-eval-safep (exp)
"Return t if it is safe to eval EXP when it is found in a file." "Return non-nil if it is safe to eval EXP when it is found in a file."
(or (not (consp exp)) (or (not (consp exp))
;; Detect certain `put' expressions. ;; Detect certain `put' expressions.
(and (eq (car exp) 'put) (and (eq (car exp) 'put)
......
...@@ -408,7 +408,7 @@ Optional DATA-P non-nil means SOURCE is a string containing image data." ...@@ -408,7 +408,7 @@ Optional DATA-P non-nil means SOURCE is a string containing image data."
;;;###autoload ;;;###autoload
(defun image-type-available-p (type) (defun image-type-available-p (type)
"Return non-nil if image type TYPE is available. "Return t if image type TYPE is available.
Image types are symbols like `xbm' or `jpeg'." Image types are symbols like `xbm' or `jpeg'."
(and (fboundp 'init-image-library) (and (fboundp 'init-image-library)
(init-image-library type))) (init-image-library type)))
......
...@@ -1023,7 +1023,7 @@ the subject noun, and return the portion of the sentence following it." ...@@ -1023,7 +1023,7 @@ the subject noun, and return the portion of the sentence following it."
nil)))) nil))))
(defun doctor-nounp (x) (defun doctor-nounp (x)
"Return t if the symbol argument is a noun." "Return non-nil if the symbol argument is a noun."
(or (doctor-pronounp x) (or (doctor-pronounp x)
(not (or (doctor-verbp x) (not (or (doctor-verbp x)
(equal x 'not) (equal x 'not)
...@@ -1031,7 +1031,7 @@ the subject noun, and return the portion of the sentence following it." ...@@ -1031,7 +1031,7 @@ the subject noun, and return the portion of the sentence following it."
(doctor-modifierp x) )) )) (doctor-modifierp x) )) ))
(defun doctor-pronounp (x) (defun doctor-pronounp (x)
"Return t if the symbol argument is a pronoun." "Return non-nil if the symbol argument is a pronoun."
(memq x '( (memq x '(
i me mine myself i me mine myself
we us ours ourselves ourself we us ours ourselves ourself
......
...@@ -2641,7 +2641,8 @@ means the member buffer is standalone. CLASS is its class." ...@@ -2641,7 +2641,8 @@ means the member buffer is standalone. CLASS is its class."
(defun ebrowse-member-display-p (member) (defun ebrowse-member-display-p (member)
"Return t if MEMBER must be displayed under the current filter settings." "Check if MEMBER must be displayed under the current filter settings.
If so, return MEMBER; otherwise return nil."
(if (and (aref ebrowse--filters (ebrowse-ms-visibility member)) (if (and (aref ebrowse--filters (ebrowse-ms-visibility member))
(or (null ebrowse--const-display-flag) (or (null ebrowse--const-display-flag)
(ebrowse-const-p member)) (ebrowse-const-p member))
......
...@@ -444,7 +444,7 @@ instead of reading master file from disk." ...@@ -444,7 +444,7 @@ instead of reading master file from disk."
(defun flymake-proc--check-include (source-file-name inc-name include-dirs) (defun flymake-proc--check-include (source-file-name inc-name include-dirs)
"Check if SOURCE-FILE-NAME can be found in include path. "Check if SOURCE-FILE-NAME can be found in include path.
Return t if it can be found via include path using INC-NAME." Return non-nil if it can be found via include path using INC-NAME."
(if (file-name-absolute-p inc-name) (if (file-name-absolute-p inc-name)
(flymake-proc--same-files source-file-name inc-name) (flymake-proc--same-files source-file-name inc-name)
(while (and include-dirs (while (and include-dirs
...@@ -458,7 +458,7 @@ Return t if it can be found via include path using INC-NAME." ...@@ -458,7 +458,7 @@ Return t if it can be found via include path using INC-NAME."
(defun flymake-proc--find-buffer-for-file (file-name) (defun flymake-proc--find-buffer-for-file (file-name)
"Check if there exists a buffer visiting FILE-NAME. "Check if there exists a buffer visiting FILE-NAME.
Return t if so, nil if not." Return the buffer if it exists, nil if not."
(let ((buffer-name (get-file-buffer file-name))) (let ((buffer-name (get-file-buffer file-name)))
(if buffer-name (if buffer-name
(get-buffer buffer-name)))) (get-buffer buffer-name))))
......
...@@ -2703,7 +2703,7 @@ Whitespace and comments around the arrow are ignored.") ...@@ -2703,7 +2703,7 @@ Whitespace and comments around the arrow are ignored.")
(defun js--broken-arrow-terminates-line-p () (defun js--broken-arrow-terminates-line-p ()
"Helper function for `js--proper-indentation'. "Helper function for `js--proper-indentation'.
Return t if the last non-comment, non-whitespace token of the Return non-nil if the last non-comment, non-whitespace token of the
current line is the \"=>\" token (of an arrow function)." current line is the \"=>\" token (of an arrow function)."
(let ((from (point))) (let ((from (point)))
(end-of-line) (end-of-line)
......
...@@ -5685,7 +5685,7 @@ For some commands, it may be appropriate to ignore the value of ...@@ -5685,7 +5685,7 @@ For some commands, it may be appropriate to ignore the value of
t)) t))
(defun region-active-p () (defun region-active-p ()
"Return non-nil if Transient Mark mode is enabled and the mark is active. "Return t if Transient Mark mode is enabled and the mark is active.
Some commands act specially on the region when Transient Mark Some commands act specially on the region when Transient Mark
mode is enabled. Usually, such commands should use mode is enabled. Usually, such commands should use
......
...@@ -3867,7 +3867,7 @@ POSITION defaults to the value of `window-point' of WINDOW." ...@@ -3867,7 +3867,7 @@ POSITION defaults to the value of `window-point' of WINDOW."
(+ (nth 1 edges) (nth 1 pos-in-window))))))) (+ (nth 1 edges) (nth 1 pos-in-window)))))))
(defun frame-root-window-p (window) (defun frame-root-window-p (window)
"Return non-nil if WINDOW is the root window of its frame." "Return t if WINDOW is the root window of its frame."
(eq window (frame-root-window window))) (eq window (frame-root-window window)))
(defun window--subtree (window &optional next) (defun window--subtree (window &optional next)
......
...@@ -383,7 +383,7 @@ nsberror (Lisp_Object spec) ...@@ -383,7 +383,7 @@ nsberror (Lisp_Object spec)
} }
DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0, DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0,
doc: /* Return non-nil if OBJECT is a buffer which has not been killed. doc: /* Return t if OBJECT is a buffer which has not been killed.
Value is nil if OBJECT is not a buffer or if it has been killed. */) Value is nil if OBJECT is not a buffer or if it has been killed. */)
(Lisp_Object object) (Lisp_Object object)
{ {
......
...@@ -10053,7 +10053,7 @@ The list of capabilities can include one or more of the following: ...@@ -10053,7 +10053,7 @@ The list of capabilities can include one or more of the following:
DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 1, 1, 0, DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 1, 1, 0,
doc: /* Initialize image library implementing image type TYPE. doc: /* Initialize image library implementing image type TYPE.
Return non-nil if TYPE is a supported image type. Return t if TYPE is a supported image type.
If image libraries are loaded dynamically (currently only the case on If image libraries are loaded dynamically (currently only the case on
MS-Windows), load the library for TYPE if it is not yet loaded, using MS-Windows), load the library for TYPE if it is not yet loaded, using
......
...@@ -384,7 +384,7 @@ If FRAME is omitted or nil, it defaults to the selected frame. */) ...@@ -384,7 +384,7 @@ If FRAME is omitted or nil, it defaults to the selected frame. */)
DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p, DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p,
Swindow_minibuffer_p, 0, 1, 0, Swindow_minibuffer_p, 0, 1, 0,
doc: /* Return non-nil if WINDOW is a minibuffer window. doc: /* Return t if WINDOW is a minibuffer window.
WINDOW must be a valid window and defaults to the selected one. */) WINDOW must be a valid window and defaults to the selected one. */)
(Lisp_Object window) (Lisp_Object window)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment