[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/gnus/deuglify.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/gnus/deuglify.el,v |
Date: |
Sun, 28 Oct 2007 09:18:47 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 07/10/28 09:18:40
Index: lisp/gnus/deuglify.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/deuglify.el,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- lisp/gnus/deuglify.el 26 Jul 2007 05:26:56 -0000 1.13
+++ lisp/gnus/deuglify.el 28 Oct 2007 09:18:26 -0000 1.14
@@ -315,7 +315,6 @@
indicating the minimum and maximum length of an unwrapped citation line. If
NODISPLAY is non-nil, don't redisplay the article buffer."
(interactive "P")
- (save-excursion
(let ((case-fold-search nil)
(inhibit-read-only t)
(cite-marks gnus-outlook-deuglify-cite-marks)
@@ -331,16 +330,15 @@
nil t)
(let ((len12 (- (match-end 2) (match-beginning 1)))
(len3 (- (match-end 3) (match-beginning 3))))
- (if (and (> len12 gnus-outlook-deuglify-unwrap-min)
+ (when (and (> len12 gnus-outlook-deuglify-unwrap-min)
(< (+ len12 len3) gnus-outlook-deuglify-unwrap-max))
- (progn
(replace-match "\\1\\2 \\3")
- (goto-char (match-beginning 0)))))))))
+ (goto-char (match-beginning 0)))))))
(unless nodisplay (gnus-outlook-display-article-buffer)))
(defun gnus-outlook-rearrange-article (attr-start)
"Put the text from ATTR-START to the end of buffer at the top of the article
buffer."
- (save-excursion
+ ;; FIXME: 1. (*) text/plain ( ) text/html
(let ((inhibit-read-only t)
(cite-marks gnus-outlook-deuglify-cite-marks))
(gnus-with-article-buffer
@@ -355,31 +353,39 @@
(point-max))))
;; handle the case where the full quote is below the
;; signature
- (if (< to attr-start)
+ (when (< to attr-start)
+ (setq to (point-max)))
+ (save-excursion
+ (narrow-to-region attr-start to)
+ (goto-char attr-start)
+ (forward-line)
+ (unless (looking-at ">")
+ (message-indent-citation (point) (point-max) 'yank-only)
+ (goto-char (point-max))
+ (newline)
(setq to (point-max)))
- (transpose-regions cur attr-start attr-start to)))))))
+ (widen))
+ (transpose-regions cur attr-start attr-start to))))))
;; John Doe <address@hidden> wrote in message
;; news:address@hidden
(defun gnus-outlook-repair-attribution-outlook ()
"Repair a broken attribution line (Outlook)."
- (save-excursion
(let ((case-fold-search nil)
(inhibit-read-only t)
(cite-marks gnus-outlook-deuglify-cite-marks))
(gnus-with-article-buffer
(article-goto-body)
- (if (re-search-forward
+ (when (re-search-forward
(concat "^\\([^" cite-marks "].+\\)"
"\\(" gnus-outlook-deuglify-attrib-verb-regexp "\\)"
"\\(.*\n?[^\n" cite-marks "].*\\)?"
"\\(" gnus-outlook-deuglify-attrib-end-regexp "\\)$")
nil t)
- (progn
(gnus-kill-all-overlays)
(replace-match "\\1\\2\\4")
- (match-beginning 0)))))))
+ (match-beginning 0)))))
;; ----- Original Message -----
@@ -390,42 +396,38 @@
(defun gnus-outlook-repair-attribution-block ()
"Repair a big broken attribution block."
- (save-excursion
(let ((case-fold-search nil)
(inhibit-read-only t)
(cite-marks gnus-outlook-deuglify-cite-marks))
(gnus-with-article-buffer
(article-goto-body)
- (if (re-search-forward
+ (when (re-search-forward
(concat "^[" cite-marks " \t]*--* ?[^-]+ [^-]+ ?--*\\s *\n"
"[^\n:]+:[ \t]*\\([^\n]+\\)\n"
"\\([^\n:]+:[ \t]*[^\n]+\n\\)+")
nil t)
- (progn
(gnus-kill-all-overlays)
(replace-match "\\1 wrote:\n")
- (match-beginning 0)))))))
+ (match-beginning 0)))))
;; On Wed, 16 Jan 2002 23:23:30 +0100, John Doe <address@hidden> wrote:
(defun gnus-outlook-repair-attribution-other ()
"Repair a broken attribution line (other user agents than Outlook)."
- (save-excursion
(let ((case-fold-search nil)
(inhibit-read-only t)
(cite-marks gnus-outlook-deuglify-cite-marks))
(gnus-with-article-buffer
(article-goto-body)
- (if (re-search-forward
+ (when (re-search-forward
(concat "^\\("gnus-outlook-deuglify-attrib-cut-regexp"\\)?"
"\\([^" cite-marks "].+\\)\n\\([^\n" cite-marks "].*\\)?"
"\\(" gnus-outlook-deuglify-attrib-verb-regexp "\\).*"
"\\(" gnus-outlook-deuglify-attrib-end-regexp "\\)$")
nil t)
- (progn
(gnus-kill-all-overlays)
(replace-match "\\4 \\5\\6\\7")
- (match-beginning 0)))))))
+ (match-beginning 0)))))
;;;###autoload
(defun gnus-article-outlook-repair-attribution (&optional nodisplay)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/gnus/deuglify.el,v,
Miles Bader <=