Function: message--syntax-propertize

message--syntax-propertize is a byte-compiled function defined in message.el.gz.

Signature

(message--syntax-propertize BEG END)

Documentation

Syntax-propertize certain message text specially.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message--syntax-propertize (beg end)
  "Syntax-propertize certain message text specially."
  (with-syntax-table message-mode-syntax-table
    (let ((citation-regexp (concat "^" message-cite-prefix-regexp ".*$"))
          (smiley-regexp (regexp-opt message-smileys)))
      (goto-char beg)
      (while (search-forward-regexp citation-regexp
                                    end 'noerror)
	(let ((start (match-beginning 0))
              (end (match-end 0)))
          (add-text-properties start (1+ start)
                               `(syntax-table ,(string-to-syntax "<")))
          (add-text-properties end (min (1+ end) (point-max))
                               `(syntax-table ,(string-to-syntax ">")))))
      (goto-char beg)
      (while (search-forward-regexp smiley-regexp
				    end 'noerror)
	(add-text-properties (match-beginning 0) (match-end 0)
                             `(syntax-table ,(string-to-syntax ".")))))))