]> git.eshelyaron.com Git - emacs.git/commitdiff
Synch with Gnus trunk.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 7 May 2010 06:58:17 +0000 (06:58 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 7 May 2010 06:58:17 +0000 (06:58 +0000)
* mail/binhex.el (binhex-decode-region-internal)
* mail/uudecode.el (uudecode-decode-region-internal)
* net/dns.el (dns-read-string-name, dns-write, dns-read)
(dns-read-type, dns-query)
* pgg-parse.el (pgg-parse-armor)
* pgg.el (pgg-verify-region)
* sha1.el (sha1-string-external): Don't run set-buffer-multibyte for
XEmacs.

* net/imap.el (imap-disable-multibyte): Redefine them as a macro.

* nnweb.el (nnweb-gmane-search)
* yenc.el (yenc-decode-region): Don't run set-buffer-multibyte for
XEmacs.

* gnus-art.el (gnus-article-browse-html-parts)
* gnus-group.el (gnus-read-ephemeral-gmane-group)
(gnus-read-ephemeral-bug-grou): Use mm-make-temp-file instead of
make-temp-file.

* gnus-dired.el (gnus-dired-mode): Bind gnus-dired-mode-hook,
gnus-dired-mode-on-hook and gnus-dired-mode-off-hook for XEmacs when
compiling.

* gnus-ml.el (gnus-mailing-list-mode): Bind gnus-mailing-list-mode-hook,
gnus-mailing-list-mode-on-hook and gnus-mailing-list-mode-off-hook for
XEmacs when compiling.

* gnus-salt.el (gnus-pick-mode): Bind gnus-pick-mode-on-hook and
gnus-pick-mode-off-hook for XEmacs when compiling.
(gnus-binary-mode): Bind gnus-binary-mode-on-hook and
gnus-binary-mode-off-hook for XEmacs when compiling.

* gnus-sum.el (gnus-summary-limit-strange-charsets-predicate): Return
nil if char-charset is not available.

* sieve-manage.el (sieve-manage-disable-multibyte): Redefine them as a
macro.

* mm-url.el (mm-url-form-encode-xwfu): Use mm-encode-coding-string
instead of encode-coding-string.

* mm-util.el (mm-enable-multibyte, mm-disable-multibyte): Use (featurep
'xemacs) instead of mm-emacs-mule to switch function definitions.
(mm-with-unibyte-current-buffer): Make it a progn macro for XEmacs.

20 files changed:
lisp/ChangeLog
lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
lisp/gnus/gnus-dired.el
lisp/gnus/gnus-group.el
lisp/gnus/gnus-ml.el
lisp/gnus/gnus-salt.el
lisp/gnus/gnus-sum.el
lisp/gnus/mm-url.el
lisp/gnus/mm-util.el
lisp/gnus/nnweb.el
lisp/gnus/sieve-manage.el
lisp/gnus/yenc.el
lisp/mail/binhex.el
lisp/mail/uudecode.el
lisp/net/dns.el
lisp/net/imap.el
lisp/pgg-parse.el
lisp/pgg.el
lisp/sha1.el

index a7343b2d1b4c6bcc115c57388f73fda98813aca0..a99797e5ed8d17ccc05f4b42e1f64dd6de3dabc6 100644 (file)
@@ -1,3 +1,16 @@
+2010-05-07  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mail/binhex.el (binhex-decode-region-internal)
+       * mail/uudecode.el (uudecode-decode-region-internal)
+       * net/dns.el (dns-read-string-name, dns-write, dns-read)
+       (dns-read-type, dns-query)
+       * pgg-parse.el (pgg-parse-armor)
+       * pgg.el (pgg-verify-region)
+       * sha1.el (sha1-string-external): Don't run set-buffer-multibyte for
+       XEmacs.
+
+       * net/imap.el (imap-disable-multibyte): Redefine them as a macro.
+
 2010-05-07  Juanma Barranquero  <lekktu@gmail.com>
 
        * progmodes/cperl-mode.el (cperl-mode-unload-function): New function.
index 3a4a502679dbfd19a2d696481c7362e5cbb50bb4..5516a8c81c8630d2c551bec76a94c0e2a5df9ca1 100644 (file)
@@ -1,3 +1,40 @@
+2010-05-07  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * nnweb.el (nnweb-gmane-search)
+       * yenc.el (yenc-decode-region): Don't run set-buffer-multibyte for
+       XEmacs.
+
+       * gnus-art.el (gnus-article-browse-html-parts)
+       * gnus-group.el (gnus-read-ephemeral-gmane-group)
+       (gnus-read-ephemeral-bug-grou): Use mm-make-temp-file instead of
+       make-temp-file.
+
+       * gnus-dired.el (gnus-dired-mode): Bind gnus-dired-mode-hook,
+       gnus-dired-mode-on-hook and gnus-dired-mode-off-hook for XEmacs when
+       compiling.
+
+       * gnus-ml.el (gnus-mailing-list-mode): Bind gnus-mailing-list-mode-hook,
+       gnus-mailing-list-mode-on-hook and gnus-mailing-list-mode-off-hook for
+       XEmacs when compiling.
+
+       * gnus-salt.el (gnus-pick-mode): Bind gnus-pick-mode-on-hook and
+       gnus-pick-mode-off-hook for XEmacs when compiling.
+       (gnus-binary-mode): Bind gnus-binary-mode-on-hook and
+       gnus-binary-mode-off-hook for XEmacs when compiling.
+
+       * gnus-sum.el (gnus-summary-limit-strange-charsets-predicate): Return
+       nil if char-charset is not available.
+
+       * sieve-manage.el (sieve-manage-disable-multibyte): Redefine them as a
+       macro.
+
+       * mm-url.el (mm-url-form-encode-xwfu): Use mm-encode-coding-string
+       instead of encode-coding-string.
+
+       * mm-util.el (mm-enable-multibyte, mm-disable-multibyte): Use (featurep
+       'xemacs) instead of mm-emacs-mule to switch function definitions.
+       (mm-with-unibyte-current-buffer): Make it a progn macro for XEmacs.
+
 2010-05-06  Tommi Vainikainen  <thv@iki.fi>  (tiny change)
 
        * mml-sec.el (mml-secure-message-sign): Fix cut and paste error.
index 8b9d8b69ff4f8309afce3776de3440ed5893ff9f..7ce3a4374d1bbf97f25f5a654ce5375913313240 100644 (file)
@@ -2897,7 +2897,7 @@ message header will be added to the bodies of the \"text/html\" parts."
 <img[\t\n ]+\\(?:[^\t\n >]+[\t\n ]+\\)*src=\"\\(cid:\\([^\"]+\\)\\)\""
                                           nil t)
                   (unless cid-dir
-                    (setq cid-dir (make-temp-file "cid" t))
+                    (setq cid-dir (mm-make-temp-file "cid" t))
                     (add-to-list 'gnus-article-browse-html-temp-list cid-dir))
                   (setq file nil
                         content nil)
index 4874de1925a90aabd7a3dc26eb12594d058b8ff7..e5c886d86726b12ef8eab7a5f8b76cf266683da6 100644 (file)
@@ -87,6 +87,12 @@ See `mail-user-agent' for more information."
                               gnus-user-agent)
                (function :tag "Other")))
 
+(eval-when-compile
+  (when (featurep 'xemacs)
+    (defvar gnus-dired-mode-hook)
+    (defvar gnus-dired-mode-on-hook)
+    (defvar gnus-dired-mode-off-hook)))
+
 (define-minor-mode gnus-dired-mode
   "Minor mode for intersections of gnus and dired.
 
index 6d3b80e4f8827433a6cbb939b6ea89ee5fd4217e..7a887735fe286b63628fbc1c457ebc37d66739cc 100644 (file)
@@ -2364,7 +2364,7 @@ specified by `gnus-gmane-group-download-format'."
   (unless range (setq range 500))
   (when (< range 1)
     (error "Invalid range: %s" range))
-  (let ((tmpfile (make-temp-file
+  (let ((tmpfile (mm-make-temp-file
                  (format "%s.start-%s.range-%s." group start range)))
        (gnus-thread-sort-functions '(gnus-thread-sort-by-number)))
     (with-temp-file tmpfile
@@ -2445,7 +2445,7 @@ the bug number, and browsing the URL must return mbox output."
                     (cdr (assoc 'emacs gnus-bug-group-download-format-alist))))
   (when (stringp number)
     (setq number (string-to-number number)))
-  (let ((tmpfile (make-temp-file "gnus-temp-group-")))
+  (let ((tmpfile (mm-make-temp-file "gnus-temp-group-")))
     (with-temp-file tmpfile
       (url-insert-file-contents (format mbox-url number))
       (write-region (point-min) (point-max) tmpfile)
index 3a5b8deb45f5f2e7b84b18b565b650cc285bb2b5..30c1bfedcefd8b3231eebd2f50ba23f27b2d3e22 100644 (file)
@@ -85,6 +85,12 @@ If FORCE is non-nil, replace the old ones."
          (gnus-mailing-list-mode 1))
       (gnus-message 1 "no list-post in this message."))))
 
+(eval-when-compile
+  (when (featurep 'xemacs)
+    (defvar gnus-mailing-list-mode-hook)
+    (defvar gnus-mailing-list-mode-on-hook)
+    (defvar gnus-mailing-list-mode-off-hook)))
+
 ;;;###autoload
 (define-minor-mode gnus-mailing-list-mode
   "Minor mode for providing mailing-list commands.
index 21c556ad33f853168cb36e7de3647c6dddb0d770..52f307d7fddb5084bc91c2776364a2f768e87717 100644 (file)
@@ -101,6 +101,11 @@ It accepts the same format specs that `gnus-summary-line-format' does."
        ["Start reading" gnus-pick-start-reading t]
        ["Switch pick mode off" gnus-pick-mode gnus-pick-mode]))))
 
+(eval-when-compile
+  (when (featurep 'xemacs)
+    (defvar gnus-pick-mode-on-hook)
+    (defvar gnus-pick-mode-off-hook)))
+
 (define-minor-mode gnus-pick-mode
   "Minor mode for providing a pick-and-read interface in Gnus summary buffers.
 
@@ -332,6 +337,11 @@ This must be bound to a button-down mouse event."
       '("Pick"
        ["Switch binary mode off" gnus-binary-mode t]))))
 
+(eval-when-compile
+  (when (featurep 'xemacs)
+    (defvar gnus-binary-mode-on-hook)
+    (defvar gnus-binary-mode-off-hook)))
+
 (define-minor-mode gnus-binary-mode
   "Minor mode for providing a binary group interface in Gnus summary buffers."
   :lighter " Binary" :keymap gnus-binary-mode-map
index 5939f9b6e7e96ed10bac9377bd73bae5817c6b01..480c546ca6e7d12ed84e4fcd4f69cde5dfcc1632 100644 (file)
@@ -8185,14 +8185,15 @@ in `nnmail-extra-headers'."
       (gnus-summary-position-point))))
 
 (defun gnus-summary-limit-strange-charsets-predicate (header)
-  (let ((string (concat (mail-header-subject header)
-                       (mail-header-from header)))
-       charset found)
-    (dotimes (i (1- (length string)))
-      (setq charset (format "%s" (char-charset (aref string (1+ i)))))
-      (when (string-match "unicode\\|big\\|japanese" charset)
-       (setq found t)))
-    found))
+  (when (fboundp 'char-charset)
+    (let ((string (concat (mail-header-subject header)
+                         (mail-header-from header)))
+         charset found)
+      (dotimes (i (1- (length string)))
+       (setq charset (format "%s" (char-charset (aref string (1+ i)))))
+       (when (string-match "unicode\\|big\\|japanese" charset)
+         (setq found t)))
+      found)))
 
 (defun gnus-summary-limit-to-predicate (predicate)
   "Limit to articles where PREDICATE returns non-nil.
index 35a43f5bd273634fa29a9588488f14cd67fe994a..c5a8d9f7fdcff15cb4ae24cfe523ba0185051824 100644 (file)
@@ -404,14 +404,10 @@ spaces.  Die Die Die."
       ((= char ?  ) "+")
       ((memq char mm-url-unreserved-chars) (char-to-string char))
       (t (upcase (format "%%%02x" char)))))
-   ;; Fixme: Should this actually be accepting multibyte?  Is there a
-   ;; better way in XEmacs?
-   (if (featurep 'mule)
-       (encode-coding-string chunk
-                            (if (fboundp 'find-coding-systems-string)
-                                (car (find-coding-systems-string chunk))
-                                buffer-file-coding-system))
-     chunk)
+   (mm-encode-coding-string chunk
+                           (if (fboundp 'find-coding-systems-string)
+                               (car (find-coding-systems-string chunk))
+                             buffer-file-coding-system))
    ""))
 
 (defun mm-url-encode-www-form-urlencoded (pairs)
index c1dc4f5b7542926aa692e6d5de2e62da307d757c..a288b8b1b6d873ee6ce238bb207c9929192d344f 100644 (file)
@@ -908,20 +908,20 @@ mail with multiple parts is preferred to sending a Unicode one.")
                             (fboundp 'set-buffer-multibyte))
     "True in Emacs with Mule.")
 
-  (if mm-emacs-mule
-      (defun mm-enable-multibyte ()
-       "Set the multibyte flag of the current buffer.
+  (if (featurep 'xemacs)
+      (defalias 'mm-enable-multibyte 'ignore)
+    (defun mm-enable-multibyte ()
+      "Set the multibyte flag of the current buffer.
 Only do this if the default value of `enable-multibyte-characters' is
 non-nil.  This is a no-op in XEmacs."
-       (set-buffer-multibyte 'to))
-    (defalias 'mm-enable-multibyte 'ignore))
+      (set-buffer-multibyte t)))
 
-  (if mm-emacs-mule
-      (defun mm-disable-multibyte ()
-       "Unset the multibyte flag of in the current buffer.
+  (if (featurep 'xemacs)
+      (defalias 'mm-disable-multibyte 'ignore)
+    (defun mm-disable-multibyte ()
+      "Unset the multibyte flag of in the current buffer.
 This is a no-op in XEmacs."
-       (set-buffer-multibyte nil))
-    (defalias 'mm-disable-multibyte 'ignore)))
+      (set-buffer-multibyte nil))))
 
 (defun mm-preferred-coding-system (charset)
   ;; A typo in some Emacs versions.
@@ -1239,22 +1239,24 @@ worth using this macro in unibyte buffers of course).  Use of
 harmful since it is likely to modify existing data in the buffer.
 For instance, it converts \"\\300\\255\" into \"\\255\" in
 Emacs 23 (unicode)."
-  ;; FIXME: (default-value 'enable-multibyte-characters) is read-only
-  ;; so let-binding it is wrong.  The right fix is to not use this
-  ;; macro at all any more, since it's been ill-defined from the start.
-  (let ((multibyte (make-symbol "multibyte"))
-       (buffer (make-symbol "buffer")))
-    `(if mm-emacs-mule
-        (let ((,multibyte enable-multibyte-characters)
-              (,buffer (current-buffer)))
-          (unwind-protect
-              (letf (((default-value 'enable-multibyte-characters) nil))
-                (set-buffer-multibyte nil)
-                ,@forms)
-            (set-buffer ,buffer)
-            (set-buffer-multibyte ,multibyte)))
-       (letf (((default-value 'enable-multibyte-characters) nil))
-        ,@forms))))
+  (if (featurep 'xemacs)
+      `(progn ,@forms)
+    ;; FIXME: (default-value 'enable-multibyte-characters) is read-only
+    ;; so let-binding it is wrong.  The right fix is to not use this
+    ;; macro at all any more, since it's been ill-defined from the start.
+    (let ((multibyte (make-symbol "multibyte"))
+         (buffer (make-symbol "buffer")))
+      `(if mm-emacs-mule
+          (let ((,multibyte enable-multibyte-characters)
+                (,buffer (current-buffer)))
+            (unwind-protect
+                (letf (((default-value 'enable-multibyte-characters) nil))
+                      (set-buffer-multibyte nil)
+                      ,@forms)
+              (set-buffer ,buffer)
+              (set-buffer-multibyte ,multibyte)))
+        (letf (((default-value 'enable-multibyte-characters) nil))
+              ,@forms)))))
 (put 'mm-with-unibyte-current-buffer 'lisp-indent-function 0)
 (put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body))
 
index b6b0ddd41a9dd44e9cdf39e30a9f24f080fbadfc..fcb8e93a05d5e8102b0f8ee1cbd831ed67de0b65 100644 (file)
@@ -525,7 +525,7 @@ Valid types include `google', `dejanews', and `gmane'.")
        ;;("TOPDOC" . "1000")
        ))))
   (setq buffer-file-name nil)
-  (set-buffer-multibyte t)
+  (unless (featurep 'xemacs) (set-buffer-multibyte t))
   (mm-decode-coding-region (point-min) (point-max) 'utf-8)
   t)
 
index 4b78490bbe314ffc657cf77d2b3172e160a07473..bd8741fe85fce95d428bda9548911bfce671dbd2 100644 (file)
@@ -191,10 +191,10 @@ Valid states are `closed', `initial', `nonauth', and `auth'.")
 
 ;; Internal utility functions
 
-(defsubst sieve-manage-disable-multibyte ()
+(defmacro sieve-manage-disable-multibyte ()
   "Enable multibyte in the current buffer."
-  (when (fboundp 'set-buffer-multibyte)
-    (set-buffer-multibyte nil)))
+  (unless (featurep 'xemacs)
+    '(set-buffer-multibyte nil)))
 
 (declare-function password-read         "password-cache" (prompt &optional key))
 (declare-function password-cache-add    "password-cache" (key password))
index 8cb522c4ec707a4a4b3d3c45c56a430e8de1e90e..2d56d660583943e69f182297d861d7fbaf068592 100644 (file)
@@ -89,9 +89,9 @@
              (when (re-search-forward "^=yend.*$" end t)
                (setq last (match-beginning 0))
                (setq footer-alist (yenc-parse-line (match-string 0)))
-                (with-current-buffer
-                    (setq work-buffer (generate-new-buffer " *yenc-work*"))
-                  (set-buffer-multibyte nil))
+               (setq work-buffer (generate-new-buffer " *yenc-work*"))
+               (unless (featurep 'xemacs)
+                 (with-current-buffer work-buffer (set-buffer-multibyte nil)))
                (while (< first last)
                  (setq char (char-after first))
                  (cond ((or (eq char ?\r)
index e131db76af88a51e78fef44dd52d939e1767919d..4d80d0213993e0b886c1860e00682ed63d6c6899 100644 (file)
@@ -221,7 +221,8 @@ If HEADER-ONLY is non-nil only decode header and return filename."
          (goto-char start)
          (when (re-search-forward binhex-begin-line end t)
             (setq work-buffer (generate-new-buffer " *binhex-work*"))
-            (with-current-buffer work-buffer (set-buffer-multibyte nil))
+           (unless (featurep 'xemacs)
+             (with-current-buffer work-buffer (set-buffer-multibyte nil)))
            (beginning-of-line)
            (setq bits 0 counter 0)
            (while tmp
index 335e1e10c473141cb9e84d8f2787f8d26198dd85..b1c2a7be41d5d661416c7f17d047e71a8816890b 100644 (file)
@@ -216,7 +216,7 @@ If FILE-NAME is non-nil, save the result to FILE-NAME."
          (skip-chars-forward non-data-chars end))
        (if file-name
             (with-temp-file file-name
-              (set-buffer-multibyte nil)
+              (unless (featurep 'xemacs) (set-buffer-multibyte nil))
               (insert (apply 'concat (nreverse result))))
          (or (markerp end) (setq end (set-marker (make-marker) end)))
          (goto-char start)
index 17973cfd94ffb1ab7b226501efd823ac3097393a..d3717371927d910df43861494e0a5d79f2eafefa 100644 (file)
@@ -101,7 +101,7 @@ If nil, /etc/resolv.conf and nslookup will be consulted.")
 
 (defun dns-read-string-name (string buffer)
   (with-temp-buffer
-    (set-buffer-multibyte nil)
+    (unless (featurep 'xemacs) (set-buffer-multibyte nil))
     (insert string)
     (goto-char (point-min))
     (dns-read-name buffer)))
@@ -135,7 +135,7 @@ If nil, /etc/resolv.conf and nslookup will be consulted.")
   "Write a DNS packet according to SPEC.
 If TCP-P, the first two bytes of the package with be the length field."
   (with-temp-buffer
-    (set-buffer-multibyte nil)
+    (unless (featurep 'xemacs) (set-buffer-multibyte nil))
     (dns-write-bytes (dns-get 'id spec) 2)
     (dns-write-bytes
      (logior
@@ -186,7 +186,7 @@ If TCP-P, the first two bytes of the package with be the length field."
 
 (defun dns-read (packet)
   (with-temp-buffer
-    (set-buffer-multibyte nil)
+    (unless (featurep 'xemacs) (set-buffer-multibyte nil))
     (let ((spec nil)
           queries answers authorities additionals)
       (insert packet)
@@ -263,7 +263,7 @@ If TCP-P, the first two bytes of the package with be the length field."
        (point (point)))
     (prog1
         (with-temp-buffer
-          (set-buffer-multibyte nil)
+         (unless (featurep 'xemacs) (set-buffer-multibyte nil))
           (insert string)
           (goto-char (point-min))
           (cond
@@ -391,7 +391,7 @@ If REVERSEP, look up an IP address."
   (if (not dns-servers)
       (message "No DNS server configuration found")
     (with-temp-buffer
-      (set-buffer-multibyte nil)
+      (unless (featurep 'xemacs) (set-buffer-multibyte nil))
       (let ((process (condition-case ()
                          (dns-make-network-process (car dns-servers))
                        (error
index a47822533e568840a292fc8fe95d8840eae33106..9f1afc53ada80b26485533872bbd58119e63062f 100644 (file)
@@ -475,10 +475,10 @@ sure of changing the value of `foo'."
       (setcdr alist (imap-remassoc key (cdr alist)))
       alist)))
 
-(defsubst imap-disable-multibyte ()
+(defmacro imap-disable-multibyte ()
   "Enable multibyte in the current buffer."
-  (when (fboundp 'set-buffer-multibyte)
-    (set-buffer-multibyte nil)))
+  (unless (featurep 'xemacs)
+    '(set-buffer-multibyte nil)))
 
 (defsubst imap-utf7-encode (string)
   (if imap-use-utf7
index b0f2a815cbdff97b31790af5a36954a225c50a4d..40df20bde34c5841648fa218547ac007961b9e89 100644 (file)
 (defun pgg-parse-armor (string)
   (with-temp-buffer
     (buffer-disable-undo)
-    (if (fboundp 'set-buffer-multibyte)
-       (set-buffer-multibyte nil))
+    (unless (featurep 'xemacs)
+      (set-buffer-multibyte nil))
     (insert string)
     (pgg-decode-armor-region (point-min)(point))))
 
index 7364d3782ac2b8e63ecd515749d4268efe873ac6..8209dc1608f518bdc73a3985e7180a3e1a4cefb3 100644 (file)
@@ -475,8 +475,8 @@ signer's public key from `pgg-default-keyserver-address'."
          (if (null signature) nil
            (with-temp-buffer
              (buffer-disable-undo)
-             (if (fboundp 'set-buffer-multibyte)
-                 (set-buffer-multibyte nil))
+             (unless (featurep 'xemacs)
+               (set-buffer-multibyte nil))
              (insert-file-contents signature)
              (cdr (assq 2 (pgg-decode-armor-region
                            (point-min)(point-max)))))))
index 1db7a2835f4339ec22a670859cc30b679f36438c..351af62783e0f6a3dc768c6119d1d2f9032f69c0 100644 (file)
@@ -95,7 +95,7 @@ If this variable is set to nil, use internal function only."
       (setq prog sha1-program
            args nil))
     (with-temp-buffer
-      (set-buffer-multibyte nil)
+      (unless (featurep 'xemacs) (set-buffer-multibyte nil))
       (insert string)
       (apply (function call-process-region)
             (point-min) (point-max)