• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/gnus/

Lines Matching +defs:gnus +defs:article +defs:outlook +defs:rearrange +defs:citation

50 ;; The function `gnus-article-outlook-unwrap-lines' tries to recognize those
58 ;; practice a bad citation style by omitting blank lines between the
73 ;; `gnus-article-outlook-unwrap-lines' will only unwrap lines if the resulting
74 ;; citation line will be of a certain maximum length. You can control
75 ;; this by adjusting `gnus-outlook-deuglify-unwrap-max'. Also
77 ;; wrapped line has a minimum length of `gnus-outlook-deuglify-unwrap-min'.
81 ;; `gnus-outlook-deuglify-unwrap-stop-chars'. Setting this to ".?!"
87 ;; Unwrapping works on every level of citation. Thus you will be able
99 ;; the cited text and cite the complete original article below.
116 ;; `gnus-article-outlook-repair-attribution which calls other function that
118 ;; `gnus-outlook-deuglify-attrib-cut-regexp' for stuff that should be
120 ;; `gnus-outlook-deuglify-attrib-verb-regexp' for the verbs that are
124 ;; Rearranging the article so that the cited text appears above the
126 ;; `gnus-article-outlook-rearrange-citation'. This function calls
127 ;; `gnus-article-outlook-repair-attribution to find and repair an attribution
158 ;; To automatically invoke deuglification on every article you read,
159 ;; put something like that in your .gnus:
161 ;; (add-hook 'gnus-article-decode-hook 'gnus-article-outlook-unwrap-lines)
166 ;; (add-hook 'gnus-article-decode-hook 'gnus-article-outlook-repair-attribution)
169 ;; (add-hook 'gnus-article-decode-hook 'gnus-article-outlook-rearrange-citation)
173 ;; refill the whole article using `W w'.
181 ;; unwrapping cited lines with `gnus-article-outlook-unwrap-lines'.
183 ;; `gnus-article-outlook-repair-attribution will only fix the first
184 ;; attribution line found in the article. Furthermore it fixed to
189 ;; `gnus-article-outlook-rearrange-citation' carries all the limitations of
190 ;; `gnus-article-outlook-repair-attribution.
197 ;; * New variable `gnus-outlook-deuglify-no-wrap-chars' to inhibit
199 ;; * Improved rearranging of the article.
200 ;; * New function `gnus-outlook-repair-attribution-block' for repairing
204 ;; Renamed `gnus-outlook-deuglify-article' to
205 ;; `gnus-article-outlook-deuglify-article'.
206 ;; Made it easier to deuglify the article while being in Gnus' Article
224 (require 'gnus-art)
225 (require 'gnus-sum)
227 (defconst gnus-outlook-deuglify-version "1.5 Gnus version"
228 "Version of gnus-outlook-deuglify.")
232 (defgroup gnus-outlook-deuglify nil
235 :group 'gnus)
237 (defcustom gnus-outlook-deuglify-unwrap-min 45
241 :group 'gnus-outlook-deuglify)
243 (defcustom gnus-outlook-deuglify-unwrap-max 95
247 :group 'gnus-outlook-deuglify)
249 (defcustom gnus-outlook-deuglify-cite-marks ">|#%"
253 :group 'gnus-outlook-deuglify)
255 (defcustom gnus-outlook-deuglify-unwrap-stop-chars nil ;; ".?!" or nil
260 :group 'gnus-outlook-deuglify)
262 (defcustom gnus-outlook-deuglify-no-wrap-chars "`"
266 :group 'gnus-outlook-deuglify)
268 (defcustom gnus-outlook-deuglify-attrib-cut-regexp
273 :group 'gnus-outlook-deuglify)
275 (defcustom gnus-outlook-deuglify-attrib-verb-regexp
280 :group 'gnus-outlook-deuglify)
282 (defcustom gnus-outlook-deuglify-attrib-end-regexp
287 :group 'gnus-outlook-deuglify)
289 (defcustom gnus-outlook-display-hook nil
290 "A hook called after an deuglified article has been prepared.
291 It is run after `gnus-article-prepare-hook'."
294 :group 'gnus-outlook-deuglify)
298 (defun gnus-outlook-display-article-buffer ()
299 "Redisplay current buffer or article buffer."
300 (with-current-buffer (or gnus-article-buffer (current-buffer))
301 ;; "Emulate" `gnus-article-prepare-display' without calling
302 ;; it. Calling `gnus-article-prepare-display' on an already
303 ;; prepared article removes all MIME parts. I'm unsure whether
305 (gnus-article-highlight t)
306 (gnus-treat-article nil)
307 (gnus-run-hooks 'gnus-article-prepare-hook
308 'gnus-outlook-display-hook)))
311 (defun gnus-article-outlook-unwrap-lines (&optional nodisplay)
312 "Unwrap lines that appear to be wrapped citation lines.
314 `gnus-outlook-deuglify-unwrap-min' and `gnus-outlook-deuglify-unwrap-max',
315 indicating the minimum and maximum length of an unwrapped citation line. If
316 NODISPLAY is non-nil, don't redisplay the article buffer."
321 (cite-marks gnus-outlook-deuglify-cite-marks)
322 (no-wrap gnus-outlook-deuglify-no-wrap-chars)
323 (stop-chars gnus-outlook-deuglify-unwrap-stop-chars))
324 (gnus-with-article-buffer
325 (article-goto-body)
334 (if (and (> len12 gnus-outlook-deuglify-unwrap-min)
335 (< (+ len12 len3) gnus-outlook-deuglify-unwrap-max))
339 (unless nodisplay (gnus-outlook-display-article-buffer)))
341 (defun gnus-outlook-rearrange-article (attr-start)
342 "Put the text from ATTR-START to the end of buffer at the top of the article buffer."
345 (cite-marks gnus-outlook-deuglify-cite-marks))
346 (gnus-with-article-buffer
347 (article-goto-body)
348 ;; article does not start with attribution
350 (gnus-kill-all-overlays)
353 (to (if (gnus-article-search-signature)
365 (defun gnus-outlook-repair-attribution-outlook ()
370 (cite-marks gnus-outlook-deuglify-cite-marks))
371 (gnus-with-article-buffer
372 (article-goto-body)
375 "\\(" gnus-outlook-deuglify-attrib-verb-regexp "\\)"
377 "\\(" gnus-outlook-deuglify-attrib-end-regexp "\\)$")
380 (gnus-kill-all-overlays)
391 (defun gnus-outlook-repair-attribution-block ()
396 (cite-marks gnus-outlook-deuglify-cite-marks))
397 (gnus-with-article-buffer
398 (article-goto-body)
405 (gnus-kill-all-overlays)
411 (defun gnus-outlook-repair-attribution-other ()
416 (cite-marks gnus-outlook-deuglify-cite-marks))
417 (gnus-with-article-buffer
418 (article-goto-body)
420 (concat "^\\("gnus-outlook-deuglify-attrib-cut-regexp"\\)?"
422 "\\(" gnus-outlook-deuglify-attrib-verb-regexp "\\).*"
423 "\\(" gnus-outlook-deuglify-attrib-end-regexp "\\)$")
426 (gnus-kill-all-overlays)
431 (defun gnus-article-outlook-repair-attribution (&optional nodisplay)
433 If NODISPLAY is non-nil, don't redisplay the article buffer."
437 (gnus-outlook-repair-attribution-other)
438 (gnus-outlook-repair-attribution-block)
439 (gnus-outlook-repair-attribution-outlook))))
440 (unless nodisplay (gnus-outlook-display-article-buffer))
443 (defun gnus-article-outlook-rearrange-citation (&optional nodisplay)
445 If NODISPLAY is non-nil, don't redisplay the article buffer."
447 (let ((attrib-start (gnus-article-outlook-repair-attribution 'nodisplay)))
448 ;; rearrange citations if an attribution line has been recognized
450 (gnus-outlook-rearrange-article attrib-start)))
451 (unless nodisplay (gnus-outlook-display-article-buffer)))
454 (defun gnus-outlook-deuglify-article (&optional nodisplay)
456 Treat dumbquotes, unwrap lines, repair attribution and rearrange citation. If
457 NODISPLAY is non-nil, don't redisplay the article buffer."
460 (gnus-article-treat-dumbquotes)
462 (gnus-article-outlook-unwrap-lines 'nodisplay)
463 ;; repair attribution line and rearrange citation.
464 (gnus-article-outlook-rearrange-citation 'nodisplay)
465 (unless nodisplay (gnus-outlook-display-article-buffer)))
468 (defun gnus-article-outlook-deuglify-article ()
471 (gnus-outlook-deuglify-article nil))