-(defun gnus-message-add-citation-keywords ()
- "Add font-lock for nested citations to current buffer."
- (if (gnus-test-font-lock-add-keywords)
- (font-lock-add-keywords nil gnus-message-citation-keywords 'append)
- (font-lock-set-defaults)
- (let ((was-compiled (eq (car font-lock-keywords) t)))
- (setq font-lock-keywords (copy-sequence (if was-compiled
- (cdr font-lock-keywords)
- font-lock-keywords)))
- (dolist (keyword gnus-message-citation-keywords)
- (setq font-lock-keywords
- (delete (font-lock-compile-keyword keyword)
- (delete keyword font-lock-keywords))))
- (let ((old (if (eq (car-safe font-lock-keywords) t)
- (cdr font-lock-keywords)
- font-lock-keywords)))
- (setq font-lock-keywords (append old gnus-message-citation-keywords)))
- (if was-compiled
- (setq font-lock-keywords
- (font-lock-compile-keywords font-lock-keywords))))))
-
-(defun gnus-message-remove-citation-keywords ()
- "Remove font-lock for nested citations from current buffer."
- (if (gnus-test-font-lock-add-keywords)
- (font-lock-remove-keywords nil gnus-message-citation-keywords)
- (font-lock-set-defaults)
- (let ((was-compiled (eq (car font-lock-keywords) t)))
- (if was-compiled
- (setq font-lock-keywords (cdr font-lock-keywords)))
- (setq font-lock-keywords (copy-sequence font-lock-keywords))
- (dolist (keyword gnus-message-citation-keywords)
- (setq font-lock-keywords
- (delete (font-lock-compile-keyword keyword)
- (delete keyword font-lock-keywords))))
- (if was-compiled
- (setq font-lock-keywords
- (font-lock-compile-keywords font-lock-keywords))))))