summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-cite.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/gnus-cite.el')
-rw-r--r--lisp/gnus/gnus-cite.el61
1 files changed, 13 insertions, 48 deletions
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el
index d8b6df70bd4..7f0da2a0fa0 100644
--- a/lisp/gnus/gnus-cite.el
+++ b/lisp/gnus/gnus-cite.el
@@ -2,7 +2,7 @@
;; Copyright (C) 1995-2019 Free Software Foundation, Inc.
-;; Author: Per Abhiddenware
+;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; This file is part of GNU Emacs.
@@ -23,8 +23,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
-
(require 'gnus)
(require 'gnus-range)
(require 'gnus-art)
@@ -136,9 +134,6 @@ the envelope From line."
(defface gnus-cite-attribution '((t (:italic t)))
"Face used for attribution lines."
:group 'gnus-cite)
-;; backward-compatibility alias
-(put 'gnus-cite-attribution-face 'face-alias 'gnus-cite-attribution)
-(put 'gnus-cite-attribution-face 'obsolete-face "22.1")
(defcustom gnus-cite-attribution-face 'gnus-cite-attribution
"Face used for attribution lines.
@@ -157,9 +152,6 @@ It is merged with the face for the cited text belonging to the attribution."
(:italic t)))
"Citation face."
:group 'gnus-cite)
-;; backward-compatibility alias
-(put 'gnus-cite-face-1 'face-alias 'gnus-cite-1)
-(put 'gnus-cite-face-1 'obsolete-face "22.1")
(defface gnus-cite-2 '((((class color)
(background dark))
@@ -171,9 +163,6 @@ It is merged with the face for the cited text belonging to the attribution."
(:italic t)))
"Citation face."
:group 'gnus-cite)
-;; backward-compatibility alias
-(put 'gnus-cite-face-2 'face-alias 'gnus-cite-2)
-(put 'gnus-cite-face-2 'obsolete-face "22.1")
(defface gnus-cite-3 '((((class color)
(background dark))
@@ -185,9 +174,6 @@ It is merged with the face for the cited text belonging to the attribution."
(:italic t)))
"Citation face."
:group 'gnus-cite)
-;; backward-compatibility alias
-(put 'gnus-cite-face-3 'face-alias 'gnus-cite-3)
-(put 'gnus-cite-face-3 'obsolete-face "22.1")
(defface gnus-cite-4 '((((class color)
(background dark))
@@ -199,9 +185,6 @@ It is merged with the face for the cited text belonging to the attribution."
(:italic t)))
"Citation face."
:group 'gnus-cite)
-;; backward-compatibility alias
-(put 'gnus-cite-face-4 'face-alias 'gnus-cite-4)
-(put 'gnus-cite-face-4 'obsolete-face "22.1")
(defface gnus-cite-5 '((((class color)
(background dark))
@@ -213,9 +196,6 @@ It is merged with the face for the cited text belonging to the attribution."
(:italic t)))
"Citation face."
:group 'gnus-cite)
-;; backward-compatibility alias
-(put 'gnus-cite-face-5 'face-alias 'gnus-cite-5)
-(put 'gnus-cite-face-5 'obsolete-face "22.1")
(defface gnus-cite-6 '((((class color)
(background dark))
@@ -227,9 +207,6 @@ It is merged with the face for the cited text belonging to the attribution."
(:italic t)))
"Citation face."
:group 'gnus-cite)
-;; backward-compatibility alias
-(put 'gnus-cite-face-6 'face-alias 'gnus-cite-6)
-(put 'gnus-cite-face-6 'obsolete-face "22.1")
(defface gnus-cite-7 '((((class color)
(background dark))
@@ -241,9 +218,6 @@ It is merged with the face for the cited text belonging to the attribution."
(:italic t)))
"Citation face."
:group 'gnus-cite)
-;; backward-compatibility alias
-(put 'gnus-cite-face-7 'face-alias 'gnus-cite-7)
-(put 'gnus-cite-face-7 'obsolete-face "22.1")
(defface gnus-cite-8 '((((class color)
(background dark))
@@ -255,9 +229,6 @@ It is merged with the face for the cited text belonging to the attribution."
(:italic t)))
"Citation face."
:group 'gnus-cite)
-;; backward-compatibility alias
-(put 'gnus-cite-face-8 'face-alias 'gnus-cite-8)
-(put 'gnus-cite-face-8 'obsolete-face "22.1")
(defface gnus-cite-9 '((((class color)
(background dark))
@@ -269,9 +240,6 @@ It is merged with the face for the cited text belonging to the attribution."
(:italic t)))
"Citation face."
:group 'gnus-cite)
-;; backward-compatibility alias
-(put 'gnus-cite-face-9 'face-alias 'gnus-cite-9)
-(put 'gnus-cite-face-9 'obsolete-face "22.1")
(defface gnus-cite-10 '((((class color)
(background dark))
@@ -283,9 +251,6 @@ It is merged with the face for the cited text belonging to the attribution."
(:italic t)))
"Citation face."
:group 'gnus-cite)
-;; backward-compatibility alias
-(put 'gnus-cite-face-10 'face-alias 'gnus-cite-10)
-(put 'gnus-cite-face-10 'obsolete-face "22.1")
(defface gnus-cite-11 '((((class color)
(background dark))
@@ -297,9 +262,6 @@ It is merged with the face for the cited text belonging to the attribution."
(:italic t)))
"Citation face."
:group 'gnus-cite)
-;; backward-compatibility alias
-(put 'gnus-cite-face-11 'face-alias 'gnus-cite-11)
-(put 'gnus-cite-face-11 'obsolete-face "22.1")
(defcustom gnus-cite-face-list
'(gnus-cite-1 gnus-cite-2 gnus-cite-3 gnus-cite-4 gnus-cite-5 gnus-cite-6
@@ -378,7 +340,7 @@ in a boring face, then the pages will be skipped."
;; TAG: Is a Supercite tag, if any.
(defvar gnus-cited-opened-text-button-line-format-alist
- `((?b (marker-position beg) ?d)
+ '((?b (marker-position beg) ?d)
(?e (marker-position end) ?d)
(?n (count-lines beg end) ?d)
(?l (- end beg) ?d)))
@@ -519,8 +481,13 @@ Lines matching `gnus-cite-attribution-suffix' and perhaps
(defun gnus-article-fill-cited-article (&optional width long-lines)
"Do word wrapping in the current article.
If WIDTH (the numerical prefix), use that text width when
-filling. If LONG-LINES, only fill sections that have lines
-longer than the frame width."
+filling.
+
+If LONG-LINES, only fill sections that have lines longer than the
+frame width.
+
+Sections that are heuristically interpreted as not being
+text (i.e., computer code and the like) will not be folded."
(interactive "P")
(with-current-buffer gnus-article-buffer
(let ((buffer-read-only nil)
@@ -540,8 +507,6 @@ longer than the frame width."
use-hard-newlines)
(unless do-fill
(setq do-fill (gnus-article-foldable-buffer (cdar marks))))
- ;; Note: the XEmacs version of `fill-region' inserts a newline
- ;; unless the region ends with a newline.
(when do-fill
(if (not long-lines)
(fill-region (point-min) (point-max))
@@ -660,7 +625,7 @@ always hide."
(point)
(progn (eval gnus-cited-closed-text-button-line-format-spec)
(point))
- `gnus-article-toggle-cited-text
+ 'gnus-article-toggle-cited-text
(list (cons beg end) start))
(point))
'article-type 'annotation)
@@ -710,7 +675,7 @@ means show, nil means toggle."
gnus-cited-opened-text-button-line-format-spec
gnus-cited-closed-text-button-line-format-spec))
(point))
- `gnus-article-toggle-cited-text
+ 'gnus-article-toggle-cited-text
args)
(point))
'article-type 'annotation)))))
@@ -1163,7 +1128,7 @@ Returns nil if there is no such line before LIMIT, t otherwise."
(let ((cdepth (min (length (apply 'concat
(split-string
(match-string-no-properties 0)
- "[ \t [:alnum:]]+")))
+ "[\t [:alnum:]]+")))
gnus-message-max-citation-depth))
(mlist (make-list (* (1+ gnus-message-max-citation-depth) 2) nil))
(start (point-at-bol))
@@ -1198,7 +1163,7 @@ When enabled, it automatically turns on `font-lock-mode'."
nil ;; init-value
"" ;; lighter
nil ;; keymap
- (when (eq major-mode 'message-mode) ;FIXME: Use derived-mode-p.
+ (when (derived-mode-p 'message-mode)
;; FIXME: Use font-lock-add-keywords!
(let ((defaults (car font-lock-defaults))
default keywords)