diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2019-09-01 14:26:18 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2019-09-01 14:28:01 +0200 |
commit | 4051fa3ba9b4527b57b4cd114ddaaf72a3b23528 (patch) | |
tree | 793ec8d456bc4a0a611b9d88a9889b1c0e947c45 /lisp/emacs-lisp | |
parent | e8c46c2b6f76cc055366041b6112d61dd5f2dcf4 (diff) | |
download | emacs-4051fa3ba9b4527b57b4cd114ddaaf72a3b23528.tar.gz emacs-4051fa3ba9b4527b57b4cd114ddaaf72a3b23528.tar.bz2 emacs-4051fa3ba9b4527b57b4cd114ddaaf72a3b23528.zip |
Clarify what counts as whitespace in `string-blank-p'
* lisp/emacs-lisp/subr-x.el (string-blank-p): Expand doc string.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/subr-x.el | 4 |
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]+\"." (string-trim-left (string-trim-right string trim-right) trim-left)) (defsubst string-blank-p (string) - "Check whether STRING is either empty or only whitespace." + "Check whether STRING is either empty or only whitespace. +The following characters count as whitespace here: space, tab, newline and +carriage return." (string-match-p "\\`[ \t\n\r]*\\'" string)) (defsubst string-remove-prefix (prefix string) |