]> git.eshelyaron.com Git - emacs.git/commitdiff
Tiny string-clean-whitespace simplification
authorBasil L. Contovounesios <contovob@tcd.ie>
Mon, 21 Dec 2020 22:34:33 +0000 (22:34 +0000)
committerBasil L. Contovounesios <contovob@tcd.ie>
Mon, 21 Dec 2020 22:36:55 +0000 (22:36 +0000)
* lisp/emacs-lisp/subr-x.el (string-clean-whitespace): Streamline by
treating replacement string as being literal and having fixed case.

lisp/emacs-lisp/subr-x.el

index 1c8e1d6293f391a3c1b82115e67419cd49978c5a..aa39fc1538fbea23a753956c332d46fc352aa8ae 100644 (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)