]> git.eshelyaron.com Git - emacs.git/commitdiff
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564
authorMiles Bader <miles@gnu.org>
Wed, 28 Sep 2005 05:26:02 +0000 (05:26 +0000)
committerMiles Bader <miles@gnu.org>
Wed, 28 Sep 2005 05:26:02 +0000 (05:26 +0000)
Merge from gnus--rel--5.10

Patches applied:

 * gnus--rel--5.10  (patch 125-127)

   - Merge from emacs--cvs-trunk--0
   - Update from CVS

2005-09-27  Reiner Steib  <Reiner.Steib@gmx.de>

   * lisp/gnus/mm-uu.el (mm-uu-emacs-sources-regexp): Make variable
   customizable.  Change default value.
   (mm-uu-diff-groups-regexp): Change default value.
   (mm-uu-type-alist): Added doc string.
   (mm-uu-configure): Added doc string.  Make it interactive.
   (mm-uu-diff-groups-regexp): Fix missing quotes from previous
   commit.

2005-09-27  Simon Josefsson  <jas@extundo.com>

   * lisp/gnus/message.el (message-idna-to-ascii-rhs-1): Reformat.

2005-09-27  Arne J\e,Ax\e(Brgensen  <arne@arnested.dk>

   * lisp/gnus/message.el (message-remove-duplicates): New function.
   Implementation borrowed from `gnus-remove-duplicates'.
   (message-idna-to-ascii-rhs): Also encode idna addresses in
   Reply-To:, Mail-Reply-To: and Mail-Followup-To:.
   (message-idna-to-ascii-rhs-1): When `message-use-idna' is 'ask
   only ask about the same idna domain once per header and also tell
   in what header to replace the idna domain.

   * lisp/gnus/gnus-art.el (article-decode-idna-rhs): Also decode idna
   addresses in Reply-To:, Mail-Reply-To: and Mail-Followup-To:.
   (article-decode-idna-rhs): Fix regexp so that all idna-address in
   a header is decoded and not just the last one.

2005-09-27  Katsumi Yamaoka  <yamaoka@jpl.org>

   * lisp/gnus/gnus-art.el (gnus-mime-display-single): Don't modify text if it
   has been decoded.

   * lisp/gnus/mm-decode.el (mm-insert-part): Don't modify text if it has been
   decoded.

   * lisp/gnus/mm-view.el (mm-inline-text): Don't strip text props unless
   decoding enriched or richtext parts.

2005-09-26  Katsumi Yamaoka  <yamaoka@jpl.org>

   * man/gnus.texi (Server Buffer Format): Document the %a format spec.

lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
lisp/gnus/message.el
lisp/gnus/mm-decode.el
lisp/gnus/mm-uu.el
lisp/gnus/mm-view.el
man/ChangeLog
man/gnus.texi

index 44675cdacd03c020272ea2e782a4207ce39fed57..333e831dccad18b999ef06ce5f08de7c7cfb0ee4 100644 (file)
@@ -1,3 +1,43 @@
+2005-09-27  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * mm-uu.el (mm-uu-emacs-sources-regexp): Make variable
+       customizable.  Change default value.
+       (mm-uu-diff-groups-regexp): Change default value.
+       (mm-uu-type-alist): Added doc string.
+       (mm-uu-configure): Added doc string.  Make it interactive.
+       (mm-uu-diff-groups-regexp): Fix missing quotes from previous
+       commit.
+
+2005-09-27  Simon Josefsson  <jas@extundo.com>
+
+       * message.el (message-idna-to-ascii-rhs-1): Reformat.
+
+2005-09-27  Arne J\e,Ax\e(Brgensen  <arne@arnested.dk>
+
+       * message.el (message-remove-duplicates): New function.
+       Implementation borrowed from `gnus-remove-duplicates'.
+       (message-idna-to-ascii-rhs): Also encode idna addresses in
+       Reply-To:, Mail-Reply-To: and Mail-Followup-To:.
+       (message-idna-to-ascii-rhs-1): When `message-use-idna' is 'ask
+       only ask about the same idna domain once per header and also tell
+       in what header to replace the idna domain.
+
+       * gnus-art.el (article-decode-idna-rhs): Also decode idna
+       addresses in Reply-To:, Mail-Reply-To: and Mail-Followup-To:.
+       (article-decode-idna-rhs): Fix regexp so that all idna-address in
+       a header is decoded and not just the last one.
+
+2005-09-27  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-mime-display-single): Don't modify text if it
+       has been decoded.
+
+       * mm-decode.el (mm-insert-part): Don't modify text if it has been
+       decoded.
+
+       * mm-view.el (mm-inline-text): Don't strip text props unless
+       decoding enriched or richtext parts.
+
 2005-09-25  Romain Francoise  <romain@orebokech.com>
 
        * gnus-agent.el (gnus-agent-expire-group, gnus-agent-expire):
index 4957d3ae98bdc5f6d1482d21f88dca45aa37e64c..249325a06f0f5ede620ae915b9ec3c25ec4a6eb7 100644 (file)
@@ -2333,20 +2333,22 @@ If PROMPT (the prefix), prompt for a coding system to use."
 (autoload 'idna-to-unicode "idna")
 
 (defun article-decode-idna-rhs ()
-  "Decode IDNA strings in RHS in From:, To: and Cc: headers in current buffer."
+  "Decode IDNA strings in RHS in various headers in current buffer.
+The following headers are decoded: From:, To:, Cc:, Reply-To:,
+Mail-Reply-To: and Mail-Followup-To:."
   (when gnus-use-idna
     (save-restriction
       (let ((inhibit-point-motion-hooks t)
            (inhibit-read-only t))
        (article-narrow-to-head)
        (goto-char (point-min))
-       (while (re-search-forward "@.*\\(xn--[-A-Za-z0-9.]*\\)[ \t\n\r,>]" nil t)
+       (while (re-search-forward "@[^ \t\n\r,>]*\\(xn--[-A-Za-z0-9.]*\\)[ \t\n\r,>]" nil t)
          (let (ace unicode)
            (when (save-match-data
                    (and (setq ace (match-string 1))
                         (save-excursion
                           (and (re-search-backward "^[^ \t]" nil t)
-                               (looking-at "From\\|To\\|Cc")))
+                               (looking-at "From\\|To\\|Cc\\|Reply-To\\|Mail-Reply-To\\|Mail-Followup-To")))
                         (setq unicode (idna-to-unicode ace))))
              (unless (string= ace unicode)
                (replace-match unicode nil nil nil 1)))))))))
@@ -4864,14 +4866,17 @@ If displaying \"text/html\" is discouraged \(see
              (forward-line -1)
              (setq beg (point)))
            (gnus-article-insert-newline)
-           (mm-insert-inline handle
-                             (let ((charset
-                                    (mail-content-type-get
-                                     (mm-handle-type handle) 'charset)))
-                               (if (eq charset 'gnus-decoded)
-                                   (mm-get-part handle)
-                                 (mm-decode-string (mm-get-part handle)
-                                                   charset))))
+           (mm-insert-inline
+            handle
+            (let ((charset (mail-content-type-get (mm-handle-type handle)
+                                                  'charset)))
+              (cond ((not charset)
+                     (mm-string-as-multibyte (mm-get-part handle)))
+                    ((eq charset 'gnus-decoded)
+                     (with-current-buffer (mm-handle-buffer handle)
+                       (buffer-string)))
+                    (t
+                     (mm-decode-string (mm-get-part handle) charset)))))
            (goto-char (point-max))))
          ;; Do highlighting.
          (save-excursion
index 55f07183753cca3b58ae2e27f9340a200b5090d6..0023b58892e2da7925a273b1fdbdb79c2e2adfe8 100644 (file)
@@ -2030,6 +2030,14 @@ With prefix-argument just set Follow-Up, don't cross-post."
 
 ;;; End of functions adopted from `message-utils.el'.
 
+(defun message-remove-duplicates (list)
+  (let (new)
+    (while list
+      (or (member (car list) new)
+         (setq new (cons (car list) new)))
+      (setq list (cdr list)))
+    (nreverse new)))
+
 (defun message-remove-header (header &optional is-regexp first reverse)
   "Remove HEADER in the narrowed buffer.
 If IS-REGEXP, HEADER is a regular expression.
@@ -4957,13 +4965,17 @@ subscribed address (and not the additional To and Cc header contents)."
   (let ((field (message-fetch-field header))
        rhs ace  address)
     (when field
-      (dolist (address (mail-header-parse-addresses field))
-       (setq address (car address)
-             rhs (downcase (or (cadr (split-string address "@")) ""))
-             ace (downcase (idna-to-ascii rhs)))
+      (dolist (rhs
+              (message-remove-duplicates
+               (mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) ""))
+                       (mapcar 'downcase
+                               (mapcar
+                                'car (mail-header-parse-addresses field))))))
+       (setq ace (downcase (idna-to-ascii rhs)))
        (when (and (not (equal rhs ace))
                   (or (not (eq message-use-idna 'ask))
-                      (y-or-n-p (format "Replace %s with %s? " rhs ace))))
+                      (y-or-n-p (format "Replace %s with %s in %s:? "
+                                        rhs ace header))))
          (goto-char (point-min))
          (while (re-search-forward (concat "^" header ":") nil t)
            (message-narrow-to-field)
@@ -4982,6 +4994,9 @@ See `message-idna-encode'."
        (message-narrow-to-head)
        (message-idna-to-ascii-rhs-1 "From")
        (message-idna-to-ascii-rhs-1 "To")
+       (message-idna-to-ascii-rhs-1 "Reply-To")
+       (message-idna-to-ascii-rhs-1 "Mail-Reply-To")
+       (message-idna-to-ascii-rhs-1 "Mail-Followup-To")
        (message-idna-to-ascii-rhs-1 "Cc")))))
 
 (defun message-generate-headers (headers)
index 435940faec28749a82730887b863cb32d2457220..76a6626858654a745056087205bb3546175e1b3c 100644 (file)
@@ -1058,9 +1058,15 @@ external if displayed external."
 (defun mm-insert-part (handle)
   "Insert the contents of HANDLE in the current buffer."
   (save-excursion
-    (insert (if (mm-multibyte-p)
-               (mm-string-as-multibyte (mm-get-part handle))
-             (mm-get-part handle)))))
+    (insert
+     (cond ((eq (mail-content-type-get (mm-handle-type handle) 'charset)
+               'gnus-decoded)
+           (with-current-buffer (mm-handle-buffer handle)
+             (buffer-string)))
+          ((mm-multibyte-p)
+           (mm-string-as-multibyte (mm-get-part handle)))
+          (t
+           (mm-get-part handle))))))
 
 (defun mm-file-name-delete-whitespace (file-name)
   "Remove all whitespace characters from FILE-NAME."
index fdb6b7f4585123ee30361a2d7b638d7eefb38e48..dd1519ddfeb1ad1d4be719b86f6aa87c60f55c5f 100644 (file)
@@ -77,11 +77,15 @@ decoder, such as hexbin."
   "The default disposition of uu parts.
 This can be either \"inline\" or \"attachment\".")
 
-(defvar mm-uu-emacs-sources-regexp "gnu\\.emacs\\.sources"
-  "The regexp of Emacs sources groups.")
+(defcustom mm-uu-emacs-sources-regexp "\\.emacs\\.sources"
+  "The regexp of Emacs sources groups."
+  :version "22.1"
+  :type 'regexp
+  :group 'gnus-article-mime)
 
-(defcustom mm-uu-diff-groups-regexp "gnus\\.commits"
-  "*Regexp matching diff groups."
+(defcustom mm-uu-diff-groups-regexp
+  "\\(gmane\\|gnu\\)\\..*\\(diff\\|commit\\|cvs\\|bug\\|devel\\)"
+  "Regexp matching diff groups."
   :version "22.1"
   :type 'regexp
   :group 'gnus-article-mime)
@@ -153,7 +157,12 @@ This can be either \"inline\" or \"attachment\".")
      nil
      mm-uu-diff-extract
      nil
-     mm-uu-diff-test)))
+     mm-uu-diff-test))
+  "A list of specifications for non-MIME attachments.
+Each element consist of the following entries: label,
+start-regexp, end-regexp, extract-function, test-function.
+
+After modifying this list you must run \\[mm-uu-configure].")
 
 (defcustom mm-uu-configure-list '((shar . disabled))
   "A list of mm-uu configuration.
@@ -202,6 +211,8 @@ Return that buffer."
   (member (cons key val) mm-uu-configure-list))
 
 (defun mm-uu-configure (&optional symbol value)
+  "Configure detection of non-MIME attachments."
+  (interactive)
   (if symbol (set-default symbol value))
   (setq mm-uu-beginning-regexp nil)
   (mapcar (lambda (entry)
index dec03bf0b9cc7b020d3f62d2df013f9a8b78e206..033548e3bed19f2af38b6cefddfadee82570f6c7 100644 (file)
        (goto-char (point-max))))
     (save-restriction
       (narrow-to-region b (point))
-      (set-text-properties (point-min) (point-max) nil)
       (when (or (equal type "enriched")
                (equal type "richtext"))
+       (set-text-properties (point-min) (point-max) nil)
        (ignore-errors
          (enriched-decode (point-min) (point-max))))
       (mm-handle-set-undisplayer
index fa28c055cf318093f111caafffe607345c40401b..dc98b9a58ef739a72157531efeb0d048e2668d2c 100644 (file)
@@ -1,3 +1,7 @@
+2005-09-26  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus.texi (Server Buffer Format): Document the %a format spec.
+
 2005-09-25  Richard M. Stallman  <rms@gnu.org>
 
        * search.texi (Regexp Search): Doc search-whitespace-regexp.
index c6b11716ba0845e0e4095cd76c83fc0b7421ddce..2a27a8e49c205166bd74493b6ccaee60ab070318 100644 (file)
@@ -12199,6 +12199,9 @@ Where the news is to be fetched from---the address.
 
 @item s
 The opened/closed/denied status of the server.
+
+@item a
+Whether this server is agentized.
 @end table
 
 @vindex gnus-server-mode-line-format