Function: erc-controls-propertize
erc-controls-propertize is a byte-compiled function defined in
erc-goodies.el.gz.
Signature
(erc-controls-propertize FROM TO BOLDP ITALICP INVERSEP UNDERLINEP FG BG &optional STR)
Documentation
Prepend properties from IRC control characters between FROM and TO.
If optional argument STR is provided, apply to STR, otherwise prepend properties to a region in the current buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-goodies.el.gz
(defun erc-controls-propertize (from to boldp italicp inversep underlinep fg bg
&optional str)
"Prepend properties from IRC control characters between FROM and TO.
If optional argument STR is provided, apply to STR, otherwise prepend properties
to a region in the current buffer."
(when (and fg bg (equal fg bg) (not (equal fg "99")))
(add-text-properties from to '( mouse-face erc-spoiler-face
cursor-face erc-spoiler-face)
str)
(erc--reserve-important-text-props from to
'( mouse-face erc-spoiler-face
cursor-face erc-spoiler-face)
str))
(when fg (setq fg (erc-get-fg-color-face fg)))
(when bg (setq bg (erc-get-bg-color-face bg)))
(font-lock-prepend-text-property
from
to
'font-lock-face
(append (if boldp
'(erc-bold-face)
nil)
(if italicp
'(erc-italic-face)
nil)
(if inversep
'(erc-inverse-face)
nil)
(if underlinep
'(erc-underline-face)
nil)
(if fg
(list fg)
nil)
(if bg
(list bg)
nil))
str)
str)