diff options
| author | Stefan Kangas | 2022-08-09 20:29:27 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-08-09 21:58:00 +0200 |
| commit | caabc5a4ab584e00417d3d1f9a2bf0ee9052b092 (patch) | |
| tree | 36081c843087d47061c8d595e5fa9304721641ad | |
| parent | fd4aad569783befeafceb3cdfa6c4b192cafbf60 (diff) | |
| download | emacs-caabc5a4ab584e00417d3d1f9a2bf0ee9052b092.tar.gz emacs-caabc5a4ab584e00417d3d1f9a2bf0ee9052b092.zip | |
* lisp/nxml/rng-util.el (rng-collapse-space): Simplify.
| -rw-r--r-- | lisp/nxml/rng-util.el | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lisp/nxml/rng-util.el b/lisp/nxml/rng-util.el index da51e81dbe7..70951f35d5d 100644 --- a/lisp/nxml/rng-util.el +++ b/lisp/nxml/rng-util.el | |||
| @@ -72,13 +72,8 @@ LIST is not modified." | |||
| 72 | t)) | 72 | t)) |
| 73 | 73 | ||
| 74 | (defun rng-collapse-space (string) | 74 | (defun rng-collapse-space (string) |
| 75 | (setq string | 75 | (string-trim |
| 76 | (replace-regexp-in-string "[ \t\r\n]+" " " string t t)) | 76 | (replace-regexp-in-string "[ \t\r\n]+" " " string t t))) |
| 77 | (when (string-match "\\` " string) | ||
| 78 | (setq string (substring string 1))) | ||
| 79 | (when (string-match " \\'" string) | ||
| 80 | (setq string (substring string 0 -1))) | ||
| 81 | string) | ||
| 82 | 77 | ||
| 83 | (define-error 'rng-error nil) | 78 | (define-error 'rng-error nil) |
| 84 | 79 | ||