Function: gnus-message-citation-mode

gnus-message-citation-mode is an autoloaded, interactive and byte-compiled function defined in gnus-cite.el.gz.

Signature

(gnus-message-citation-mode &optional ARG)

Documentation

Minor mode providing more font-lock support for nested citations.

When enabled, it automatically turns on font-lock-mode(var)/font-lock-mode(fun).

This is a minor mode. If called interactively, toggle the Gnus-Message-Citation mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate gnus-message-citation-mode(var)/gnus-message-citation-mode(fun).

The mode's hook is called both when the mode is enabled and when it is disabled.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-cite.el.gz
(define-minor-mode gnus-message-citation-mode
  "Minor mode providing more font-lock support for nested citations.
When enabled, it automatically turns on `font-lock-mode'."
  :lighter ""
  (when (derived-mode-p 'message-mode)
    ;; FIXME: Use font-lock-add-keywords!
    (let ((defaults (car font-lock-defaults))
	  default) ;; keywords
      (while defaults
	(setq default (if (consp defaults)
			  (pop defaults)
			(prog1
			    defaults
			  (setq defaults nil))))
	(if gnus-message-citation-mode
	    ;; `gnus-message-citation-keywords' should be the last
	    ;; elements of the keywords because the others are unlikely
	    ;; to have the OVERRIDE flags -- XEmacs applies a keyword
	    ;; having no OVERRIDE flag to matched text even if it has
	    ;; already other faces, while Emacs doesn't.
	    (set (make-local-variable default)
		 (append (default-value default)
			 gnus-message-citation-keywords))
	  (kill-local-variable default))))
    ;; Force `font-lock-set-defaults' to update `font-lock-keywords'.
    (setq font-lock-set-defaults nil)
    (font-lock-set-defaults)
    (if font-lock-mode
	(font-lock-flush)
      (gnus-message-citation-mode (font-lock-mode 1)))))