Function: rcirc-format
rcirc-format is a byte-compiled function defined in rcirc.el.gz.
Signature
(rcirc-format PRE &optional REPLACE)
Documentation
Insert markup formatting PRE.
PRE and "^O" (ASCII #x0f) will either be inserted around the current point respectively or the active region, if present. This function an auxiliary function is not meant to be used directly, but is invoked by other commands. If the optional argument REPLACE is non-nil, first remove any formatting before inserting the new one.
Source Code
;; Defined in /usr/src/emacs/lisp/net/rcirc.el.gz
(defun rcirc-format (pre &optional replace)
"Insert markup formatting PRE.
PRE and \"^O\" (ASCII #x0f) will either be inserted around the
current point respectively or the active region, if present.
This function an auxiliary function is not meant to be used
directly, but is invoked by other commands. If the optional
argument REPLACE is non-nil, first remove any formatting before
inserting the new one."
(when replace (rcirc-unformat))
(save-excursion
(if (use-region-p)
(let ((beg (region-beginning)))
(goto-char (region-end))
(insert "\^O")
(goto-char beg)
(insert pre))
(insert pre "\^O")))
(when (or (not (region-active-p)) (< (point) (mark)))
(forward-char (length pre))))