From: Juanma Barranquero Date: Mon, 14 Oct 2019 21:52:21 +0000 (+0200) Subject: lisp/*.el: Force non-nil result to t, to match docstring X-Git-Tag: emacs-27.0.90~1062 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d4cfe67e8ae4392fc1f01879f6d3a9a8b6947ac1;p=emacs.git 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. --- diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el index 81ac4d0332b..c31e3c480ac 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 1cfcb0f5358..2a660e6b0ce 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 93e7cb01334..34f8a46761b 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 5573f22072e..632280e74d0 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 9f43c57ffd3..eb963094212 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 0788725055e..e5fdd272438 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 2add2669604..b733f76ac76 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 f684f4e4ca9..94dcaea0ba6 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 d0368b54a80..243e7502461 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)