[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 2bb0703 1/2: lisp/*.el: Force non-nil result to t,
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] master 2bb0703 1/2: lisp/*.el: Force non-nil result to t, to match docstring |
Date: |
Wed, 16 Oct 2019 20:46:04 -0400 (EDT) |
branch: master
commit 2bb0703e24ec1b02bb2ab4be67719e2e050cc4d3
Author: Juanma Barranquero <address@hidden>
Commit: Juanma Barranquero <address@hidden>
lisp/*.el: Force non-nil result to t, to match docstring
* lisp/emacs-lock.el (emacs-lock-live-process-p):
* lisp/shadowfile.el (shadow-file-match):
* lisp/emacs-lisp/edebug.el (edebug-basic-spec):
* lisp/mail/rmail.el (rmail-expunge-confirmed):
* lisp/net/soap-client.el (soap-should-encode-value-for-xs-element):
* lisp/progmodes/idlwave.el (idlwave-quoted):
* lisp/progmodes/idlw-shell.el (idlwave-shell-filename-string):
* lisp/textmodes/refbib.el (r2b-isa-proceedings):
* lisp/textmodes/texnfo-upd.el (texinfo-find-lower-level-node):
Normalize boolean result.
---
lisp/emacs-lisp/edebug.el | 3 ++-
lisp/emacs-lock.el | 2 +-
lisp/mail/rmail.el | 6 ++++--
lisp/net/soap-client.el | 2 +-
lisp/progmodes/idlw-shell.el | 2 +-
lisp/progmodes/idlwave.el | 2 +-
lisp/shadowfile.el | 3 ++-
lisp/textmodes/refbib.el | 5 +++--
lisp/textmodes/texnfo-upd.el | 35 ++++++++++++++++++-----------------
9 files changed, 33 insertions(+), 27 deletions(-)
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index cd709c7..bfec807 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -258,7 +258,8 @@ An extant spec symbol is a symbol that is not a function
and has a
(setq spec (cdr spec)))
t))
((symbolp spec)
- (unless (functionp spec) (function-get spec 'edebug-form-spec)))))
+ (unless (functionp spec)
+ (and (function-get spec 'edebug-form-spec) t)))))
;;; Utilities
diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el
index 0cded29..1c1ea59 100644
--- a/lisp/emacs-lock.el
+++ b/lisp/emacs-lock.el
@@ -115,7 +115,7 @@ Internal use only.")
(defun emacs-lock-live-process-p (buffer-or-name)
"Return t if BUFFER-OR-NAME is associated with a live process."
- (process-live-p (get-buffer-process buffer-or-name)))
+ (and (process-live-p (get-buffer-process buffer-or-name)) t))
(defun emacs-lock--can-auto-unlock (action)
"Return t if the current buffer can auto-unlock for ACTION.
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 34f8a46..0b5f564 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -3547,8 +3547,10 @@ If `rmail-confirm-expunge' is non-nil, ask user to
confirm."
(and (stringp rmail-deleted-vector)
(string-match "D" rmail-deleted-vector)
(if rmail-confirm-expunge
- (funcall rmail-confirm-expunge
- "Erase deleted messages from Rmail file? ")
+ (and (funcall rmail-confirm-expunge
+ "Erase deleted messages from Rmail file? ")
+ ;; In case r-c-e's function returns non-nil, non-t
+ t)
t)))
(defun rmail-only-expunge (&optional dont-show)
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index 956e2cf..535e46c 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -844,7 +844,7 @@ This is a specialization of `soap-encode-attributes' for
"Return t if VALUE should be encoded for ELEMENT, nil otherwise."
(cond
;; if value is not nil, attempt to encode it
- (value)
+ (value t)
;; value is nil, but the element's type is a boolean, so nil in this case
;; means "false". We need to encode it.
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index dde51b3..3367454 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -2155,7 +2155,7 @@ args of an executive .run, .rnew or .compile."
;; Skip backwards over file name chars
(skip-chars-backward idlwave-shell-file-name-chars limit)
;; Check of the next char is a string delimiter
- (memq (preceding-char) '(?\' ?\")))))
+ (and (memq (preceding-char) '(?\' ?\")) t))))
(defun idlwave-shell-batch-command ()
"Return t if we're in a batch command statement like @foo"
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 3535a7b..9c46ac8 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -3629,7 +3629,7 @@ Calling from a program, arguments are START END."
(defun idlwave-quoted ()
"Return t if point is in a comment or quoted string.
Returns nil otherwise."
- (or (idlwave-in-comment) (idlwave-in-quote)))
+ (and (or (idlwave-in-comment) (idlwave-in-quote)) t))
(defun idlwave-in-quote ()
"Return location of the opening quote
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el
index 6340c9f..8d9b80b 100644
--- a/lisp/shadowfile.el
+++ b/lisp/shadowfile.el
@@ -417,7 +417,8 @@ filename expansion or contraction, you must do that
yourself first."
(tramp-file-name-localname file-sup))
(string-equal
(tramp-file-name-localname pattern-sup)
- (tramp-file-name-localname file-sup))))))
+ (tramp-file-name-localname file-sup)))
+ t)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; User-level Commands
diff --git a/lisp/textmodes/refbib.el b/lisp/textmodes/refbib.el
index 3ba52e6..207fcf2 100644
--- a/lisp/textmodes/refbib.el
+++ b/lisp/textmodes/refbib.el
@@ -498,8 +498,9 @@ try to replace the {DATA} with an abbreviation."
(assoc name r2b-proceedings-list)
(let ((match (assoc name r2b-booktitle-abbrevs)))
(and match
- (string-match "proceedings\\|conference" (car (cdr match)))))
- )))
+ (string-match "proceedings\\|conference" (car (cdr match))))))
+ t
+ ))
(defun r2b-isa-university (name)
"Return t if NAME is a university or similar organization,
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el
index 134f82b..e2a0ed9 100644
--- a/lisp/textmodes/texnfo-upd.el
+++ b/lisp/textmodes/texnfo-upd.el
@@ -410,23 +410,24 @@ and to the end of the menu region for the level.
Return t if the node is found, else nil. Leave point at the beginning
of the node if one is found; else do not move point."
(let ((case-fold-search t))
- (if (and (< (point) region-end)
- (re-search-forward
- (concat
- "\\(^@node\\).*\n" ; match node line
- "\\(\\(\\(^@c\\).*\n\\)" ; match comment line, if any
- "\\|" ; or
- "\\(^@ifinfo[ ]*\n\\)" ; ifinfo line, if any
- "\\|" ; or
- "\\(^@ifnottex[ ]*\n\\)" ; ifnottex line, if any
- "\\)?" ; end of expression
- (eval (cdr (assoc level texinfo-update-menu-lower-regexps))))
- ;; the next higher level node marks the end of this
- ;; section, and no lower level node will be found beyond
- ;; this position even if region-end is farther off
- (texinfo-update-menu-region-end level)
- t))
- (goto-char (match-beginning 1)))))
+ (when (and (< (point) region-end)
+ (re-search-forward
+ (concat
+ "\\(^@node\\).*\n" ; match node line
+ "\\(\\(\\(^@c\\).*\n\\)" ; match comment line, if any
+ "\\|" ; or
+ "\\(^@ifinfo[ ]*\n\\)" ; ifinfo line, if any
+ "\\|" ; or
+ "\\(^@ifnottex[ ]*\n\\)" ; ifnottex line, if any
+ "\\)?" ; end of expression
+ (eval (cdr (assoc level texinfo-update-menu-lower-regexps))))
+ ;; the next higher level node marks the end of this
+ ;; section, and no lower level node will be found beyond
+ ;; this position even if region-end is farther off
+ (texinfo-update-menu-region-end level)
+ t))
+ (goto-char (match-beginning 1))
+ t)))
(defun texinfo-find-higher-level-node (level region-end)
"Search forward from point for node at any higher level than argument LEVEL.