Make string-clean-whitespace work on non-ASCII whitespace, too
* lisp/emacs-lisp/subr-x.el (string-clean-whitespace): Also clean up non-ASCII whitespace.
This commit is contained in:
parent
c9a95237a8
commit
768522750d
1 changed files with 3 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue