[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/rcirc-update fd96e3a 18/18: Allow hiding certain message types a
From: |
Philip Kaludercic |
Subject: |
feature/rcirc-update fd96e3a 18/18: Allow hiding certain message types after reconnecting |
Date: |
Thu, 10 Jun 2021 11:43:41 -0400 (EDT) |
branch: feature/rcirc-update
commit fd96e3a0d9f8180ed4ef4829c7a738d10a4b858e
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Allow hiding certain message types after reconnecting
* rcirc.el (rcirc-omit-after-reconnect): Add new user option
(rcirc-reconncting): Add new variable
(rcirc-print): Check if message should be omitted
(reconnect): Mark buffers as freshly reconnected
---
lisp/net/rcirc.el | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 4144a28..abe4cfb 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -194,6 +194,17 @@ If nil, no maximum is applied."
"Responses which will be hidden when `rcirc-omit-mode' is enabled."
:type '(repeat string))
+(defcustom rcirc-omit-after-reconnect
+ '("JOIN" "TOPIC" "NAMES")
+ "Types of messages to hide right after reconnecting."
+ :type '(repeat string)
+ :version "28.1")
+
+(defvar-local rcirc-reconncting nil
+ "Non-nil means we have just reconnected.
+This is used to hide the message types enumerated in
+`rcirc-supress-after-reconnect'.")
+
(defvar-local rcirc-prompt-start-marker nil
"Marker indicating the beginning of the message prompt.")
@@ -1795,7 +1806,10 @@ connection."
;; make text omittable
(let ((last-activity-lines (rcirc-elapsed-lines process sender
target)))
(if (and (not (string= (rcirc-nick process) sender))
- (member response rcirc-omit-responses)
+ (or (member response rcirc-omit-responses)
+ (if (member response rcirc-omit-after-reconnect)
+ rcirc-reconncting
+ (setq rcirc-reconncting nil)))
(or (not last-activity-lines)
(< rcirc-omit-threshold last-activity-lines)))
(put-text-property (point-min) (point-max)
@@ -2465,6 +2479,9 @@ to `rcirc-default-part-reason'."
(setf (nth 5 conn-info)
(cl-remove-if-not #'rcirc-channel-p
(mapcar #'car rcirc-buffer-alist)))
+ (dolist (buf (nth 5 conn-info))
+ (with-current-buffer (cdr (assoc buf rcirc-buffer-alist))
+ (setq rcirc-reconncting t)))
(apply #'rcirc-connect conn-info))))))
(rcirc-define-command nick (nick)
- branch feature/rcirc-update created (now fd96e3a), Philip Kaludercic, 2021/06/10
- feature/rcirc-update c6b6c2d 02/18: Use auth-source for user-passwords, Philip Kaludercic, 2021/06/10
- feature/rcirc-update fb15875 03/18: Fix checkdoc complaints and related issues, Philip Kaludercic, 2021/06/10
- feature/rcirc-update c300326 12/18: Add TAGMSG handler, Philip Kaludercic, 2021/06/10
- feature/rcirc-update fd96e3a 18/18: Allow hiding certain message types after reconnecting,
Philip Kaludercic <=
- feature/rcirc-update 8ea5766 05/18: Recognize quoted commands in rcirc-process-input-line, Philip Kaludercic, 2021/06/10
- feature/rcirc-update 06af44e 08/18: Create framework for IRCv3 support, Philip Kaludercic, 2021/06/10
- feature/rcirc-update ab49a9a 10/18: Implement batch extension, Philip Kaludercic, 2021/06/10
- feature/rcirc-update f6e18c6 13/18: Implement invite-notify capability, Philip Kaludercic, 2021/06/10
- feature/rcirc-update 567e288 11/18: Implement message-ids extension, Philip Kaludercic, 2021/06/10
- feature/rcirc-update 95fdd4b 14/18: Allow filtering how nicks are presented, Philip Kaludercic, 2021/06/10
- feature/rcirc-update b67b1ee 15/18: Fix prompt doubling when reconnecting, Philip Kaludercic, 2021/06/10
- feature/rcirc-update 6898816 01/18: Default to libera instead of freenode, Philip Kaludercic, 2021/06/10
- feature/rcirc-update 0b367ec 06/18: Remove custom rcirc-completion implementation, Philip Kaludercic, 2021/06/10
- feature/rcirc-update 4ff1f66 07/18: Replace defun-rcirc-command with rcirc-define-command, Philip Kaludercic, 2021/06/10