aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias EngdegÄrd2019-09-01 14:26:18 +0200
committerMattias EngdegÄrd2019-09-01 14:28:01 +0200
commit4051fa3ba9b4527b57b4cd114ddaaf72a3b23528 (patch)
tree793ec8d456bc4a0a611b9d88a9889b1c0e947c45
parente8c46c2b6f76cc055366041b6112d61dd5f2dcf4 (diff)
downloademacs-4051fa3ba9b4527b57b4cd114ddaaf72a3b23528.tar.gz
emacs-4051fa3ba9b4527b57b4cd114ddaaf72a3b23528.zip
Clarify what counts as whitespace in `string-blank-p'
* lisp/emacs-lisp/subr-x.el (string-blank-p): Expand doc string.
-rw-r--r--lisp/emacs-lisp/subr-x.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index f76409c4de8..bb2bf3dd5fa 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -236,7 +236,9 @@ TRIM-LEFT and TRIM-RIGHT default to \"[ \\t\\n\\r]+\"."
236 (string-trim-left (string-trim-right string trim-right) trim-left)) 236 (string-trim-left (string-trim-right string trim-right) trim-left))
237 237
238(defsubst string-blank-p (string) 238(defsubst string-blank-p (string)
239 "Check whether STRING is either empty or only whitespace." 239 "Check whether STRING is either empty or only whitespace.
240The following characters count as whitespace here: space, tab, newline and
241carriage return."
240 (string-match-p "\\`[ \t\n\r]*\\'" string)) 242 (string-match-p "\\`[ \t\n\r]*\\'" string))
241 243
242(defsubst string-remove-prefix (prefix string) 244(defsubst string-remove-prefix (prefix string)