mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-10 08:10:21 -08:00
Make string-chop-newline more efficient
* lisp/emacs-lisp/subr-x.el (string-chop-newline): Make more efficient.
This commit is contained in:
parent
768522750d
commit
7e86d3bb9b
1 changed files with 1 additions and 1 deletions
|
|
@ -341,7 +341,7 @@ string."
|
|||
|
||||
(defun string-chop-newline (string)
|
||||
"Remove the final newline (if any) from STRING."
|
||||
(replace-regexp-in-string "\n\\'" "" string))
|
||||
(string-remove-suffix "\n" string))
|
||||
|
||||
(defun replace-region-contents (beg end replace-fn
|
||||
&optional max-secs max-costs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue