diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/subr-x.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index 4d1a73a251a..1c8e1d6293f 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -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) |