1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Prefer erc--skip property to erc-track--skipped-msgs

* lisp/erc/erc-stamp.el (erc-add-timestamp): Honor an overriding
`erc--ts' "msg prop".
(erc-stamp--defer-date-insertion-on-post-modify): Add `erc--skip'
for the `track' module.
* lisp/erc/erc-track.el (erc-track--skipped-msgs): Remove unused
variable.  Originally added as part of bug#60936.
(erc-track-modified-channels): Rely on the `erc--skip' "msg prop"
instead of the now defunct `erc-track--skipped-msgs' variable for
detecting requests to omit `track' mode-line updates during
`erc-display-message'.
This commit is contained in:
F. Jason Park 2024-05-06 21:59:48 -07:00
parent d647a52387
commit 36c68e7e34
2 changed files with 5 additions and 7 deletions

View file

@ -243,7 +243,8 @@ or `erc-send-modify-hook'."
(unless (and (not erc-stamp--allow-unmanaged-p)
(or (null erc--msg-props)
(erc--memq-msg-prop 'erc--skip 'stamp)))
(let* ((ct (erc-stamp--current-time))
(let* ((ct (or (erc--check-msg-prop 'erc--ts)
(erc-stamp--current-time)))
(invisible (get-text-property (point-min) 'invisible))
(erc-stamp--invisible-property
;; FIXME on major version bump, make this `erc-' prefixed.
@ -737,7 +738,8 @@ non-nil."
(setq erc-stamp--deferred-date-stamp nil)
(let* ((aligned (erc-stamp--time-as-day ct))
(erc-stamp--current-time aligned)
(erc--msg-props (map-into '((erc--msg . datestamp))
(erc--msg-props (map-into '((erc--msg . datestamp)
(erc--skip track))
'hash-table))
(erc-insert-post-hook
`(,(lambda ()

View file

@ -959,9 +959,6 @@ NEW-FACES has a cdr."
(throw 'face candidate))))))
choice)))
(defvar erc-track--skipped-msgs '(datestamp)
"Values of `erc--msg' text prop to ignore.")
(defun erc-track-modified-channels ()
"Hook function for `erc-insert-post-hook'.
Check if the current buffer should be added to the mode line as a
@ -980,8 +977,7 @@ the current buffer is in `erc-mode'."
erc-track-exclude-types)
;; Skip certain non-server-sent messages.
(and (not parsed)
(erc--check-msg-prop 'erc--msg
erc-track--skipped-msgs))))))
(erc--memq-msg-prop 'erc--skip 'track))))))
;; If the active buffer is not visible (not shown in a
;; window), and not to be excluded, determine the kinds of
;; faces used in the current message, and unless the user