X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/0479a1b62ceeb9586168146e2c8f49f2a5ebaf2f..fdb1ba144ca61185e6457f092f38f59dd9bbe6a0:/lisp/gnus/gnus-cite.el diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index d8ee35d3e9..4f05d2ee9d 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el @@ -1,6 +1,6 @@ ;;; gnus-cite.el --- parse citations in articles for Gnus -;; Copyright (C) 1995-2015 Free Software Foundation, Inc. +;; Copyright (C) 1995-2016 Free Software Foundation, Inc. ;; Author: Per Abhiddenware @@ -24,9 +24,6 @@ ;;; Code: (eval-when-compile (require 'cl)) -(eval-when-compile - (when (featurep 'xemacs) - (require 'easy-mmode))) ; for `define-minor-mode' (require 'gnus) (require 'gnus-range) @@ -530,7 +527,6 @@ longer than the frame width." (inhibit-point-motion-hooks t) (marks (gnus-dissect-cited-text)) (adaptive-fill-mode nil) - (filladapt-mode nil) (fill-column (if width (prefix-numeric-value width) fill-column))) (save-restriction (while (cdr marks) @@ -786,12 +782,12 @@ See also the documentation for `gnus-article-highlight-citation'." (defun gnus-cite-delete-overlays () (dolist (overlay gnus-cite-overlay-list) (ignore-errors - (when (or (not (gnus-overlay-end overlay)) - (and (>= (gnus-overlay-end overlay) (point-min)) - (<= (gnus-overlay-end overlay) (point-max)))) + (when (or (not (overlay-end overlay)) + (and (>= (overlay-end overlay) (point-min)) + (<= (overlay-end overlay) (point-max)))) (setq gnus-cite-overlay-list (delete overlay gnus-cite-overlay-list)) (ignore-errors - (gnus-delete-overlay overlay)))))) + (delete-overlay overlay)))))) (defun gnus-cite-parse-wrapper () ;; Wrap chopped gnus-cite-parse. @@ -1096,10 +1092,10 @@ See also the documentation for `gnus-article-highlight-citation'." (skip-chars-backward " \t") (setq to (point)) (when (< from to) - (push (setq overlay (gnus-make-overlay from to nil t)) + (push (setq overlay (make-overlay from to nil t)) gnus-cite-overlay-list) - (gnus-overlay-put overlay 'evaporate t) - (gnus-overlay-put overlay 'face face)))))) + (overlay-put overlay 'evaporate t) + (overlay-put overlay 'face face)))))) (defun gnus-cite-toggle (prefix) (with-current-buffer gnus-article-buffer @@ -1121,7 +1117,7 @@ See also the documentation for `gnus-article-highlight-citation'." ((assq number gnus-cite-attribution-alist)) (t (gnus-add-wash-type 'cite) - (gnus-add-text-properties + (add-text-properties (point) (progn (forward-line 1) (point)) (nconc (list 'article-type 'cite) gnus-hidden-properties)))) @@ -1194,9 +1190,7 @@ Returns nil if there is no such line before LIMIT, t otherwise." (defvar font-lock-keywords) (defvar font-lock-set-defaults) -(eval-and-compile - (unless (featurep 'xemacs) - (autoload 'font-lock-set-defaults "font-lock"))) +(autoload 'font-lock-set-defaults "font-lock") (define-minor-mode gnus-message-citation-mode "Minor mode providing more font-lock support for nested citations. @@ -1206,9 +1200,7 @@ When enabled, it automatically turns on `font-lock-mode'." nil ;; keymap (when (eq major-mode 'message-mode) ;FIXME: Use derived-mode-p. ;; FIXME: Use font-lock-add-keywords! - (let ((defaults (car (if (featurep 'xemacs) - (get 'message-mode 'font-lock-defaults) - font-lock-defaults))) + (let ((defaults (car font-lock-defaults)) default keywords) (while defaults (setq default (if (consp defaults) @@ -1227,19 +1219,11 @@ When enabled, it automatically turns on `font-lock-mode'." gnus-message-citation-keywords)) (kill-local-variable default)))) ;; Force `font-lock-set-defaults' to update `font-lock-keywords'. - (if (featurep 'xemacs) - (progn - (require 'font-lock) - (setq font-lock-defaults-computed nil - font-lock-keywords nil)) - (setq font-lock-set-defaults nil)) + (setq font-lock-set-defaults nil) (font-lock-set-defaults) - (cond (font-lock-mode - (if (fboundp 'font-lock-flush) - (font-lock-flush) - (font-lock-fontify-buffer))) - (gnus-message-citation-mode - (font-lock-mode 1))))) + (if font-lock-mode + (font-lock-flush) + (gnus-message-citation-mode (font-lock-mode 1))))) (defun turn-on-gnus-message-citation-mode () "Turn on `gnus-message-citation-mode'." @@ -1248,8 +1232,6 @@ When enabled, it automatically turns on `font-lock-mode'." "Turn off `gnus-message-citation-mode'." (gnus-message-citation-mode -1)) -(gnus-ems-redefine) - (provide 'gnus-cite) ;; Local Variables: