From 4051fa3ba9b4527b57b4cd114ddaaf72a3b23528 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sun, 1 Sep 2019 14:26:18 +0200 Subject: [PATCH] Clarify what counts as whitespace in `string-blank-p' * lisp/emacs-lisp/subr-x.el (string-blank-p): Expand doc string. --- lisp/emacs-lisp/subr-x.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.39.5