emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master d4cfe67: lisp/*.el: Force non-nil result to t, to m


From: Juanma Barranquero
Subject: [Emacs-diffs] master d4cfe67: lisp/*.el: Force non-nil result to t, to match docstring
Date: Mon, 14 Oct 2019 17:53:34 -0400 (EDT)

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

    lisp/*.el: Force non-nil result to t, to match docstring
    
    * lisp/ido.el (ido-ignore-item-p):
    * lisp/simple.el (use-region-p):
    * lisp/whitespace.el (whitespace-style-face-p)
    (whitespace-style-mark-p):
    * lisp/calendar/cal-islam.el (calendar-islamic-leap-year-p):
    * lisp/mail/rmail.el (rmail-is-text-p):
    * lisp/mh-e/mh-alias.el (mh-alias-for-from-p):
    * lisp/net/imap.el (imap-message-flag-permanent-p):
    * lisp/progmodes/tcl.el (tcl-real-comment-p):
    * lisp/textmodes/table.el (table--point-in-cell-p):
    Normalize boolean result.
---
 lisp/calendar/cal-islam.el |  5 +++--
 lisp/ido.el                |  2 +-
 lisp/mail/rmail.el         |  2 +-
 lisp/mh-e/mh-alias.el      |  3 ++-
 lisp/net/imap.el           |  5 +++--
 lisp/progmodes/tcl.el      |  3 +--
 lisp/simple.el             |  3 ++-
 lisp/textmodes/table.el    |  3 ++-
 lisp/whitespace.el         | 10 ++++++----
 9 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el
index 81ac4d0..c31e3c4 100644
--- a/lisp/calendar/cal-islam.el
+++ b/lisp/calendar/cal-islam.el
@@ -45,8 +45,9 @@
 
 (defun calendar-islamic-leap-year-p (year)
   "Return t if YEAR is a leap year on the Islamic calendar."
-  (memq (% year 30)
-        (list 2 5 7 10 13 16 18 21 24 26 29)))
+  (and (memq (% year 30)
+             (list 2 5 7 10 13 16 18 21 24 26 29))
+       t))
 
 (defun calendar-islamic-last-day-of-month (month year)
   "The last day in MONTH during YEAR on the Islamic calendar."
diff --git a/lisp/ido.el b/lisp/ido.el
index 1cfcb0f..2a660e6 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -3890,7 +3890,7 @@ frame, rather than all frames, regardless of value of 
`ido-all-frames'."
 
 (defun ido-ignore-item-p (name re-list &optional ignore-ext)
   "Return t if the buffer or file NAME should be ignored."
-  (or (member name ido-ignore-item-temp-list)
+  (or (and (member name ido-ignore-item-temp-list) t)
       (and
        ido-process-ignore-lists re-list
        (save-match-data
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 93e7cb0..34f8a46 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -2738,7 +2738,7 @@ N defaults to the current message."
       ;; (a default of "text/plain; charset=US-ASCII" is assumed) or
       ;; the base content type is either text or message.
       (or (not content-type-header)
-         (string-match text-regexp content-type-header)))))
+         (and (string-match text-regexp content-type-header) t)))))
 
 (defcustom rmail-show-message-verbose-min 200000
   "Message size at which to show progress messages for displaying it."
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el
index 5573f22..632280e 100644
--- a/lisp/mh-e/mh-alias.el
+++ b/lisp/mh-e/mh-alias.el
@@ -485,7 +485,8 @@ set `mh-alias-insert-file' or the \"Aliasfile:\" profile 
component"))
           (set-buffer mh-show-buffer))
       (let ((from-header (mh-extract-from-header-value)))
         (and from-header
-             (mh-alias-address-to-alias from-header))))))
+             (mh-alias-address-to-alias from-header)
+             t)))))
 
 (defun mh-alias-add-alias-to-file (alias address &optional file)
   "Add ALIAS for ADDRESS in alias FILE without alias check or prompts.
diff --git a/lisp/net/imap.el b/lisp/net/imap.el
index 9f43c57..eb96309 100644
--- a/lisp/net/imap.el
+++ b/lisp/net/imap.el
@@ -1672,8 +1672,9 @@ non-nil, return these properties."
   "Return t if FLAG can be permanently saved on articles.
 MAILBOX specifies a mailbox on the server in BUFFER."
   (with-current-buffer (or buffer (current-buffer))
-    (or (member "\\*" (imap-mailbox-get 'permanentflags mailbox))
-       (member flag (imap-mailbox-get 'permanentflags mailbox)))))
+    (and (or (member "\\*" (imap-mailbox-get 'permanentflags mailbox))
+            (member flag (imap-mailbox-get 'permanentflags mailbox)))
+         t)))
 
 (defun imap-message-flags-set (articles flags &optional silent buffer)
   (when (and articles flags)
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index 0788725..e5fdd27 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -1221,7 +1221,6 @@ first word following a semicolon, opening brace, or 
opening bracket."
      (t
       (memq (preceding-char) '(?\; ?{ ?\[))))))
 
-;; FIXME doesn't actually return t.  See last case.
 (defun tcl-real-comment-p ()
   "Return t if point is just after the `#' beginning a real comment.
 Does not check to see if previous char is actually `#'.
@@ -1230,7 +1229,7 @@ preceded only by whitespace on the line, or has a 
preceding
 semicolon, opening brace, or opening bracket on the same line."
   (save-excursion
     (backward-char)
-    (tcl-real-command-p)))
+    (and (tcl-real-command-p) t)))
 
 (defun tcl-hairy-scan-for-comment (state end always-stop)
   "Determine if point is in a comment.
diff --git a/lisp/simple.el b/lisp/simple.el
index 2add266..b733f76 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5681,7 +5681,8 @@ the region must not be empty.  Otherwise, the return 
value is nil.
 For some commands, it may be appropriate to ignore the value of
 `use-empty-active-region'; in that case, use `region-active-p'."
   (and (region-active-p)
-       (or use-empty-active-region (> (region-end) (region-beginning)))))
+       (or use-empty-active-region (> (region-end) (region-beginning)))
+       t))
 
 (defun region-active-p ()
   "Return non-nil if Transient Mark mode is enabled and the mark is active.
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index f684f4e..94dcaea 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -4938,7 +4938,8 @@ When optional LOCATION is provided the test is performed 
at that location."
           (save-excursion
             (goto-char location)
             (table--probe-cell))
-        (table--probe-cell))))
+        (table--probe-cell))
+       t))
 
 (defun table--region-in-cell-p (beg end)
   "Return t when location BEG and END are in a valid table cell in the current 
buffer."
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index d0368b5..243e750 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -2025,7 +2025,8 @@ resultant list will be returned."
           (memq 'space-after-tab::space  whitespace-active-style)
           (memq 'space-before-tab        whitespace-active-style)
           (memq 'space-before-tab::tab   whitespace-active-style)
-          (memq 'space-before-tab::space whitespace-active-style))))
+          (memq 'space-before-tab::space whitespace-active-style))
+       t))
 
 
 (defun whitespace-color-on ()
@@ -2326,9 +2327,10 @@ Also refontify when necessary."
 
 (defun whitespace-style-mark-p ()
   "Return t if there is some visualization via display table."
-  (or (memq 'tab-mark     whitespace-active-style)
-      (memq 'space-mark   whitespace-active-style)
-      (memq 'newline-mark whitespace-active-style)))
+  (and (or (memq 'tab-mark     whitespace-active-style)
+           (memq 'space-mark   whitespace-active-style)
+           (memq 'newline-mark whitespace-active-style))
+       t))
 
 
 (defsubst whitespace-char-valid-p (char)



reply via email to

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