1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-23 18:47:57 +00:00

Tiny string-clean-whitespace simplification

* lisp/emacs-lisp/subr-x.el (string-clean-whitespace): Streamline by
treating replacement string as being literal and having fixed case.
This commit is contained in:
Basil L. Contovounesios 2020-12-21 22:34:33 +00:00
parent 7e86d3bb9b
commit 27fab4b140

View File

@ -270,7 +270,7 @@ All sequences of whitespaces in STRING are collapsed into a
single space character, and leading/trailing whitespace is
removed."
(let ((blank "[[:blank:]\n]+"))
(string-trim (replace-regexp-in-string blank " " string)
(string-trim (replace-regexp-in-string blank " " string t t)
blank blank)))
(defun string-fill (string length)