diff options
| author | Juanma Barranquero | 2019-10-17 02:45:06 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2019-10-17 02:45:06 +0200 |
| commit | 3ad407005bf6560f4db40cab9dbeeabe554fb457 (patch) | |
| tree | 220cc14a498e7586c8c330ac4766ab7c10b3d26b | |
| parent | 2bb0703e24ec1b02bb2ab4be67719e2e050cc4d3 (diff) | |
| download | emacs-3ad407005bf6560f4db40cab9dbeeabe554fb457.tar.gz emacs-3ad407005bf6560f4db40cab9dbeeabe554fb457.zip | |
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.
| -rw-r--r-- | doc/lispref/minibuf.texi | 4 | ||||
| -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 | ||||
| -rw-r--r-- | src/buffer.c | 2 | ||||
| -rw-r--r-- | src/image.c | 2 | ||||
| -rw-r--r-- | src/window.c | 2 |
12 files changed, 16 insertions, 15 deletions
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index a9d6e83cf85..dd51181db00 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi | |||
| @@ -2364,8 +2364,8 @@ minibuffer window according to the selected frame. | |||
| 2364 | 2364 | ||
| 2365 | @c Emacs 19 feature | 2365 | @c Emacs 19 feature |
| 2366 | @defun window-minibuffer-p &optional window | 2366 | @defun window-minibuffer-p &optional window |
| 2367 | This function returns non-@code{nil} if @var{window} is a minibuffer | 2367 | This function returns @code{t} if @var{window} is a minibuffer window. |
| 2368 | window. @var{window} defaults to the selected window. | 2368 | @var{window} defaults to the selected window. |
| 2369 | @end defun | 2369 | @end defun |
| 2370 | 2370 | ||
| 2371 | The following function returns the window showing the currently active | 2371 | The following function returns the window showing the currently active |
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: | |||
| 3853 | (hack-one-local-variable-quotep exp))) | 3853 | (hack-one-local-variable-quotep exp))) |
| 3854 | 3854 | ||
| 3855 | (defun hack-one-local-variable-eval-safep (exp) | 3855 | (defun hack-one-local-variable-eval-safep (exp) |
| 3856 | "Return t if it is safe to eval EXP when it is found in a file." | 3856 | "Return non-nil if it is safe to eval EXP when it is found in a file." |
| 3857 | (or (not (consp exp)) | 3857 | (or (not (consp exp)) |
| 3858 | ;; Detect certain `put' expressions. | 3858 | ;; Detect certain `put' expressions. |
| 3859 | (and (eq (car exp) 'put) | 3859 | (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." | |||
| 408 | 408 | ||
| 409 | ;;;###autoload | 409 | ;;;###autoload |
| 410 | (defun image-type-available-p (type) | 410 | (defun image-type-available-p (type) |
| 411 | "Return non-nil if image type TYPE is available. | 411 | "Return t if image type TYPE is available. |
| 412 | Image types are symbols like `xbm' or `jpeg'." | 412 | Image types are symbols like `xbm' or `jpeg'." |
| 413 | (and (fboundp 'init-image-library) | 413 | (and (fboundp 'init-image-library) |
| 414 | (init-image-library type))) | 414 | (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." | |||
| 1023 | nil)))) | 1023 | nil)))) |
| 1024 | 1024 | ||
| 1025 | (defun doctor-nounp (x) | 1025 | (defun doctor-nounp (x) |
| 1026 | "Return t if the symbol argument is a noun." | 1026 | "Return non-nil if the symbol argument is a noun." |
| 1027 | (or (doctor-pronounp x) | 1027 | (or (doctor-pronounp x) |
| 1028 | (not (or (doctor-verbp x) | 1028 | (not (or (doctor-verbp x) |
| 1029 | (equal x 'not) | 1029 | (equal x 'not) |
| @@ -1031,7 +1031,7 @@ the subject noun, and return the portion of the sentence following it." | |||
| 1031 | (doctor-modifierp x) )) )) | 1031 | (doctor-modifierp x) )) )) |
| 1032 | 1032 | ||
| 1033 | (defun doctor-pronounp (x) | 1033 | (defun doctor-pronounp (x) |
| 1034 | "Return t if the symbol argument is a pronoun." | 1034 | "Return non-nil if the symbol argument is a pronoun." |
| 1035 | (memq x '( | 1035 | (memq x '( |
| 1036 | i me mine myself | 1036 | i me mine myself |
| 1037 | we us ours ourselves ourself | 1037 | 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." | |||
| 2641 | 2641 | ||
| 2642 | 2642 | ||
| 2643 | (defun ebrowse-member-display-p (member) | 2643 | (defun ebrowse-member-display-p (member) |
| 2644 | "Return t if MEMBER must be displayed under the current filter settings." | 2644 | "Check if MEMBER must be displayed under the current filter settings. |
| 2645 | If so, return MEMBER; otherwise return nil." | ||
| 2645 | (if (and (aref ebrowse--filters (ebrowse-ms-visibility member)) | 2646 | (if (and (aref ebrowse--filters (ebrowse-ms-visibility member)) |
| 2646 | (or (null ebrowse--const-display-flag) | 2647 | (or (null ebrowse--const-display-flag) |
| 2647 | (ebrowse-const-p member)) | 2648 | (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." | |||
| 444 | 444 | ||
| 445 | (defun flymake-proc--check-include (source-file-name inc-name include-dirs) | 445 | (defun flymake-proc--check-include (source-file-name inc-name include-dirs) |
| 446 | "Check if SOURCE-FILE-NAME can be found in include path. | 446 | "Check if SOURCE-FILE-NAME can be found in include path. |
| 447 | Return t if it can be found via include path using INC-NAME." | 447 | Return non-nil if it can be found via include path using INC-NAME." |
| 448 | (if (file-name-absolute-p inc-name) | 448 | (if (file-name-absolute-p inc-name) |
| 449 | (flymake-proc--same-files source-file-name inc-name) | 449 | (flymake-proc--same-files source-file-name inc-name) |
| 450 | (while (and include-dirs | 450 | (while (and include-dirs |
| @@ -458,7 +458,7 @@ Return t if it can be found via include path using INC-NAME." | |||
| 458 | 458 | ||
| 459 | (defun flymake-proc--find-buffer-for-file (file-name) | 459 | (defun flymake-proc--find-buffer-for-file (file-name) |
| 460 | "Check if there exists a buffer visiting FILE-NAME. | 460 | "Check if there exists a buffer visiting FILE-NAME. |
| 461 | Return t if so, nil if not." | 461 | Return the buffer if it exists, nil if not." |
| 462 | (let ((buffer-name (get-file-buffer file-name))) | 462 | (let ((buffer-name (get-file-buffer file-name))) |
| 463 | (if buffer-name | 463 | (if buffer-name |
| 464 | (get-buffer buffer-name)))) | 464 | (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.") | |||
| 2703 | 2703 | ||
| 2704 | (defun js--broken-arrow-terminates-line-p () | 2704 | (defun js--broken-arrow-terminates-line-p () |
| 2705 | "Helper function for `js--proper-indentation'. | 2705 | "Helper function for `js--proper-indentation'. |
| 2706 | Return t if the last non-comment, non-whitespace token of the | 2706 | Return non-nil if the last non-comment, non-whitespace token of the |
| 2707 | current line is the \"=>\" token (of an arrow function)." | 2707 | current line is the \"=>\" token (of an arrow function)." |
| 2708 | (let ((from (point))) | 2708 | (let ((from (point))) |
| 2709 | (end-of-line) | 2709 | (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 | |||
| 5685 | t)) | 5685 | t)) |
| 5686 | 5686 | ||
| 5687 | (defun region-active-p () | 5687 | (defun region-active-p () |
| 5688 | "Return non-nil if Transient Mark mode is enabled and the mark is active. | 5688 | "Return t if Transient Mark mode is enabled and the mark is active. |
| 5689 | 5689 | ||
| 5690 | Some commands act specially on the region when Transient Mark | 5690 | Some commands act specially on the region when Transient Mark |
| 5691 | mode is enabled. Usually, such commands should use | 5691 | 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." | |||
| 3867 | (+ (nth 1 edges) (nth 1 pos-in-window))))))) | 3867 | (+ (nth 1 edges) (nth 1 pos-in-window))))))) |
| 3868 | 3868 | ||
| 3869 | (defun frame-root-window-p (window) | 3869 | (defun frame-root-window-p (window) |
| 3870 | "Return non-nil if WINDOW is the root window of its frame." | 3870 | "Return t if WINDOW is the root window of its frame." |
| 3871 | (eq window (frame-root-window window))) | 3871 | (eq window (frame-root-window window))) |
| 3872 | 3872 | ||
| 3873 | (defun window--subtree (window &optional next) | 3873 | (defun window--subtree (window &optional next) |
diff --git a/src/buffer.c b/src/buffer.c index 8cb28d8aa70..80eaa971a3a 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -383,7 +383,7 @@ nsberror (Lisp_Object spec) | |||
| 383 | } | 383 | } |
| 384 | 384 | ||
| 385 | DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0, | 385 | DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0, |
| 386 | doc: /* Return non-nil if OBJECT is a buffer which has not been killed. | 386 | doc: /* Return t if OBJECT is a buffer which has not been killed. |
| 387 | Value is nil if OBJECT is not a buffer or if it has been killed. */) | 387 | Value is nil if OBJECT is not a buffer or if it has been killed. */) |
| 388 | (Lisp_Object object) | 388 | (Lisp_Object object) |
| 389 | { | 389 | { |
diff --git a/src/image.c b/src/image.c index 7cf1bc4c362..08e420837a0 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -10053,7 +10053,7 @@ The list of capabilities can include one or more of the following: | |||
| 10053 | 10053 | ||
| 10054 | DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 1, 1, 0, | 10054 | DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 1, 1, 0, |
| 10055 | doc: /* Initialize image library implementing image type TYPE. | 10055 | doc: /* Initialize image library implementing image type TYPE. |
| 10056 | Return non-nil if TYPE is a supported image type. | 10056 | Return t if TYPE is a supported image type. |
| 10057 | 10057 | ||
| 10058 | If image libraries are loaded dynamically (currently only the case on | 10058 | If image libraries are loaded dynamically (currently only the case on |
| 10059 | MS-Windows), load the library for TYPE if it is not yet loaded, using | 10059 | MS-Windows), load the library for TYPE if it is not yet loaded, using |
diff --git a/src/window.c b/src/window.c index 1e6e148bf48..e4bb2daeb38 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -384,7 +384,7 @@ If FRAME is omitted or nil, it defaults to the selected frame. */) | |||
| 384 | 384 | ||
| 385 | DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p, | 385 | DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p, |
| 386 | Swindow_minibuffer_p, 0, 1, 0, | 386 | Swindow_minibuffer_p, 0, 1, 0, |
| 387 | doc: /* Return non-nil if WINDOW is a minibuffer window. | 387 | doc: /* Return t if WINDOW is a minibuffer window. |
| 388 | WINDOW must be a valid window and defaults to the selected one. */) | 388 | WINDOW must be a valid window and defaults to the selected one. */) |
| 389 | (Lisp_Object window) | 389 | (Lisp_Object window) |
| 390 | { | 390 | { |