Function: erc--hide-message
erc--hide-message is a byte-compiled function defined in erc.el.gz.
Signature
(erc--hide-message VALUE)
Documentation
Apply invisible text-property with VALUE to current message.
Expect to run in a narrowed buffer during message insertion.
Begin the invisible interval at the previous message's trailing
newline and end before the current message's. If the preceding
message ends in a double newline or there is no previous message,
don't bother including the preceding newline. Additionally,
record VALUE as part of the erc--hide property in the
"msg-props" header.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc--hide-message (value)
"Apply `invisible' text-property with VALUE to current message.
Expect to run in a narrowed buffer during message insertion.
Begin the invisible interval at the previous message's trailing
newline and end before the current message's. If the preceding
message ends in a double newline or there is no previous message,
don't bother including the preceding newline. Additionally,
record VALUE as part of the `erc--hide' property in the
\"msg-props\" header."
(if erc-legacy-invisible-bounds-p
;; Before ERC 5.6, this also used to add an `intangible'
;; property, but the docs say it's now obsolete.
(erc--merge-prop (point-min) (point-max) 'invisible value)
(let ((old-hide (erc--check-msg-prop 'erc--hide))
(beg (point-min))
(end (point-max)))
(puthash 'erc--hide (if old-hide
`(,value . ,(ensure-list old-hide))
value)
erc--msg-props)
(save-restriction
(widen)
(when (or (<= beg 4) (= ?\n (char-before (- beg 2))))
(cl-incf beg))
(erc--merge-prop (1- beg) (1- end) 'invisible value)))))