emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 3ad4070 2/2: lisp/*.el, src/*.c: Doc fixes related


From: Juanma Barranquero
Subject: [Emacs-diffs] master 3ad4070 2/2: lisp/*.el, src/*.c: Doc fixes related to returning t vs non-nil
Date: Wed, 16 Oct 2019 20:46:04 -0400 (EDT)

branch: master
commit 3ad407005bf6560f4db40cab9dbeeabe554fb457
Author: Juanma Barranquero <address@hidden>
Commit: Juanma Barranquero <address@hidden>

    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.
---
 doc/lispref/minibuf.texi       | 4 ++--
 lisp/files.el                  | 2 +-
 lisp/image.el                  | 2 +-
 lisp/play/doctor.el            | 4 ++--
 lisp/progmodes/ebrowse.el      | 3 ++-
 lisp/progmodes/flymake-proc.el | 4 ++--
 lisp/progmodes/js.el           | 2 +-
 lisp/simple.el                 | 2 +-
 lisp/window.el                 | 2 +-
 src/buffer.c                   | 2 +-
 src/image.c                    | 2 +-
 src/window.c                   | 2 +-
 12 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index a9d6e83..dd51181 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -2364,8 +2364,8 @@ minibuffer window according to the selected frame.
 
 @c Emacs 19 feature
 @defun window-minibuffer-p &optional window
-This function returns non-@code{nil} if @var{window} is a minibuffer
-window.  @var{window} defaults to the selected window.
+This function returns @code{t} if @var{window} is a minibuffer window.
+@var{window} defaults to the selected window.
 @end defun
 
 The following function returns the window showing the currently active
diff --git a/lisp/files.el b/lisp/files.el
index 4080761..4b364b4 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 e44330f..66fb5fa 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 b1ab670..fbcdb5e 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 733e373..eb0ec87 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 f08ba2f..571ee17 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 8d457a2..599923d 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 b733f76..e44b877 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 af35f9a..058e89d 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)
diff --git a/src/buffer.c b/src/buffer.c
index 8cb28d8..80eaa97 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -383,7 +383,7 @@ nsberror (Lisp_Object spec)
 }
 
 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.  */)
   (Lisp_Object object)
 {
diff --git a/src/image.c b/src/image.c
index 7cf1bc4..08e4208 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:
 
 DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 1, 1, 0,
        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
 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 1e6e148..e4bb2da 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.  */)
 
 DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p,
        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.  */)
   (Lisp_Object window)
 {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]