From: Lars Ingebrigtsen Date: Wed, 23 Oct 2019 09:13:54 +0000 (+0200) Subject: Make erc-cmd-CLEAR do what its doc string says X-Git-Tag: emacs-27.0.90~906 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=496202d00ead9cdb649443f831e3cc8dfcf6aadd;p=emacs.git Make erc-cmd-CLEAR do what its doc string says * lisp/erc/erc.el (erc-cmd-CLEAR): Delete the buffer contents instead of recentering (bug#31743). --- diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 65a4d5034de..86f103ef231 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -2939,7 +2939,8 @@ If no USER argument is specified, list the contents of `erc-ignore-list'." (defun erc-cmd-CLEAR () "Clear the window content." - (recenter 0) + (let ((inhibit-read-only t)) + (delete-region (point-min) (line-beginning-position))) t) (put 'erc-cmd-CLEAR 'process-not-needed t)