diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2019-10-17 02:45:06 +0200 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2019-10-17 02:45:06 +0200 |
commit | 3ad407005bf6560f4db40cab9dbeeabe554fb457 (patch) | |
tree | 220cc14a498e7586c8c330ac4766ab7c10b3d26b /lisp | |
parent | 2bb0703e24ec1b02bb2ab4be67719e2e050cc4d3 (diff) | |
download | emacs-3ad407005bf6560f4db40cab9dbeeabe554fb457.tar.gz |
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.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/files.el | 2 | ||||
-rw-r--r-- | lisp/image.el | 2 | ||||
-rw-r--r-- | lisp/play/doctor.el | 4 | ||||
-rw-r--r-- | lisp/progmodes/ebrowse.el | 3 | ||||
-rw-r--r-- | lisp/progmodes/flymake-proc.el | 4 | ||||
-rw-r--r-- | lisp/progmodes/js.el | 2 | ||||
-rw-r--r-- | lisp/simple.el | 2 | ||||
-rw-r--r-- | lisp/window.el | 2 |
8 files changed, 11 insertions, 10 deletions
diff --git a/lisp/files.el b/lisp/files.el index 40807617fae..4b364b49d84 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3853,7 +3853,7 @@ It is dangerous if either of these conditions are met: (hack-one-local-variable-quotep 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)) ;; Detect certain `put' expressions. (and (eq (car exp) 'put) diff --git a/lisp/image.el b/lisp/image.el index e44330fdfa9..66fb5fa5fc9 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -408,7 +408,7 @@ Optional DATA-P non-nil means SOURCE is a string containing image data." ;;;###autoload (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'." (and (fboundp 'init-image-library) (init-image-library type))) diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index b1ab6703a48..fbcdb5ebbe4 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el @@ -1023,7 +1023,7 @@ the subject noun, and return the portion of the sentence following it." nil)))) (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) (not (or (doctor-verbp x) (equal x 'not) @@ -1031,7 +1031,7 @@ the subject noun, and return the portion of the sentence following it." (doctor-modifierp 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 '( i me mine myself we us ours ourselves ourself diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 733e3735821..eb0ec87a222 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -2641,7 +2641,8 @@ means the member buffer is standalone. CLASS is its class." (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)) (or (null ebrowse--const-display-flag) (ebrowse-const-p member)) diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el index f08ba2f3681..571ee170e32 100644 --- a/lisp/progmodes/flymake-proc.el +++ b/lisp/progmodes/flymake-proc.el @@ -444,7 +444,7 @@ instead of reading master file from disk." (defun flymake-proc--check-include (source-file-name inc-name include-dirs) "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) (flymake-proc--same-files source-file-name inc-name) (while (and include-dirs @@ -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) "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))) (if buffer-name (get-buffer buffer-name)))) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 8d457a28ec2..599923dd279 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -2703,7 +2703,7 @@ Whitespace and comments around the arrow are ignored.") (defun js--broken-arrow-terminates-line-p () "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)." (let ((from (point))) (end-of-line) diff --git a/lisp/simple.el b/lisp/simple.el index b733f76ac76..e44b877931b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5685,7 +5685,7 @@ For some commands, it may be appropriate to ignore the value of t)) (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 mode is enabled. Usually, such commands should use diff --git a/lisp/window.el b/lisp/window.el index af35f9abe6b..058e89df7c7 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -3867,7 +3867,7 @@ POSITION defaults to the value of `window-point' of WINDOW." (+ (nth 1 edges) (nth 1 pos-in-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))) (defun window--subtree (window &optional next) |