mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Use string-trim in newsticker--remove-whitespace
* lisp/net/newst-backend.el (newsticker--remove-whitespace): Use string-trim.
This commit is contained in:
parent
984b8f7ed0
commit
165675797e
1 changed files with 2 additions and 6 deletions
|
|
@ -1552,12 +1552,8 @@ argument, which is one of the items in ITEMLIST."
|
|||
|
||||
(defun newsticker--remove-whitespace (string)
|
||||
"Remove leading and trailing whitespace from STRING."
|
||||
;; we must have ...+ but not ...* in the regexps otherwise xemacs loops
|
||||
;; endlessly...
|
||||
(when (and string (stringp string))
|
||||
(replace-regexp-in-string
|
||||
"[ \t\r\n]+$" ""
|
||||
(replace-regexp-in-string "^[ \t\r\n]+" "" string))))
|
||||
(when (stringp string)
|
||||
(string-trim string)))
|
||||
|
||||
(defun newsticker--do-forget-preformatted (item)
|
||||
"Forget pre-formatted data for ITEM.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue