* deuglify.el (gnus-outlook-deuglify-attrib-verb-regexp): Added
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 11 Jan 2003 21:47:00 +0000 (21:47 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 11 Jan 2003 21:47:00 +0000 (21:47 +0000)
castellano.
(gnus-outlook-display-hook): New variable.
(gnus-outlook-display-article-buffer): New function.
(gnus-outlook-unwrap-lines, gnus-outlook-repair-attribution)
(gnus-outlook-deuglify-article): Made them interactive and added
optional arg.  Use `g-o-d-a-b'.
(gnus-article-outlook-deuglify-article): Use `g-o-d-a-b'.

* gnus-sum.el: Added autoloads.
(gnus-summary-mode-map): Added gnus-summary-wash-deuglify-map.
(gnus-summary-make-menu-bar): Added "(Outlook) Deuglify" menu.

* gnus-art.el (gnus-display-mime): Use the mime emulation
variable.

* gnus-sum.el (gnus-article-emulate-mime): New variable.

* gnus-start.el (gnus-read-newsrc-el-file): Make sure that the
newsrc-alist is initialized properly.

* mail-source.el (mail-sources): Autoload.

* gnus-sum.el (gnus-summary-make-false-root-always): Default to
nil.

lisp/ChangeLog
lisp/deuglify.el
lisp/gnus-art.el
lisp/gnus-start.el
lisp/gnus-sum.el
lisp/mail-source.el

index bd46a4b..6533ac6 100644 (file)
@@ -1,5 +1,30 @@
+2003-01-10  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * deuglify.el (gnus-outlook-deuglify-attrib-verb-regexp): Added
+       castellano.
+       (gnus-outlook-display-hook): New variable.
+       (gnus-outlook-display-article-buffer): New function.
+       (gnus-outlook-unwrap-lines, gnus-outlook-repair-attribution)
+       (gnus-outlook-deuglify-article): Made them interactive and added
+       optional arg.  Use `g-o-d-a-b'.
+       (gnus-article-outlook-deuglify-article): Use `g-o-d-a-b'.
+
+       * gnus-sum.el: Added autoloads.
+       (gnus-summary-mode-map): Added gnus-summary-wash-deuglify-map.
+       (gnus-summary-make-menu-bar): Added "(Outlook) Deuglify" menu.
+
 2003-01-11  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-art.el (gnus-display-mime): Use the mime emulation
+       variable. 
+
+       * gnus-sum.el (gnus-article-emulate-mime): New variable.
+
+       * gnus-start.el (gnus-read-newsrc-el-file): Make sure that the
+       newsrc-alist is initialized properly.
+
+       * mail-source.el (mail-sources): Autoload.
+
        * gnus-sum.el (gnus-summary-make-false-root-always): Default to
        nil.
 
index 81ba9e9..915a625 100644 (file)
   :group 'gnus-outlook-deuglify)
 
 (defcustom gnus-outlook-deuglify-attrib-verb-regexp
-  "wrote\\|writes\\|says\\|schrieb\\|schreibt\\|meinte\\|skrev\\|a écrit\\|schreef"
+  "wrote\\|writes\\|says\\|schrieb\\|schreibt\\|meinte\\|skrev\\|a écrit\\|schreef\\|escribió"
   "Regular expression matching the verb used in an attribution line."
   :type 'string
   :group 'gnus-outlook-deuglify)
   :type 'string
   :group 'gnus-outlook-deuglify)
 
+;;;###autoload
+(defcustom gnus-outlook-display-hook nil
+  "A hook called after an deuglified article has been prepared.
+It is run after `gnus-article-prepare-hook'."
+  :type 'hook
+  :group 'gnus-outlook-deuglify)
 
 ;; Functions
 
+(defun gnus-outlook-display-article-buffer ()
+  "Redisplay current buffer or article buffer."
+  (with-current-buffer (or gnus-article-buffer (current-buffer))
+    ;; "Emulate" `gnus-article-prepare-display' without calling
+    ;; it. Calling `gnus-article-prepare-display' on an already
+    ;; prepared article removes all MIME parts.  I'm unsure whether
+    ;; this is a bug or not.
+    (gnus-article-highlight t)
+    (gnus-treat-article nil)
+    (gnus-run-hooks 'gnus-article-prepare-hook
+                   'gnus-outlook-display-hook)))
+
 ;;;###autoload
-(defun gnus-outlook-unwrap-lines ()
-  "Unwrap lines that appear to be wrapped citation lines.
+(defun gnus-outlook-unwrap-lines (&optional nodisplay)
+  "Unwrap lines that appear to be wrapped citation lines.  
 You can control what lines will be unwrapped by frobbing
-`gnus-outlook-deuglify-unwrap-min' and
-`gnus-outlook-deuglify-unwrap-max', indicating the miminum and maximum
-length of an unwrapped citation line."
-  (interactive)
+`gnus-outlook-deuglify-unwrap-min' and `gnus-outlook-deuglify-unwrap-max',
+indicating the miminum 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)
@@ -308,7 +326,8 @@ length of an unwrapped citation line."
                     (< (+ 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."
@@ -400,45 +419,46 @@ length of an unwrapped citation line."
              (match-beginning 0)))))))
 
 ;;;###autoload
-(defun gnus-outlook-repair-attribution ()
-  "Repair a broken attribution line."
-  (interactive)
-  (or
-   (gnus-outlook-repair-attribution-other)
-   (gnus-outlook-repair-attribution-block)
-   (gnus-outlook-repair-attribution-outlook)))
-
-(defun gnus-outlook-rearrange-citation ()
-  "Repair broken citations."
-  (let ((attrib-start (gnus-outlook-repair-attribution)))
+(defun gnus-outlook-repair-attribution (&optional nodisplay)
+  "Repair a broken attribution line.
+If NODISPLAY is non-nil, don't redisplay the article buffer."
+  (interactive "P")
+  (let ((attrib-start
+        (or
+         (gnus-outlook-repair-attribution-other)
+         (gnus-outlook-repair-attribution-block)
+         (gnus-outlook-repair-attribution-outlook))))
+    (unless nodisplay (gnus-outlook-display-article-buffer))
+    attrib-start))
+
+(defun gnus-outlook-rearrange-citation (&optional nodisplay)
+  "Repair broken citations.
+If NODISPLAY is non-nil, don't redisplay the article buffer."
+  (interactive "P")
+  (let ((attrib-start (gnus-outlook-repair-attribution 'nodisplay)))
     ;; rearrange citations if an attribution line has been recognized
     (if attrib-start
-       (gnus-outlook-rearrange-article attrib-start))))
+       (gnus-outlook-rearrange-article attrib-start)))
+  (unless nodisplay (gnus-outlook-display-article-buffer)))
 
 ;;;###autoload
-(defun gnus-outlook-deuglify-article ()
-  "Deuglify broken Outlook (Express) articles."
-  (interactive)
+(defun gnus-outlook-deuglify-article (&optional nodisplay)
+  "Deuglify broken Outlook (Express) articles.
+If NODISPLAY is non-nil, don't redisplay the article buffer."
+  (interactive "P")
   ;; apply treatment of dumb quotes
   (gnus-article-treat-dumbquotes)
   ;; repair wrapped cited lines
-  (gnus-outlook-unwrap-lines)
+  (gnus-outlook-unwrap-lines 'nodisplay)
   ;; repair attribution line
-  (gnus-outlook-rearrange-citation))
+  (gnus-outlook-rearrange-citation 'nodisplay)
+  (unless nodisplay (gnus-outlook-display-article-buffer)))
 
 ;;;###autoload
 (defun gnus-article-outlook-deuglify-article ()
   "Deuglify broken Outlook (Express) articles and redisplay."
   (interactive)
-  (gnus-outlook-deuglify-article)
-  (with-current-buffer (or gnus-article-buffer (current-buffer))
-    ;; "Emulate" `gnus-article-prepare-display' without calling
-    ;; it. Calling `gnus-article-prepare-display' on an already
-    ;; prepared article removes all MIME parts.  I'm unsure whether
-    ;; this is a bug or not.
-    (gnus-article-highlight t)
-    (gnus-treat-article nil)
-    (gnus-run-hooks 'gnus-article-prepare-hook)))
+  (gnus-outlook-deuglify-article nil))
 
 (provide 'deuglify)
 
index 94278b0..c71dfe0 100644 (file)
@@ -4343,9 +4343,10 @@ If no internal viewer is available, use an external viewer."
          ;; We have to do this since selecting the window
          ;; may change the point.  So we set the window point.
          (set-window-point window point)))
-      (let* ((handles (or ihandles (mm-dissect-buffer
-                                   nil gnus-article-loose-mime)
-                         (mm-uu-dissect)))
+      (let* ((handles (or ihandles
+                         (mm-dissect-buffer nil gnus-article-loose-mime)
+                         (and gnus-article-emulate-mime
+                              (mm-uu-dissect))))
             buffer-read-only handle name type b e display)
        (when (and (not ihandles)
                   (not gnus-displaying-mime))
index 9425dea..124ac58 100644 (file)
@@ -2196,14 +2196,14 @@ If FORCE is non-nil, the .newsrc file is read."
                    (< version 5.090009))
            (setq gnus-format-specs gnus-default-format-specs)))
        (when gnus-newsrc-assoc
-         (setq gnus-newsrc-alist gnus-newsrc-assoc)))
-      (gnus-make-hashtable-from-newsrc-alist)
-      (when (file-newer-than-file-p file ding-file)
-       ;; Old format quick file
-       (gnus-message 5 "Reading %s..." file)
-       ;; The .el file is newer than the .eld file, so we read that one
-       ;; as well.
-       (gnus-read-old-newsrc-el-file file)))))
+         (setq gnus-newsrc-alist gnus-newsrc-assoc))))
+    (gnus-make-hashtable-from-newsrc-alist)
+    (when (file-newer-than-file-p file ding-file)
+      ;; Old format quick file
+      (gnus-message 5 "Reading %s..." file)
+      ;; The .el file is newer than the .eld file, so we read that one
+      ;; as well.
+      (gnus-read-old-newsrc-el-file file))))
 
 ;; Parse the old-style quick startup file
 (defun gnus-read-old-newsrc-el-file (file)
index 0aa82ee..0c37ba2 100644 (file)
@@ -46,6 +46,9 @@
 (autoload 'gnus-article-outlook-deuglify-article "deuglify"
   "Deuglify broken Outlook (Express) articles and redisplay."
   t)
+(autoload 'gnus-outlook-unwrap-lines "deuglify" nil t)
+(autoload 'gnus-outlook-repair-attribution "deuglify" nil t)
+(autoload 'gnus-outlook-rearrange-citation "deuglify" nil t)
 
 (defcustom gnus-kill-summary-on-exit t
   "*If non-nil, kill the summary buffer when you exit from it.
@@ -1040,6 +1043,14 @@ the MIME-Version header is missed."
   :type 'boolean
   :group 'gnus-article)
 
+(defcustom gnus-article-emulate-mime t
+  "If non-nil, use MIME emulation for uuencode and the like.
+This means that Gnus will search message bodies for text that look
+like uuencoded bits, yEncoded bits, and so on, and present that using
+the normal Gnus MIME machinery."
+  :type 'boolean
+  :group 'gnus-article)
+
 ;;; Internal variables
 
 (defvar gnus-summary-display-cache nil)
@@ -1785,7 +1796,14 @@ increase the score of each group you read."
     "a" gnus-article-strip-headers-in-body ;; mnemonic: wash archive
     "p" gnus-article-verify-x-pgp-sig
     "d" gnus-article-treat-dumbquotes
-    "k" gnus-article-outlook-deuglify-article)
+    "k" gnus-article-outlook-deuglify-article) ;; mnemonic: outloo*k*
+
+  (gnus-define-keys (gnus-summary-wash-deuglify-map "Y" gnus-summary-wash-map)
+    ;; mnemonic: deuglif*Y*
+    "u" gnus-outlook-unwrap-lines
+    "a" gnus-outlook-repair-attribution
+    "c" gnus-outlook-rearrange-citation
+    "f" gnus-article-outlook-deuglify-article) ;; mnemonic: full deuglify
 
   (gnus-define-keys (gnus-summary-wash-hide-map "W" gnus-summary-wash-map)
     "a" gnus-article-hide
@@ -2099,7 +2117,12 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
              ["URLs" gnus-article-unsplit-urls t]
              ["Verify X-PGP-Sig" gnus-article-verify-x-pgp-sig t]
              ["HZ" gnus-article-decode-HZ t]
-             ["OutlooK deuglify" gnus-article-outlook-deuglify-article t]
+             ("(Outlook) Deuglify"
+              ["Unwrap lines" gnus-outlook-unwrap-lines t]
+              ["Repair attribution" gnus-outlook-repair-attribution t]
+              ["Rearrange citation" gnus-outlook-rearrange-citation t]
+              ["Full (Outlook) deuglify"
+               gnus-article-outlook-deuglify-article t])
              )
             ("Output"
              ["Save in default format" gnus-summary-save-article
@@ -10715,7 +10738,8 @@ If REVERSE, save parts that do not match TYPE."
       (set-buffer gnus-article-buffer)
       (let ((handles (or gnus-article-mime-handles
                         (mm-dissect-buffer nil gnus-article-loose-mime)
-                        (mm-uu-dissect))))
+                        (and gnus-article-emulate-mime
+                             (mm-uu-dissect)))))
        (when handles
          (gnus-summary-save-parts-1 type dir handles reverse)
          (unless gnus-article-mime-handles ;; Don't destroy this case.
index e841449..bf9d624 100644 (file)
@@ -55,6 +55,7 @@
              (list 'const (car a)))
      imap-stream-alist)))
 
+;;;###autoload
 (defcustom mail-sources nil
   "*Where the mail backends will look for incoming mail.
 This variable is a list of mail source specifiers.