]> git.eshelyaron.com Git - emacs.git/commitdiff
Add command to clear erc-track's mode-line indicator
authorAlex Bochannek <alex@bochannek.com>
Sat, 21 Dec 2024 19:39:08 +0000 (11:39 -0800)
committerEshel Yaron <me@eshelyaron.com>
Sat, 4 Jan 2025 20:22:06 +0000 (21:22 +0100)
* etc/ERC-NEWS: Mention new command `erc-track-clear'.
* lisp/erc/erc-track.el (erc-track-clear): New command to reset buffer
activity indicator in ERC's mode-line construct.  (Bug#75014)

(cherry picked from commit 63cc335a524ab5b6fb8e9bc93041382baf1321db)

etc/ERC-NEWS
lisp/erc/erc-track.el

index b7b49956d060e16973e4ddbdc362a6ada0f0d1c7..9554eaed4120c035340421b2d392d8178f554808 100644 (file)
@@ -49,6 +49,8 @@ speaker names, with the latter option also gaining 'erc-notice-face'.
 This was done to provide a more frequent and practical indication of
 channel activity in keeping with the module's original design.
 
+** Command 'erc-track-clear' clears the mode-line activity indicator.
+
 ** An arguably less distracting 'erc-nicks-track-faces' variant.
 Setting this option to t tells the 'track' module to have the mode-line
 indicator stick with the most recent speaker's face, even when they're
index d1c487de6f603e693f72e48155d36803f6082580..a1456a2971a3820f27c7a5d831d3f1345b340953 100644 (file)
@@ -900,6 +900,12 @@ Use `erc-make-mode-line-buffer-name' to create buttons."
   (when (called-interactively-p 'interactive)
     (erc-modified-channels-display)))
 
+(defun erc-track-clear ()
+  "Clear ERC's mode-line activity indicator."
+  (interactive)
+  (setq erc-modified-channels-alist nil)
+  (erc-modified-channels-display))
+
 (defun erc-track-find-face (faces)
   "Return the face to use in the mode line."
   (declare (obsolete erc-track-select-mode-line-face "28.1"))