From: Mattias EngdegÄrd Date: Sun, 1 Sep 2019 12:26:18 +0000 (+0200) Subject: Clarify what counts as whitespace in `string-blank-p' X-Git-Tag: emacs-27.0.90~1553^2~59 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4051fa3ba9b4527b57b4cd114ddaaf72a3b23528;p=emacs.git Clarify what counts as whitespace in `string-blank-p' * lisp/emacs-lisp/subr-x.el (string-blank-p): Expand doc string. --- 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)