emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 496202d: Make erc-cmd-CLEAR do what its doc string


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 496202d: Make erc-cmd-CLEAR do what its doc string says
Date: Wed, 23 Oct 2019 05:14:03 -0400 (EDT)

branch: master
commit 496202d00ead9cdb649443f831e3cc8dfcf6aadd
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    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).
---
 lisp/erc/erc.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 65a4d50..86f103e 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)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]