13401
+ ��膩��鰹申鐃順�渇��膩��� 1 ;;; gnus-cite.el --- parse citations in articles for Gnus
+ ��膩��鰹申鐃順�渇��膩��� 2 ;; Copyright (C) 1995 Free Software Foundation, Inc.
+ ��膩��鰹申鐃順�渇��膩��� 3
+ ��膩��鰹申鐃順�渇��膩��� 4 ;; Author: Per Abrahamsen <abraham@iesd.auc.dk>
+ ��膩��鰹申鐃順�渇��膩��� 5 ;; Keywords: news, mail
+ ��膩��鰹申鐃順�渇��膩��� 6
+ ��膩��鰹申鐃順�渇��膩��� 7 ;; This file is part of GNU Emacs.
+ ��膩��鰹申鐃順�渇��膩��� 8
+ ��膩��鰹申鐃順�渇��膩��� 9 ;; GNU Emacs is free software; you can redistribute it and/or modify
+ ��膩��鰹申鐃順�渇��膩��� 10 ;; it under the terms of the GNU General Public License as published by
+ ��膩��鰹申鐃順�渇��膩��� 11 ;; the Free Software Foundation; either version 2, or (at your option)
+ ��膩��鰹申鐃順�渇��膩��� 12 ;; any later version.
+ ��膩��鰹申鐃順�渇��膩��� 13
+ ��膩��鰹申鐃順�渇��膩��� 14 ;; GNU Emacs is distributed in the hope that it will be useful,
+ ��膩��鰹申鐃順�渇��膩��� 15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ��膩��鰹申鐃順�渇��膩��� 16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ��膩��鰹申鐃順�渇��膩��� 17 ;; GNU General Public License for more details.
+ ��膩��鰹申鐃順�渇��膩��� 18
+ ��膩��鰹申鐃順�渇��膩��� 19 ;; You should have received a copy of the GNU General Public License
+ ��膩��鰹申鐃順�渇��膩��� 20 ;; along with GNU Emacs; see the file COPYING. If not, write to
+ ��膩��鰹申鐃順�渇��膩��� 21 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ ��膩��鰹申鐃順�渇��膩��� 22
+ ��膩��鰹申鐃順�渇��膩��� 23 ;;; Commentary:
+ ��膩��鰹申鐃順�渇��膩��� 24
+ ��膩��鰹申鐃順�渇��膩��� 25 ;;; Code:
+ ��膩��鰹申鐃順�渇��膩��� 26
+ ��膩��鰹申鐃順�渇��膩��� 27 (require 'gnus)
+ ��膩��鰹申鐃順�渇��膩��� 28 (require 'gnus-msg)
+ ��膩��鰹申鐃順�渇��膩��� 29 (require 'gnus-ems)
+ ��膩��鰹申鐃順�渇��膩��� 30
+ ��膩��鰹申鐃順�渇��膩��� 31 (eval-and-compile
+ ��膩��鰹申鐃順�渇��膩��� 32 (autoload 'gnus-article-add-button "gnus-vis")
+ ��膩��鰹申鐃順�渇��膩��� 33 )
+ ��膩��鰹申鐃順�渇��膩��� 34
+ ��膩��鰹申鐃順�渇��膩��� 35 ;;; Customization:
+ ��膩��鰹申鐃順�渇��膩��� 36
+ ��膩��鰹申鐃順�渇��膩��� 37 (defvar gnus-cite-parse-max-size 25000
+ ��膩��鰹申鐃順�渇��膩��� 38 "Maximum article size (in bytes) where parsing citations is allowed.
+ ��膩��鰹申鐃順�渇��膩��� 39 Set it to nil to parse all articles.")
+ ��膩��鰹申鐃順�渇��膩��� 40
+ ��膩��鰹申鐃順�渇��膩��� 41 (defvar gnus-cite-prefix-regexp
+ ��膩��鰹申鐃順�渇��膩��� 42 "^[]>|:}+ ]*[]>|:}+]\\(.*>\\)?\\|^.*>"
+ ��膩��鰹申鐃順�渇��膩��� 43 "Regexp matching the longest possible citation prefix on a line.")
+ ��膩��鰹申鐃順�渇��膩��� 44
+ ��膩��鰹申鐃順�渇��膩��� 45 (defvar gnus-cite-max-prefix 20
+ ��膩��鰹申鐃順�渇��膩��� 46 "Maximal possible length for a citation prefix.")
+ ��膩��鰹申鐃順�渇��膩��� 47
+ ��膩��鰹申鐃順�渇��膩��� 48 (defvar gnus-supercite-regexp
+ ��膩��鰹申鐃順�渇��膩��� 49 (concat "^\\(" gnus-cite-prefix-regexp "\\)? *"
+ ��膩��鰹申鐃順�渇��膩��� 50 ">>>>> +\"\\([^\"\n]+\\)\" +==")
+ ��膩��鰹申鐃順�渇��膩��� 51 "Regexp matching normal SuperCite attribution lines.
+ ��膩��鰹申鐃順�渇��膩��� 52 The first regexp group should match a prefix added by another package.")
+ ��膩��鰹申鐃順�渇��膩��� 53
+ ��膩��鰹申鐃順�渇��膩��� 54 (defvar gnus-supercite-secondary-regexp "^.*\"\\([^\"\n]+\\)\" +=="
+ ��膩��鰹申鐃順�渇��膩��� 55 "Regexp matching mangled SuperCite attribution lines.
+ ��膩��鰹申鐃順�渇��膩��� 56 The first regexp group should match the SuperCite attribution.")
+ ��膩��鰹申鐃順�渇��膩��� 57
+ ��膩��鰹申鐃順�渇��膩��� 58 (defvar gnus-cite-minimum-match-count 2
+ ��膩��鰹申鐃順�渇��膩��� 59 "Minimal number of identical prefix'es before we believe it is a citation.")
+ ��膩��鰹申鐃順�渇��膩��� 60
+ ��膩��鰹申鐃順�渇��膩��� 61 ;see gnus-cus.el
+ ��膩��鰹申鐃順�渇��膩��� 62 ;(defvar gnus-cite-face-list
+ ��膩��鰹申鐃順�渇��膩��� 63 ; (if (eq gnus-display-type 'color)
+ ��膩��鰹申鐃順�渇��膩��� 64 ; (if (eq gnus-background-mode 'dark) 'light 'dark)
+ ��膩��鰹申鐃順�渇��膩��� 65 ; '(italic))
+ ��膩��鰹申鐃順�渇��膩��� 66 ; "Faces used for displaying different citations.
+ ��膩��鰹申鐃順�渇��膩��� 67 ;It is either a list of face names, or one of the following special
+ ��膩��鰹申鐃順�渇��膩��� 68 ;values:
+ ��膩��鰹申鐃順�渇��膩��� 69
+ ��膩��鰹申鐃順�渇��膩��� 70 ;dark: Create faces from `gnus-face-dark-name-list'.
+ ��膩��鰹申鐃順�渇��膩��� 71 ;light: Create faces from `gnus-face-light-name-list'.
+ ��膩��鰹申鐃順�渇��膩��� 72
+ ��膩��鰹申鐃順�渇��膩��� 73 ;The variable `gnus-make-foreground' determines whether the created
+ ��膩��鰹申鐃順�渇��膩��� 74 ;faces change the foreground or the background colors.")
+ ��膩��鰹申鐃順�渇��膩��� 75
+ ��膩��鰹申鐃順�渇��膩��� 76 (defvar gnus-cite-attribution-prefix "in article\\|in <"
+ ��膩��鰹申鐃順�渇��膩��� 77 "Regexp matching the beginning of an attribution line.")
+ ��膩��鰹申鐃順�渇��膩��� 78
+ ��膩��鰹申鐃順�渇��膩��� 79 (defvar gnus-cite-attribution-postfix
+ ��膩��鰹申鐃順�渇��膩��� 80 "\\(wrote\\|writes\\|said\\|says\\):[ \t]*$"
+ ��膩��鰹申鐃順�渇��膩��� 81 "Regexp matching the end of an attribution line.
+ ��膩��鰹申鐃順�渇��膩��� 82 The text matching the first grouping will be used as a button.")
+ ��膩��鰹申鐃順�渇��膩��� 83
+ ��膩��鰹申鐃順�渇��膩��� 84 ;see gnus-cus.el
+ ��膩��鰹申鐃順�渇��膩��� 85 ;(defvar gnus-cite-attribution-face 'underline
+ ��膩��鰹申鐃順�渇��膩��� 86 ; "Face used for attribution lines.
+ ��膩��鰹申鐃順�渇��膩��� 87 ;It is merged with the face for the cited text belonging to the attribution.")
+ ��膩��鰹申鐃順�渇��膩��� 88
+ ��膩��鰹申鐃順�渇��膩��� 89 ;see gnus-cus.el
+ ��膩��鰹申鐃順�渇��膩��� 90 ;(defvar gnus-cite-hide-percentage 50
+ ��膩��鰹申鐃順�渇��膩��� 91 ; "Only hide cited text if it is larger than this percent of the body.")
+ ��膩��鰹申鐃順�渇��膩��� 92
+ ��膩��鰹申鐃順�渇��膩��� 93 ;see gnus-cus.el
+ ��膩��鰹申鐃順�渇��膩��� 94 ;(defvar gnus-cite-hide-absolute 10
+ ��膩��鰹申鐃順�渇��膩��� 95 ; "Only hide cited text if there is at least this number of cited lines.")
+ ��膩��鰹申鐃順�渇��膩��� 96
+ ��膩��鰹申鐃順�渇��膩��� 97 ;see gnus-cus.el
+ ��膩��鰹申鐃順�渇��膩��� 98 ;(defvar gnus-face-light-name-list
+ ��膩��鰹申鐃順�渇��膩��� 99 ; '("light blue" "light cyan" "light yellow" "light pink"
+ ��膩��鰹申鐃順�渇��膩��� 100 ; "pale green" "beige" "orange" "magenta" "violet" "medium purple"
+ ��膩��鰹申鐃順�渇��膩��� 101 ; "turquoise")
+ ��膩��鰹申鐃順�渇��膩��� 102 ; "Names of light colors.")
+ ��膩��鰹申鐃順�渇��膩��� 103
+ ��膩��鰹申鐃順�渇��膩��� 104 ;see gnus-cus.el
+ ��膩��鰹申鐃順�渇��膩��� 105 ;(defvar gnus-face-dark-name-list
+ ��膩��鰹申鐃順�渇��膩��� 106 ; '("dark salmon" "firebrick"
+ ��膩��鰹申鐃順�渇��膩��� 107 ; "dark green" "dark orange" "dark khaki" "dark violet"
+ ��膩��鰹申鐃順�渇��膩��� 108 ; "dark turquoise")
+ ��膩��鰹申鐃順�渇��膩��� 109 ; "Names of dark colors.")
+ ��膩��鰹申鐃順�渇��膩��� 110
+ ��膩��鰹申鐃順�渇��膩��� 111 ;;; Internal Variables:
+ ��膩��鰹申鐃順�渇��膩��� 112
+ ��膩��鰹申鐃順�渇��膩��� 113 (defvar gnus-article-length nil)
+ ��膩��鰹申鐃順�渇��膩��� 114 ;; Length of article last time we parsed it.
+ ��膩��鰹申鐃順�渇��膩��� 115 ;; BUG! KLUDGE! UGLY! FIX ME!
+ ��膩��鰹申鐃順�渇��膩��� 116
+ ��膩��鰹申鐃順�渇��膩��� 117 (defvar gnus-cite-prefix-alist nil)
+ ��膩��鰹申鐃順�渇��膩��� 118 ;; Alist of citation prefixes.
+ ��膩��鰹申鐃順�渇��膩��� 119 ;; The cdr is a list of lines with that prefix.
+ ��膩��鰹申鐃順�渇��膩��� 120
+ ��膩��鰹申鐃順�渇��膩��� 121 (defvar gnus-cite-attribution-alist nil)
+ ��膩��鰹申鐃順�渇��膩��� 122 ;; Alist of attribution lines.
+ ��膩��鰹申鐃順�渇��膩��� 123 ;; The car is a line number.
+ ��膩��鰹申鐃順�渇��膩��� 124 ;; The cdr is the prefix for the citation started by that line.
+ ��膩��鰹申鐃順�渇��膩��� 125
+ ��膩��鰹申鐃順�渇��膩��� 126 (defvar gnus-cite-loose-prefix-alist nil)
+ ��膩��鰹申鐃順�渇��膩��� 127 ;; Alist of citation prefixes that have no matching attribution.
+ ��膩��鰹申鐃順�渇��膩��� 128 ;; The cdr is a list of lines with that prefix.
+ ��膩��鰹申鐃順�渇��膩��� 129
+ ��膩��鰹申鐃順�渇��膩��� 130 (defvar gnus-cite-loose-attribution-alist nil)
+ ��膩��鰹申鐃順�渇��膩��� 131 ;; Alist of attribution lines that have no matching citation.
+ ��膩��鰹申鐃順�渇��膩��� 132 ;; Each member has the form (WROTE IN PREFIX TAG), where
+ ��膩��鰹申鐃順�渇��膩��� 133 ;; WROTE: is the attribution line number
+ ��膩��鰹申鐃順�渇��膩��� 134 ;; IN: is the line number of the previous line if part of the same attribution,
+ ��膩��鰹申鐃順�渇��膩��� 135 ;; PREFIX: Is the citation prefix of the attribution line(s), and
+ ��膩��鰹申鐃順�渇��膩��� 136 ;; TAG: Is a SuperCite tag, if any.
+ ��膩��鰹申鐃順�渇��膩��� 137
+ ��膩��鰹申鐃順�渇��膩��� 138 ;;; Commands:
+ ��膩��鰹申鐃順�渇��膩��� 139
+ ��膩��鰹申鐃順�渇��膩��� 140 (defun gnus-article-highlight-citation (&optional force)
+ ��膩��鰹申鐃順�渇��膩��� 141 "Highlight cited text.
+ ��膩��鰹申鐃順�渇��膩��� 142 Each citation in the article will be highlighted with a different face.
+ ��膩��鰹申鐃順�渇��膩��� 143 The faces are taken from `gnus-cite-face-list'.
+ ��膩��鰹申鐃順�渇��膩��� 144 Attribution lines are highlighted with the same face as the
+ ��膩��鰹申鐃順�渇��膩��� 145 corresponding citation merged with `gnus-cite-attribution-face'.
+ ��膩��鰹申鐃順�渇��膩��� 146
+ ��膩��鰹申鐃順�渇��膩��� 147 Text is considered cited if at least `gnus-cite-minimum-match-count'
+ ��膩��鰹申鐃順�渇��膩��� 148 lines matches `gnus-cite-prefix-regexp' with the same prefix.
+ ��膩��鰹申鐃順�渇��膩��� 149
+ ��膩��鰹申鐃順�渇��膩��� 150 Lines matching `gnus-cite-attribution-postfix' and perhaps
+ ��膩��鰹申鐃順�渇��膩��� 151 `gnus-cite-attribution-prefix' are considered attribution lines."
+ ��膩��鰹申鐃順�渇��膩��� 152 (interactive (list 'force))
+ ��膩��鰹申鐃順�渇��膩��� 153 ;; Create dark or light faces if necessary.
+ ��膩��鰹申鐃順�渇��膩��� 154 (cond ((eq gnus-cite-face-list 'light)
+ ��膩��鰹申鐃順�渇��膩��� 155 (setq gnus-cite-face-list
+ ��膩��鰹申鐃順�渇��膩��� 156 (mapcar 'gnus-make-face gnus-face-light-name-list)))
+ ��膩��鰹申鐃順�渇��膩��� 157 ((eq gnus-cite-face-list 'dark)
+ ��膩��鰹申鐃順�渇��膩��� 158 (setq gnus-cite-face-list
+ ��膩��鰹申鐃順�渇��膩��� 159 (mapcar 'gnus-make-face gnus-face-dark-name-list))))
+ ��膩��鰹申鐃順�渇��膩��� 160 (save-excursion
+ ��膩��鰹申鐃順�渇��膩��� 161 (set-buffer gnus-article-buffer)
+ ��膩��鰹申鐃順�渇��膩��� 162 (gnus-cite-parse-maybe force)
+ ��膩��鰹申鐃順�渇��膩��� 163 (let ((buffer-read-only nil)
+ ��膩��鰹申鐃順�渇��膩��� 164 (alist gnus-cite-prefix-alist)
+ ��膩��鰹申鐃順�渇��膩��� 165 (faces gnus-cite-face-list)
+ ��膩��鰹申鐃順�渇��膩��� 166 (inhibit-point-motion-hooks t)
+ ��膩��鰹申鐃順�渇��膩��� 167 face entry prefix skip numbers number face-alist)
+ ��膩��鰹申鐃順�渇��膩��� 168 ;; Loop through citation prefixes.
+ ��膩��鰹申鐃順�渇��膩��� 169 (while alist
+ ��膩��鰹申鐃順�渇��膩��� 170 (setq entry (car alist)
+ ��膩��鰹申鐃順�渇��膩��� 171 alist (cdr alist)
+ ��膩��鰹申鐃順�渇��膩��� 172 prefix (car entry)
+ ��膩��鰹申鐃順�渇��膩��� 173 numbers (cdr entry)
+ ��膩��鰹申鐃順�渇��膩��� 174 face (car faces)
+ ��膩��鰹申鐃順�渇��膩��� 175 faces (or (cdr faces) gnus-cite-face-list)
+ ��膩��鰹申鐃順�渇��膩��� 176 face-alist (cons (cons prefix face) face-alist))
+ ��膩��鰹申鐃順�渇��膩��� 177 (while numbers
+ ��膩��鰹申鐃順�渇��膩��� 178 (setq number (car numbers)
+ ��膩��鰹申鐃順�渇��膩��� 179 numbers (cdr numbers))
+ ��膩��鰹申鐃順�渇��膩��� 180 (and (not (assq number gnus-cite-attribution-alist))
+ ��膩��鰹申鐃順�渇��膩��� 181 (not (assq number gnus-cite-loose-attribution-alist))
+ ��膩��鰹申鐃順�渇��膩��� 182 (gnus-cite-add-face number prefix face))))
+ ��膩��鰹申鐃順�渇��膩��� 183 ;; Loop through attribution lines.
+ ��膩��鰹申鐃順�渇��膩��� 184 (setq alist gnus-cite-attribution-alist)
+ ��膩��鰹申鐃順�渇��膩��� 185 (while alist
+ ��膩��鰹申鐃順�渇��膩��� 186 (setq entry (car alist)
+ ��膩��鰹申鐃順�渇��膩��� 187 alist (cdr alist)
+ ��膩��鰹申鐃順�渇��膩��� 188 number (car entry)
+ ��膩��鰹申鐃順�渇��膩��� 189 prefix (cdr entry)
+ ��膩��鰹申鐃順�渇��膩��� 190 skip (gnus-cite-find-prefix number)
+ ��膩��鰹申鐃順�渇��膩��� 191 face (cdr (assoc prefix face-alist)))
+ ��膩��鰹申鐃順�渇��膩��� 192 ;; Add attribution button.
+ ��膩��鰹申鐃順�渇��膩��� 193 (goto-line number)
+ ��膩��鰹申鐃順�渇��膩��� 194 (if (re-search-forward gnus-cite-attribution-postfix
+ ��膩��鰹申鐃順�渇��膩��� 195 (save-excursion (end-of-line 1) (point))
+ ��膩��鰹申鐃順�渇��膩��� 196 t)
+ ��膩��鰹申鐃順�渇��膩��� 197 (gnus-article-add-button (match-beginning 1) (match-end 1)
+ ��膩��鰹申鐃順�渇��膩��� 198 'gnus-cite-toggle prefix))
+ ��膩��鰹申鐃順�渇��膩��� 199 ;; Highlight attribution line.
+ ��膩��鰹申鐃順�渇��膩��� 200 (gnus-cite-add-face number skip face)
+ ��膩��鰹申鐃順�渇��膩��� 201 (gnus-cite-add-face number skip gnus-cite-attribution-face))
+ ��膩��鰹申鐃順�渇��膩��� 202 ;; Loop through attribution lines.
+ ��膩��鰹申鐃順�渇��膩��� 203 (setq alist gnus-cite-loose-attribution-alist)
+ ��膩��鰹申鐃順�渇��膩��� 204 (while alist
+ ��膩��鰹申鐃順�渇��膩��� 205 (setq entry (car alist)
+ ��膩��鰹申鐃順�渇��膩��� 206 alist (cdr alist)
+ ��膩��鰹申鐃順�渇��膩��� 207 number (car entry)
+ ��膩��鰹申鐃順�渇��膩��� 208 skip (gnus-cite-find-prefix number))
+ ��膩��鰹申鐃順�渇��膩��� 209 (gnus-cite-add-face number skip gnus-cite-attribution-face)))))
+ ��膩��鰹申鐃順�渇��膩��� 210
+ ��膩��鰹申鐃順�渇��膩��� 211 (defun gnus-article-hide-citation (&optional force)
+ ��膩��鰹申鐃順�渇��膩��� 212 "Hide all cited text except attribution lines.
+ ��膩��鰹申鐃順�渇��膩��� 213 See the documentation for `gnus-article-highlight-citation'."
+ ��膩��鰹申鐃順�渇��膩��� 214 (interactive (list 'force))
+ ��膩��鰹申鐃順�渇��膩��� 215 (save-excursion
+ ��膩��鰹申鐃順�渇��膩��� 216 (set-buffer gnus-article-buffer)
+ ��膩��鰹申鐃順�渇��膩��� 217 (gnus-cite-parse-maybe force)
+ ��膩��鰹申鐃順�渇��膩��� 218 (let ((buffer-read-only nil)
+ ��膩��鰹申鐃順�渇��膩��� 219 (alist gnus-cite-prefix-alist)
+ ��膩��鰹申鐃順�渇��膩��� 220 (inhibit-point-motion-hooks t)
+ ��膩��鰹申鐃順�渇��膩��� 221 numbers number)
+ ��膩��鰹申鐃順�渇��膩��� 222 (while alist
+ ��膩��鰹申鐃順�渇��膩��� 223 (setq numbers (cdr (car alist))
+ ��膩��鰹申鐃順�渇��膩��� 224 alist (cdr alist))
+ ��膩��鰹申鐃順�渇��膩��� 225 (while numbers
+ ��膩��鰹申鐃順�渇��膩��� 226 (setq number (car numbers)
+ ��膩��鰹申鐃順�渇��膩��� 227 numbers (cdr numbers))
+ ��膩��鰹申鐃順�渇��膩��� 228 (goto-line number)
+ ��膩��鰹申鐃順�渇��膩��� 229 (or (assq number gnus-cite-attribution-alist)
+ ��膩��鰹申鐃順�渇��膩��� 230 (add-text-properties (point) (progn (forward-line 1) (point))
+ ��膩��鰹申鐃順�渇��膩��� 231 gnus-hidden-properties)))))))
+ ��膩��鰹申鐃順�渇��膩��� 232
+ ��膩��鰹申鐃順�渇��膩��� 233 (defun gnus-article-hide-citation-maybe (&optional force)
+ ��膩��鰹申鐃順�渇��膩��� 234 "Hide cited text that has an attribution line.
+ ��膩��鰹申鐃順�渇��膩��� 235 This will do nothing unless at least `gnus-cite-hide-percentage'
+ ��膩��鰹申鐃順�渇��膩��� 236 percent and at least `gnus-cite-hide-absolute' lines of the body is
+ ��膩��鰹申鐃順�渇��膩��� 237 cited text with attributions. When called interactively, these two
+ ��膩��鰹申鐃順�渇��膩��� 238 variables are ignored.
+ ��膩��鰹申鐃順�渇��膩��� 239 See also the documentation for `gnus-article-highlight-citation'."
+ ��膩��鰹申鐃順�渇��膩��� 240 (interactive (list 'force))
+ ��膩��鰹申鐃順�渇��膩��� 241 (save-excursion
+ ��膩��鰹申鐃順�渇��膩��� 242 (set-buffer gnus-article-buffer)
+ ��膩��鰹申鐃順�渇��膩��� 243 (gnus-cite-parse-maybe force)
+ ��膩��鰹申鐃順�渇��膩��� 244 (goto-char (point-min))
+ ��膩��鰹申鐃順�渇��膩��� 245 (search-forward "\n\n" nil t)
+ ��膩��鰹申鐃順�渇��膩��� 246 (let ((start (point))
+ ��膩��鰹申鐃順�渇��膩��� 247 (atts gnus-cite-attribution-alist)
+ ��膩��鰹申鐃順�渇��膩��� 248 (buffer-read-only nil)
+ ��膩��鰹申鐃順�渇��膩��� 249 (inhibit-point-motion-hooks t)
+ ��膩��鰹申鐃順�渇��膩��� 250 (hiden 0)
+ ��膩��鰹申鐃順�渇��膩��� 251 total)
+ ��膩��鰹申鐃順�渇��膩��� 252 (goto-char (point-max))
+ ��膩��鰹申鐃順�渇��膩��� 253 (re-search-backward gnus-signature-separator nil t)
+ ��膩��鰹申鐃順�渇��膩��� 254 (setq total (count-lines start (point)))
+ ��膩��鰹申鐃順�渇��膩��� 255 (while atts
+ ��膩��鰹申鐃順�渇��膩��� 256 (setq hiden (+ hiden (length (cdr (assoc (cdr (car atts))
+ ��膩��鰹申鐃順�渇��膩��� 257 gnus-cite-prefix-alist))))
+ ��膩��鰹申鐃順�渇��膩��� 258 atts (cdr atts)))
+ ��膩��鰹申鐃順�渇��膩��� 259 (if (or force
+ ��膩��鰹申鐃順�渇��膩��� 260 (and (> (* 100 hiden) (* gnus-cite-hide-percentage total))
+ ��膩��鰹申鐃順�渇��膩��� 261 (> hiden gnus-cite-hide-absolute)))
+ ��膩��鰹申鐃順�渇��膩��� 262 (progn
+ ��膩��鰹申鐃順�渇��膩��� 263 (setq atts gnus-cite-attribution-alist)
+ ��膩��鰹申鐃順�渇��膩��� 264 (while atts
+ ��膩��鰹申鐃順�渇��膩��� 265 (setq total (cdr (assoc (cdr (car atts)) gnus-cite-prefix-alist))
+ ��膩��鰹申鐃順�渇��膩��� 266 atts (cdr atts))
+ ��膩��鰹申鐃順�渇��膩��� 267 (while total
+ ��膩��鰹申鐃順�渇��膩��� 268 (setq hiden (car total)
+ ��膩��鰹申鐃順�渇��膩��� 269 total (cdr total))
+ ��膩��鰹申鐃順�渇��膩��� 270 (goto-line hiden)
+ ��膩��鰹申鐃順�渇��膩��� 271 (or (assq hiden gnus-cite-attribution-alist)
+ ��膩��鰹申鐃順�渇��膩��� 272 (add-text-properties (point)
+ ��膩��鰹申鐃順�渇��膩��� 273 (progn (forward-line 1) (point))
+ ��膩��鰹申鐃順�渇��膩��� 274 gnus-hidden-properties)))))))))
+ ��膩��鰹申鐃順�渇��膩��� 275
+ ��膩��鰹申鐃順�渇��膩��� 276 ;;; Internal functions:
+ ��膩��鰹申鐃順�渇��膩��� 277
+ ��膩��鰹申鐃順�渇��膩��� 278 (defun gnus-cite-parse-maybe (&optional force)
+ ��膩��鰹申鐃順�渇��膩��� 279 ;; Parse if the buffer has changes since last time.
+ ��膩��鰹申鐃順�渇��膩��� 280 (if (eq gnus-article-length (- (point-max) (point-min)))
+ ��膩��鰹申鐃順�渇��膩��� 281 ()
+ ��膩��鰹申鐃順�渇��膩��� 282 ;;Reset parser information.
+ ��膩��鰹申鐃順�渇��膩��� 283 (setq gnus-cite-prefix-alist nil
+ ��膩��鰹申鐃順�渇��膩��� 284 gnus-cite-attribution-alist nil
+ ��膩��鰹申鐃順�渇��膩��� 285 gnus-cite-loose-prefix-alist nil
+ ��膩��鰹申鐃順�渇��膩��� 286 gnus-cite-loose-attribution-alist nil)
+ ��膩��鰹申鐃順�渇��膩��� 287 ;; Parse if not too large.
+ ��膩��鰹申鐃順�渇��膩��� 288 (if (and (not force)
+ ��膩��鰹申鐃順�渇��膩��� 289 gnus-cite-parse-max-size
+ ��膩��鰹申鐃順�渇��膩��� 290 (> (buffer-size) gnus-cite-parse-max-size))
+ ��膩��鰹申鐃順�渇��膩��� 291 ()
+ ��膩��鰹申鐃順�渇��膩��� 292 (setq gnus-article-length (- (point-max) (point-min)))
+ ��膩��鰹申鐃順�渇��膩��� 293 (gnus-cite-parse))))
+ ��膩��鰹申鐃順�渇��膩��� 294
+ ��膩��鰹申鐃順�渇��膩��� 295 (defun gnus-cite-parse ()
+ ��膩��鰹申鐃順�渇��膩��� 296 ;; Parse and connect citation prefixes and attribution lines.
+ ��膩��鰹申鐃順�渇��膩��� 297
+ ��膩��鰹申鐃順�渇��膩��� 298 ;; Parse current buffer searching for citation prefixes.
+ ��膩��鰹申鐃順�渇��膩��� 299 (goto-char (point-min))
+ ��膩��鰹申鐃順�渇��膩��� 300 (or (search-forward "\n\n" nil t)
+ ��膩��鰹申鐃順�渇��膩��� 301 (goto-char (point-max)))
+ ��膩��鰹申鐃順�渇��膩��� 302 (let ((line (1+ (count-lines (point-min) (point))))
+ ��膩��鰹申鐃順�渇��膩��� 303 (case-fold-search t)
+ ��膩��鰹申鐃順�渇��膩��� 304 (max (save-excursion
+ ��膩��鰹申鐃順�渇��膩��� 305 (goto-char (point-max))
+ ��膩��鰹申鐃順�渇��膩��� 306 (re-search-backward gnus-signature-separator nil t)
+ ��膩��鰹申鐃順�渇��膩��� 307 (point)))
+ ��膩��鰹申鐃順�渇��膩��� 308 alist entry start begin end numbers prefix)
+ ��膩��鰹申鐃順�渇��膩��� 309 ;; Get all potential prefixes in `alist'.
+ ��膩��鰹申鐃順�渇��膩��� 310 (while (< (point) max)
+ ��膩��鰹申鐃順�渇��膩��� 311 ;; Each line.
+ ��膩��鰹申鐃順�渇��膩��� 312 (setq begin (point)
+ ��膩��鰹申鐃順�渇��膩��� 313 end (progn (beginning-of-line 2) (point))
+ ��膩��鰹申鐃順�渇��膩��� 314 start end)
+ ��膩��鰹申鐃順�渇��膩��� 315 (goto-char begin)
+ ��膩��鰹申鐃順�渇��膩��� 316 ;; Ignore standard SuperCite attribution prefix.
+ ��膩��鰹申鐃順�渇��膩��� 317 (if (looking-at gnus-supercite-regexp)
+ ��膩��鰹申鐃順�渇��膩��� 318 (if (match-end 1)
+ ��膩��鰹申鐃順�渇��膩��� 319 (setq end (1+ (match-end 1)))
+ ��膩��鰹申鐃順�渇��膩��� 320 (setq end (1+ begin))))
+ ��膩��鰹申鐃順�渇��膩��� 321 ;; Ignore very long prefixes.
+ ��膩��鰹申鐃順�渇��膩��� 322 (if (> end (+ (point) gnus-cite-max-prefix))
+ ��膩��鰹申鐃順�渇��膩��� 323 (setq end (+ (point) gnus-cite-max-prefix)))
+ ��膩��鰹申鐃順�渇��膩��� 324 (while (re-search-forward gnus-cite-prefix-regexp (1- end) t)
+ ��膩��鰹申鐃順�渇��膩��� 325 ;; Each prefix.
+ ��膩��鰹申鐃順�渇��膩��� 326 (setq end (match-end 0)
+ ��膩��鰹申鐃順�渇��膩��� 327 prefix (buffer-substring begin end))
+ ��膩��鰹申鐃順�渇��膩��� 328 (set-text-properties 0 (length prefix) nil prefix)
+ ��膩��鰹申鐃順�渇��膩��� 329 (setq entry (assoc prefix alist))
+ ��膩��鰹申鐃順�渇��膩��� 330 (if entry
+ ��膩��鰹申鐃順�渇��膩��� 331 (setcdr entry (cons line (cdr entry)))
+ ��膩��鰹申鐃順�渇��膩��� 332 (setq alist (cons (list prefix line) alist)))
+ ��膩��鰹申鐃順�渇��膩��� 333 (goto-char begin))
+ ��膩��鰹申鐃順�渇��膩��� 334 (goto-char start)
+ ��膩��鰹申鐃順�渇��膩��� 335 (setq line (1+ line)))
+ ��膩��鰹申鐃順�渇��膩��� 336 ;; We got all the potential prefixes. Now create
+ ��膩��鰹申鐃順�渇��膩��� 337 ;; `gnus-cite-prefix-alist' containing the oldest prefix for each
+ ��膩��鰹申鐃順�渇��膩��� 338 ;; line that appears at least gnus-cite-minimum-match-count
+ ��膩��鰹申鐃順�渇��膩��� 339 ;; times. First sort them by length. Longer is older.
+ ��膩��鰹申鐃順�渇��膩��� 340 (setq alist (sort alist (lambda (a b)
+ ��膩��鰹申鐃順�渇��膩��� 341 (> (length (car a)) (length (car b))))))
+ ��膩��鰹申鐃順�渇��膩��� 342 (while alist
+ ��膩��鰹申鐃順�渇��膩��� 343 (setq entry (car alist)
+ ��膩��鰹申鐃順�渇��膩��� 344 prefix (car entry)
+ ��膩��鰹申鐃順�渇��膩��� 345 numbers (cdr entry)
+ ��膩��鰹申鐃順�渇��膩��� 346 alist (cdr alist))
+ ��膩��鰹申鐃順�渇��膩��� 347 (cond ((null numbers)
+ ��膩��鰹申鐃順�渇��膩��� 348 ;; No lines with this prefix that wasn't also part of
+ ��膩��鰹申鐃順�渇��膩��� 349 ;; a longer prefix.
+ ��膩��鰹申鐃順�渇��膩��� 350 )
+ ��膩��鰹申鐃順�渇��膩��� 351 ((< (length numbers) gnus-cite-minimum-match-count)
+ ��膩��鰹申鐃順�渇��膩��� 352 ;; Too few lines with this prefix. We keep it a bit
+ ��膩��鰹申鐃順�渇��膩��� 353 ;; longer in case it is an exact match for an attribution
+ ��膩��鰹申鐃順�渇��膩��� 354 ;; line, but we don't remove the line from other
+ ��膩��鰹申鐃順�渇��膩��� 355 ;; prefixes.
+ ��膩��鰹申鐃順�渇��膩��� 356 (setq gnus-cite-prefix-alist
+ ��膩��鰹申鐃順�渇��膩��� 357 (cons entry gnus-cite-prefix-alist)))
+ ��膩��鰹申鐃順�渇��膩��� 358 (t
+ ��膩��鰹申鐃順�渇��膩��� 359 (setq gnus-cite-prefix-alist (cons entry
+ ��膩��鰹申鐃順�渇��膩��� 360 gnus-cite-prefix-alist))
+ ��膩��鰹申鐃順�渇��膩��� 361 ;; Remove articles from other prefixes.
+ ��膩��鰹申鐃順�渇��膩��� 362 (let ((loop alist)
+ ��膩��鰹申鐃順�渇��膩��� 363 current)
+ ��膩��鰹申鐃順�渇��膩��� 364 (while loop
+ ��膩��鰹申鐃順�渇��膩��� 365 (setq current (car loop)
+ ��膩��鰹申鐃順�渇��膩��� 366 loop (cdr loop))
+ ��膩��鰹申鐃順�渇��膩��� 367 (setcdr current
+ ��膩��鰹申鐃順�渇��膩��� 368 (gnus-set-difference (cdr current) numbers))))))))
+ ��膩��鰹申鐃順�渇��膩��� 369 ;; No citations have been connected to attribution lines yet.
+ ��膩��鰹申鐃順�渇��膩��� 370 (setq gnus-cite-loose-prefix-alist (append gnus-cite-prefix-alist nil))
+ ��膩��鰹申鐃順�渇��膩��� 371
+ ��膩��鰹申鐃順�渇��膩��� 372 ;; Parse current buffer searching for attribution lines.
+ ��膩��鰹申鐃順�渇��膩��� 373 (goto-char (point-min))
+ ��膩��鰹申鐃順�渇��膩��� 374 (search-forward "\n\n" nil t)
+ ��膩��鰹申鐃順�渇��膩��� 375 (while (re-search-forward gnus-cite-attribution-postfix (point-max) t)
+ ��膩��鰹申鐃順�渇��膩��� 376 (let* ((start (match-beginning 0))
+ ��膩��鰹申鐃順�渇��膩��� 377 (end (match-end 0))
+ ��膩��鰹申鐃順�渇��膩��� 378 (wrote (count-lines (point-min) end))
+ ��膩��鰹申鐃順�渇��膩��� 379 (prefix (gnus-cite-find-prefix wrote))
+ ��膩��鰹申鐃順�渇��膩��� 380 ;; Check previous line for an attribution leader.
+ ��膩��鰹申鐃順�渇��膩��� 381 (tag (progn
+ ��膩��鰹申鐃順�渇��膩��� 382 (beginning-of-line 1)
+ ��膩��鰹申鐃順�渇��膩��� 383 (and (looking-at gnus-supercite-secondary-regexp)
+ ��膩��鰹申鐃順�渇��膩��� 384 (buffer-substring (match-beginning 1)
+ ��膩��鰹申鐃順�渇��膩��� 385 (match-end 1)))))
+ ��膩��鰹申鐃順�渇��膩��� 386 (in (progn
+ ��膩��鰹申鐃順�渇��膩��� 387 (goto-char start)
+ ��膩��鰹申鐃順�渇��膩��� 388 (and (re-search-backward gnus-cite-attribution-prefix
+ ��膩��鰹申鐃順�渇��膩��� 389 (save-excursion
+ ��膩��鰹申鐃順�渇��膩��� 390 (beginning-of-line 0)
+ ��膩��鰹申鐃順�渇��膩��� 391 (point))
+ ��膩��鰹申鐃順�渇��膩��� 392 t)
+ ��膩��鰹申鐃順�渇��膩��� 393 (not (re-search-forward gnus-cite-attribution-postfix
+ ��膩��鰹申鐃順�渇��膩��� 394 start t))
+ ��膩��鰹申鐃順�渇��膩��� 395 (count-lines (point-min) (1+ (point)))))))
+ ��膩��鰹申鐃順�渇��膩��� 396 (if (eq wrote in)
+ ��膩��鰹申鐃順�渇��膩��� 397 (setq in nil))
+ ��膩��鰹申鐃順�渇��膩��� 398 (goto-char end)
+ ��膩��鰹申鐃順�渇��膩��� 399 (setq gnus-cite-loose-attribution-alist
+ ��膩��鰹申鐃順�渇��膩��� 400 (cons (list wrote in prefix tag)
+ ��膩��鰹申鐃順�渇��膩��� 401 gnus-cite-loose-attribution-alist))))
+ ��膩��鰹申鐃順�渇��膩��� 402 ;; Find exact supercite citations.
+ ��膩��鰹申鐃順�渇��膩��� 403 (gnus-cite-match-attributions 'small nil
+ ��膩��鰹申鐃順�渇��膩��� 404 (lambda (prefix tag)
+ ��膩��鰹申鐃順�渇��膩��� 405 (if tag
+ ��膩��鰹申鐃順�渇��膩��� 406 (concat "\\`"
+ ��膩��鰹申鐃順�渇��膩��� 407 (regexp-quote prefix) "[ \t]*"
+ ��膩��鰹申鐃順�渇��膩��� 408 (regexp-quote tag) ">"))))
+ ��膩��鰹申鐃順�渇��膩��� 409 ;; Find loose supercite citations after attributions.
+ ��膩��鰹申鐃順�渇��膩��� 410 (gnus-cite-match-attributions 'small t
+ ��膩��鰹申鐃順�渇��膩��� 411 (lambda (prefix tag)
+ ��膩��鰹申鐃順�渇��膩��� 412 (if tag (concat "\\<"
+ ��膩��鰹申鐃順�渇��膩��� 413 (regexp-quote tag)
+ ��膩��鰹申鐃順�渇��膩��� 414 "\\>"))))
+ ��膩��鰹申鐃順�渇��膩��� 415 ;; Find loose supercite citations anywhere.
+ ��膩��鰹申鐃順�渇��膩��� 416 (gnus-cite-match-attributions 'small nil
+ ��膩��鰹申鐃順�渇��膩��� 417 (lambda (prefix tag)
+ ��膩��鰹申鐃順�渇��膩��� 418 (if tag (concat "\\<"
+ ��膩��鰹申鐃順�渇��膩��� 419 (regexp-quote tag)
+ ��膩��鰹申鐃順�渇��膩��� 420 "\\>"))))
+ ��膩��鰹申鐃順�渇��膩��� 421 ;; Find nested citations after attributions.
+ ��膩��鰹申鐃順�渇��膩��� 422 (gnus-cite-match-attributions 'small-if-unique t
+ ��膩��鰹申鐃順�渇��膩��� 423 (lambda (prefix tag)
+ ��膩��鰹申鐃順�渇��膩��� 424 (concat "\\`" (regexp-quote prefix) ".+")))
+ ��膩��鰹申鐃順�渇��膩��� 425 ;; Find nested citations anywhere.
+ ��膩��鰹申鐃順�渇��膩��� 426 (gnus-cite-match-attributions 'small nil
+ ��膩��鰹申鐃順�渇��膩��� 427 (lambda (prefix tag)
+ ��膩��鰹申鐃順�渇��膩��� 428 (concat "\\`" (regexp-quote prefix) ".+")))
+ ��膩��鰹申鐃順�渇��膩��� 429 ;; Remove loose prefixes with too few lines.
+ ��膩��鰹申鐃順�渇��膩��� 430 (let ((alist gnus-cite-loose-prefix-alist)
+ ��膩��鰹申鐃順�渇��膩��� 431 entry)
+ ��膩��鰹申鐃順�渇��膩��� 432 (while alist
+ ��膩��鰹申鐃順�渇��膩��� 433 (setq entry (car alist)
+ ��膩��鰹申鐃順�渇��膩��� 434 alist (cdr alist))
+ ��膩��鰹申鐃順�渇��膩��� 435 (if (< (length (cdr entry)) gnus-cite-minimum-match-count)
+ ��膩��鰹申鐃順�渇��膩��� 436 (setq gnus-cite-prefix-alist
+ ��膩��鰹申鐃順�渇��膩��� 437 (delq entry gnus-cite-prefix-alist)
+ ��膩��鰹申鐃順�渇��膩��� 438 gnus-cite-loose-prefix-alist
+ ��膩��鰹申鐃順�渇��膩��� 439 (delq entry gnus-cite-loose-prefix-alist)))))
+ ��膩��鰹申鐃順�渇��膩��� 440 ;; Find flat attributions.
+ ��膩��鰹申鐃順�渇��膩��� 441 (gnus-cite-match-attributions 'first t nil)
+ ��膩��鰹申鐃順�渇��膩��� 442 ;; Find any attributions (are we getting desperate yet?).
+ ��膩��鰹申鐃順�渇��膩��� 443 (gnus-cite-match-attributions 'first nil nil))
+ ��膩��鰹申鐃順�渇��膩��� 444
+ ��膩��鰹申鐃順�渇��膩��� 445 (defun gnus-cite-match-attributions (sort after fun)
+ ��膩��鰹申鐃順�渇��膩��� 446 ;; Match all loose attributions and citations (SORT AFTER FUN) .
+ ��膩��鰹申鐃順�渇��膩��� 447 ;;
+ ��膩��鰹申鐃順�渇��膩��� 448 ;; If SORT is `small', the citation with the shortest prefix will be
+ ��膩��鰹申鐃順�渇��膩��� 449 ;; used, if it is `first' the first prefix will be used, if it is
+ ��膩��鰹申鐃順�渇��膩��� 450 ;; `small-if-unique' the shortest prefix will be used if the
+ ��膩��鰹申鐃順�渇��膩��� 451 ;; attribution line does not share its own prefix with other
+ ��膩��鰹申鐃順�渇��膩��� 452 ;; loose attribution lines, otherwise the first prefix will be used.
+ ��膩��鰹申鐃順�渇��膩��� 453 ;;
+ ��膩��鰹申鐃順�渇��膩��� 454 ;; If AFTER is non-nil, only citations after the attribution line
+ ��膩��鰹申鐃順�渇��膩��� 455 ;; will be concidered.
+ ��膩��鰹申鐃順�渇��膩��� 456 ;;
+ ��膩��鰹申鐃順�渇��膩��� 457 ;; If FUN is non-nil, it will be called with the arguments (WROTE
+ ��膩��鰹申鐃順�渇��膩��� 458 ;; PREFIX TAG) and expected to return a regular expression. Only
+ ��膩��鰹申鐃順�渇��膩��� 459 ;; citations whose prefix matches the regular expression will be
+ ��膩��鰹申鐃順�渇��膩��� 460 ;; concidered.
+ ��膩��鰹申鐃順�渇��膩��� 461 ;;
+ ��膩��鰹申鐃順�渇��膩��� 462 ;; WROTE is the attribution line number.
+ ��膩��鰹申鐃順�渇��膩��� 463 ;; PREFIX is the attribution line prefix.
+ ��膩��鰹申鐃順�渇��膩��� 464 ;; TAG is the SuperCite tag on the attribution line.
+ ��膩��鰹申鐃順�渇��膩��� 465 (let ((atts gnus-cite-loose-attribution-alist)
+ ��膩��鰹申鐃順�渇��膩��� 466 (case-fold-search t)
+ ��膩��鰹申鐃順�渇��膩��� 467 att wrote in prefix tag regexp limit smallest best size)
+ ��膩��鰹申鐃順�渇��膩��� 468 (while atts
+ ��膩��鰹申鐃順�渇��膩��� 469 (setq att (car atts)
+ ��膩��鰹申鐃順�渇��膩��� 470 atts (cdr atts)
+ ��膩��鰹申鐃順�渇��膩��� 471 wrote (nth 0 att)
+ ��膩��鰹申鐃順�渇��膩��� 472 in (nth 1 att)
+ ��膩��鰹申鐃順�渇��膩��� 473 prefix (nth 2 att)
+ ��膩��鰹申鐃順�渇��膩��� 474 tag (nth 3 att)
+ ��膩��鰹申鐃順�渇��膩��� 475 regexp (if fun (funcall fun prefix tag) "")
+ ��膩��鰹申鐃順�渇��膩��� 476 size (cond ((eq sort 'small) t)
+ ��膩��鰹申鐃順�渇��膩��� 477 ((eq sort 'first) nil)
+ ��膩��鰹申鐃順�渇��膩��� 478 (t (< (length (gnus-cite-find-loose prefix)) 2)))
+ ��膩��鰹申鐃順�渇��膩��� 479 limit (if after wrote -1)
+ ��膩��鰹申鐃順�渇��膩��� 480 smallest 1000000
+ ��膩��鰹申鐃順�渇��膩��� 481 best nil)
+ ��膩��鰹申鐃順�渇��膩��� 482 (let ((cites gnus-cite-loose-prefix-alist)
+ ��膩��鰹申鐃順�渇��膩��� 483 cite candidate numbers first compare)
+ ��膩��鰹申鐃順�渇��膩��� 484 (while cites
+ ��膩��鰹申鐃順�渇��膩��� 485 (setq cite (car cites)
+ ��膩��鰹申鐃順�渇��膩��� 486 cites (cdr cites)
+ ��膩��鰹申鐃順�渇��膩��� 487 candidate (car cite)
+ ��膩��鰹申鐃順�渇��膩��� 488 numbers (cdr cite)
+ ��膩��鰹申鐃順�渇��膩��� 489 first (apply 'min numbers)
+ ��膩��鰹申鐃順�渇��膩��� 490 compare (if size (length candidate) first))
+ ��膩��鰹申鐃順�渇��膩��� 491 (and (> first limit)
+ ��膩��鰹申鐃順�渇��膩��� 492 regexp
+ ��膩��鰹申鐃順�渇��膩��� 493 (string-match regexp candidate)
+ ��膩��鰹申鐃順�渇��膩��� 494 (< compare smallest)
+ ��膩��鰹申鐃順�渇��膩��� 495 (setq best cite
+ ��膩��鰹申鐃順�渇��膩��� 496 smallest compare))))
+ ��膩��鰹申鐃順�渇��膩��� 497 (if (null best)
+ ��膩��鰹申鐃順�渇��膩��� 498 ()
+ ��膩��鰹申鐃順�渇��膩��� 499 (setq gnus-cite-loose-attribution-alist
+ ��膩��鰹申鐃順�渇��膩��� 500 (delq att gnus-cite-loose-attribution-alist))
+ ��膩��鰹申鐃順�渇��膩��� 501 (setq gnus-cite-attribution-alist
+ ��膩��鰹申鐃順�渇��膩��� 502 (cons (cons wrote (car best)) gnus-cite-attribution-alist))
+ ��膩��鰹申鐃順�渇��膩��� 503 (if in
+ ��膩��鰹申鐃順�渇��膩��� 504 (setq gnus-cite-attribution-alist
+ ��膩��鰹申鐃順�渇��膩��� 505 (cons (cons in (car best)) gnus-cite-attribution-alist)))
+ ��膩��鰹申鐃順�渇��膩��� 506 (if (memq best gnus-cite-loose-prefix-alist)
+ ��膩��鰹申鐃順�渇��膩��� 507 (let ((loop gnus-cite-prefix-alist)
+ ��膩��鰹申鐃順�渇��膩��� 508 (numbers (cdr best))
+ ��膩��鰹申鐃順�渇��膩��� 509 current)
+ ��膩��鰹申鐃順�渇��膩��� 510 (setq gnus-cite-loose-prefix-alist
+ ��膩��鰹申鐃順�渇��膩��� 511 (delq best gnus-cite-loose-prefix-alist))
+ ��膩��鰹申鐃順�渇��膩��� 512 (while loop
+ ��膩��鰹申鐃順�渇��膩��� 513 (setq current (car loop)
+ ��膩��鰹申鐃順�渇��膩��� 514 loop (cdr loop))
+ ��膩��鰹申鐃順�渇��膩��� 515 (if (eq current best)
+ ��膩��鰹申鐃順�渇��膩��� 516 ()
+ ��膩��鰹申鐃順�渇��膩��� 517 (setcdr current (gnus-set-difference (cdr current) numbers))
+ ��膩��鰹申鐃順�渇��膩��� 518 (if (null (cdr current))
+ ��膩��鰹申鐃順�渇��膩��� 519 (setq gnus-cite-loose-prefix-alist
+ ��膩��鰹申鐃順�渇��膩��� 520 (delq current gnus-cite-loose-prefix-alist)
+ ��膩��鰹申鐃順�渇��膩��� 521 atts (delq current atts)))))))))))
+ ��膩��鰹申鐃順�渇��膩��� 522
+ ��膩��鰹申鐃順�渇��膩��� 523 (defun gnus-cite-find-loose (prefix)
+ ��膩��鰹申鐃順�渇��膩��� 524 ;; Return a list of loose attribution lines prefixed by PREFIX.
+ ��膩��鰹申鐃順�渇��膩��� 525 (let* ((atts gnus-cite-loose-attribution-alist)
+ ��膩��鰹申鐃順�渇��膩��� 526 att line lines)
+ ��膩��鰹申鐃順�渇��膩��� 527 (while atts
+ ��膩��鰹申鐃順�渇��膩��� 528 (setq att (car atts)
+ ��膩��鰹申鐃順�渇��膩��� 529 line (car att)
+ ��膩��鰹申鐃順�渇��膩��� 530 atts (cdr atts))
+ ��膩��鰹申鐃順�渇��膩��� 531 (if (string-equal (gnus-cite-find-prefix line) prefix)
+ ��膩��鰹申鐃順�渇��膩��� 532 (setq lines (cons line lines))))
+ ��膩��鰹申鐃順�渇��膩��� 533 lines))
+ ��膩��鰹申鐃順�渇��膩��� 534
+ ��膩��鰹申鐃順�渇��膩��� 535 (defun gnus-cite-add-face (number prefix face)
+ ��膩��鰹申鐃順�渇��膩��� 536 ;; At line NUMBER, ignore PREFIX and add FACE to the rest of the line.
+ ��膩��鰹申鐃順�渇��膩��� 537 (if face
+ ��膩��鰹申鐃順�渇��膩��� 538 (let ((inhibit-point-motion-hooks t)
+ ��膩��鰹申鐃順�渇��膩��� 539 from to)
+ ��膩��鰹申鐃順�渇��膩��� 540 (goto-line number)
+ ��膩��鰹申鐃順�渇��膩��� 541 (forward-char (length prefix))
+ ��膩��鰹申鐃順�渇��膩��� 542 (skip-chars-forward " \t")
+ ��膩��鰹申鐃順�渇��膩��� 543 (setq from (point))
+ ��膩��鰹申鐃順�渇��膩��� 544 (end-of-line 1)
+ ��膩��鰹申鐃順�渇��膩��� 545 (skip-chars-backward " \t")
+ ��膩��鰹申鐃順�渇��膩��� 546 (setq to (point))
+ ��膩��鰹申鐃順�渇��膩��� 547 (if (< from to)
+ ��膩��鰹申鐃順�渇��膩��� 548 (gnus-overlay-put (gnus-make-overlay from to) 'face face)))))
+ ��膩��鰹申鐃順�渇��膩��� 549
+ ��膩��鰹申鐃順�渇��膩��� 550 (defun gnus-cite-toggle (prefix)
+ ��膩��鰹申鐃順�渇��膩��� 551 (save-excursion
+ ��膩��鰹申鐃順�渇��膩��� 552 (set-buffer gnus-article-buffer)
+ ��膩��鰹申鐃順�渇��膩��� 553 (let ((buffer-read-only nil)
+ ��膩��鰹申鐃順�渇��膩��� 554 (numbers (cdr (assoc prefix gnus-cite-prefix-alist)))
+ ��膩��鰹申鐃順�渇��膩��� 555 (inhibit-point-motion-hooks t)
+ ��膩��鰹申鐃順�渇��膩��� 556 number)
+ ��膩��鰹申鐃順�渇��膩��� 557 (while numbers
+ ��膩��鰹申鐃順�渇��膩��� 558 (setq number (car numbers)
+ ��膩��鰹申鐃順�渇��膩��� 559 numbers (cdr numbers))
+ ��膩��鰹申鐃順�渇��膩��� 560 (goto-line number)
+ ��膩��鰹申鐃順�渇��膩��� 561 (cond ((get-text-property (point) 'invisible)
+ ��膩��鰹申鐃順�渇��膩��� 562 (remove-text-properties (point) (progn (forward-line 1) (point))
+ ��膩��鰹申鐃順�渇��膩��� 563 gnus-hidden-properties))
+ ��膩��鰹申鐃順�渇��膩��� 564 ((assq number gnus-cite-attribution-alist))
+ ��膩��鰹申鐃順�渇��膩��� 565 (t
+ ��膩��鰹申鐃順�渇��膩��� 566 (add-text-properties (point) (progn (forward-line 1) (point))
+ ��膩��鰹申鐃順�渇��膩��� 567 gnus-hidden-properties)))))))
+ ��膩��鰹申鐃順�渇��膩��� 568
+ ��膩��鰹申鐃順�渇��膩��� 569 (defun gnus-cite-find-prefix (line)
+ ��膩��鰹申鐃順�渇��膩��� 570 ;; Return citation prefix for LINE.
+ ��膩��鰹申鐃順�渇��膩��� 571 (let ((alist gnus-cite-prefix-alist)
+ ��膩��鰹申鐃順�渇��膩��� 572 (prefix "")
+ ��膩��鰹申鐃順�渇��膩��� 573 entry)
+ ��膩��鰹申鐃順�渇��膩��� 574 (while alist
+ ��膩��鰹申鐃順�渇��膩��� 575 (setq entry (car alist)
+ ��膩��鰹申鐃順�渇��膩��� 576 alist (cdr alist))
+ ��膩��鰹申鐃順�渇��膩��� 577 (if (memq line (cdr entry))
+ ��膩��鰹申鐃順�渇��膩��� 578 (setq prefix (car entry))))
+ ��膩��鰹申鐃順�渇��膩��� 579 prefix))
+ ��膩��鰹申鐃順�渇��膩��� 580
+ ��膩��鰹申鐃順�渇��膩��� 581 (gnus-ems-redefine)
+ ��膩��鰹申鐃順�渇��膩��� 582
+ ��膩��鰹申鐃順�渇��膩��� 583 (provide 'gnus-cite)
+ ��膩��鰹申鐃順�渇��膩��� 584
+ ��膩��鰹申鐃順�渇��膩��� 585 ;;; gnus-cite.el ends here