diff options
Diffstat (limited to 'lisp/emacs-lisp/subr-x.el')
-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 80d4cb9b650..4d1a73a251a 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -269,7 +269,9 @@ carriage return." All sequences of whitespaces in STRING are collapsed into a single space character, and leading/trailing whitespace is removed." - (string-trim (replace-regexp-in-string "[ \t\n\r]+" " " string))) + (let ((blank "[[:blank:]\n]+")) + (string-trim (replace-regexp-in-string blank " " string) + blank blank))) (defun string-fill (string length) "Try to word-wrap STRING so that no lines are longer than LENGTH. |