[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/rcirc-update 7a89e0f 2/7: Rename rcirc-omit-after-reconnect to r
From: |
Philip Kaludercic |
Subject: |
feature/rcirc-update 7a89e0f 2/7: Rename rcirc-omit-after-reconnect to rcirc-omit-after-connect |
Date: |
Sat, 11 Sep 2021 11:06:45 -0400 (EDT) |
branch: feature/rcirc-update
commit 7a89e0f822eaf47d4f89aa1e5f80dd0a6b4c6b7d
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Rename rcirc-omit-after-reconnect to rcirc-omit-after-connect
* rcirc.el (rcirc-omit-after-reconnect): Remove variable
(rcirc-omit-responses-after-join): Add variable
(rcirc-reconncting): Remove variable
(rcirc-joined): Add variable
(rcirc-get-buffer-create): Set rcirc-joined
(rcirc-print): Use rcirc-joined
(reconnect): Remove code relating to rcirc-reconncting
---
lisp/net/rcirc.el | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 8129be3..d5b3664 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -194,16 +194,15 @@ 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."
+(defcustom rcirc-omit-responses-after-join '()
+ "Types of messages to hide right after joining a channel."
:type '(repeat string)
:version "28.1")
-(defvar-local rcirc-reconncting nil
- "Non-nil means we have just reconnected.
+(defvar-local rcirc-joined nil
+ "Non-nil means we have just connected.
This is used to hide the message types enumerated in
-`rcirc-supress-after-reconnect'.")
+`rcirc-omit-responses-after-join'.")
(defvar-local rcirc-prompt-start-marker nil
"Marker indicating the beginning of the message prompt.")
@@ -1493,10 +1492,11 @@ Create the buffer if it doesn't exist."
(rcirc-generate-new-buffer-name process target))))
(with-current-buffer new-buffer
(unless (eq major-mode 'rcirc-mode)
- (rcirc-mode process target)))
+ (rcirc-mode process target))
(setq mode-line-process nil)
- (rcirc-put-nick-channel process (rcirc-nick process) target
- rcirc-current-line)
+ (setq rcirc-joined (current-time)))
+ (rcirc-put-nick-channel process (rcirc-nick process) target
+ rcirc-current-line)
new-buffer)))))
(defun rcirc-send-input ()
@@ -1891,9 +1891,9 @@ connection."
(let ((last-activity-lines (rcirc-elapsed-lines process sender
target)))
(if (and (not (string= (rcirc-nick process) sender))
(or (member response rcirc-omit-responses)
- (if (member response rcirc-omit-after-reconnect)
- rcirc-reconncting
- (setq rcirc-reconncting nil)))
+ (and (member response
rcirc-omit-responses-after-join)
+ (< (time-to-seconds (time-since
rcirc-joined))
+ 1)))
(or (not last-activity-lines)
(< rcirc-omit-threshold last-activity-lines)))
(put-text-property (point-min) (point-max)
@@ -2588,9 +2588,6 @@ 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)
- feature/rcirc-update updated (a66fd7b -> 2e24b66), Philip Kaludercic, 2021/09/11
- feature/rcirc-update 7a89e0f 2/7: Rename rcirc-omit-after-reconnect to rcirc-omit-after-connect,
Philip Kaludercic <=
- feature/rcirc-update 550011c 3/7: * rcirc.texi: Document rcirc-omit-responses-after-join, Philip Kaludercic, 2021/09/11
- feature/rcirc-update 2e24b66 7/7: * rcirc.texi: Replace defun-rcirc-command with rcirc-define-command, Philip Kaludercic, 2021/09/11
- feature/rcirc-update 0d08745 4/7: * rcirc.texi: Document rcirc-track-ignore-server-buffer-flag, Philip Kaludercic, 2021/09/11
- feature/rcirc-update 88b6237 5/7: * rcirc.texi: Document rcirc-nick-filter and rcirc-channel-filter, Philip Kaludercic, 2021/09/11
- feature/rcirc-update 6d31d5b 1/7: Merge branch 'master' into feature/rcirc-update, Philip Kaludercic, 2021/09/11
- feature/rcirc-update 251a9f5 6/7: * rcirc.texi: Document rcirc-track-abbrevate-flag, Philip Kaludercic, 2021/09/11