* wl-draft.el (wl-draft-reply): Use set-buffer-multibyte instead
authorhmurata <hmurata>
Sat, 22 May 2004 10:36:47 +0000 (10:36 +0000)
committerhmurata <hmurata>
Sat, 22 May 2004 10:36:47 +0000 (10:36 +0000)
of elmo-set-buffer-multibyte.

* wl-message.el (wl-original-message-mode): Ditto.

* wl-score.el (wl-score-insert-header): Ditto.

* wl-summary.el
(wl-summary-edit-addresses-collect-candidate-fields): Ditto.
(wl-summary-goto-folder-subr): Ditto.
(wl-summary-insert-headers): Ditto.

* wl-util.el (wl-set-string-width): Ditto.

* bbdb-wl.el (bbdb-wl-get-addresses-1): Use set-buffer-multibyte
instead of elmo-set-buffer-multibyte.
(bbdb-wl-get-addresses-2): Ditto.
(bbdb-wl-update-records): Ditto.
(bbdb-extract-field-value): Ditto.

* elmo-util.el (elmo-set-buffer-multibyte): Abolish.
(elmo-set-work-buf): Use set-buffer-multibyte instead of
elmo-set-buffer-multibyte.
(elmo-object-load): Ditto.
(elmo-save-buffer): Ditto.
(elmo-delete-char): Ditto.
(elmo-file-field-primitive-condition-match): Ditto.
(elmo-mime-string): Ditto.

* elmo-archive.el (elmo-archive-msgdb-create-entity-subr): Ditto.
(elmo-archive-field-condition-match): Ditto.

* elmo-imap4.el (elmo-imap4-setup-send-buffer): Ditto.

* elmo-net.el (elmo-network-initialize-session-buffer): Ditto.

* elmo-nntp.el (elmo-nntp-parse-overview-string): Ditto.
(elmo-nntp-msgdb-create-message): Ditto.

* elmo-pop3.el (elmo-pop3-msgdb-create-message): Ditto.

* elmo.el (elmo-message-match-condition): Ditto.
(elmo-message-match-condition): Ditto.

* modb-entity.el (elmo-msgdb-create-message-entity-from-buffer):
Ditto.

* elmo-util.el (elmo-decoded-field-body): New function.

17 files changed:
elmo/ChangeLog
elmo/elmo-archive.el
elmo/elmo-imap4.el
elmo/elmo-net.el
elmo/elmo-nntp.el
elmo/elmo-pop3.el
elmo/elmo-util.el
elmo/elmo.el
elmo/modb-entity.el
utils/ChangeLog
utils/bbdb-wl.el
wl/ChangeLog
wl/wl-draft.el
wl/wl-message.el
wl/wl-score.el
wl/wl-summary.el
wl/wl-util.el

index 756d8b6..0e31277 100644 (file)
@@ -1,5 +1,32 @@
 2004-05-22  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
+       * elmo-util.el (elmo-set-buffer-multibyte): Abolish.
+       (elmo-set-work-buf): Use set-buffer-multibyte instead of
+       elmo-set-buffer-multibyte.
+       (elmo-object-load): Ditto.
+       (elmo-save-buffer): Ditto.
+       (elmo-delete-char): Ditto.
+       (elmo-file-field-primitive-condition-match): Ditto.
+       (elmo-mime-string): Ditto.
+
+       * elmo-archive.el (elmo-archive-msgdb-create-entity-subr): Ditto.
+       (elmo-archive-field-condition-match): Ditto.
+
+       * elmo-imap4.el (elmo-imap4-setup-send-buffer): Ditto.
+
+       * elmo-net.el (elmo-network-initialize-session-buffer): Ditto.
+
+       * elmo-nntp.el (elmo-nntp-parse-overview-string): Ditto.
+       (elmo-nntp-msgdb-create-message): Ditto.
+
+       * elmo-pop3.el (elmo-pop3-msgdb-create-message): Ditto.
+
+       * elmo.el (elmo-message-match-condition): Ditto.
+       (elmo-message-match-condition): Ditto.
+
+       * modb-entity.el (elmo-msgdb-create-message-entity-from-buffer):
+       Ditto.
+
        * elmo-version.el (elmo-version): Up to 2.11.29.
 
        * elmo-spam.el (elmo-spam-scheme): Add `header' as a candidate.
index 1b908d2..b48c24f 100644 (file)
@@ -900,7 +900,7 @@ TYPE specifies the archiver's symbol."
 
 (defsubst elmo-archive-msgdb-create-entity-subr (msgdb number)
   (let (header-end)
-    (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+    (set-buffer-multibyte default-enable-multibyte-characters)
     (goto-char (point-min))
     (if (re-search-forward "\\(^--.*$\\)\\|\\(\n\n\\)" nil t)
        (setq header-end (point))
@@ -1062,7 +1062,7 @@ TYPE specifies the archiver's symbol."
        (when (file-exists-p arc)
         (as-binary-process
          (elmo-archive-call-method method args t))
-        (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+        (set-buffer-multibyte default-enable-multibyte-characters)
         (decode-mime-charset-region (point-min)(point-max) elmo-mime-charset)
         (elmo-buffer-field-condition-match condition number number-list))))))
 
index e1b7e39..0690bda 100644 (file)
@@ -1093,7 +1093,7 @@ If CHOP-LENGTH is not specified, message set is not chopped."
       (save-match-data
        (set-buffer send-buf)
        (erase-buffer)
-       (elmo-set-buffer-multibyte nil)
+       (set-buffer-multibyte nil)
        (if string
            (insert string)
          (with-current-buffer source-buf
index 6d04129..dbda705 100644 (file)
@@ -88,7 +88,7 @@
   elmo-network-initialize-session-buffer ((session
                                           elmo-network-session) buffer)
   (with-current-buffer buffer
-    (elmo-set-buffer-multibyte nil)
+    (set-buffer-multibyte nil)
     (buffer-disable-undo (current-buffer))))
 
 (luna-define-method elmo-network-close-session ((session elmo-network-session))
index 9ecdbd0..689a08d 100644 (file)
@@ -925,7 +925,7 @@ Don't cache if nil.")
          ret-list ret-val beg)
       (set-buffer tmp-buffer)
       (erase-buffer)
-      (elmo-set-buffer-multibyte nil)
+      (set-buffer-multibyte nil)
       (insert string)
       (goto-char (point-min))
       (setq beg (point))
@@ -1378,7 +1378,7 @@ Returns a list of cons cells like (NUMBER . VALUE)"
   (save-excursion
     (let ((new-msgdb (elmo-make-msgdb))
          beg entity i num message-id)
-      (elmo-set-buffer-multibyte nil)
+      (set-buffer-multibyte nil)
       (goto-char (point-min))
       (setq i 0)
       (message "Creating msgdb...")
index afc7cbd..e06fe44 100644 (file)
@@ -759,7 +759,7 @@ If IF-EXISTS is `any-exists', get BIFF session or normal session if exists."
     (let ((new-msgdb (elmo-make-msgdb))
          beg entity i number message-id flags)
       (set-buffer buffer)
-      (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+      (set-buffer-multibyte default-enable-multibyte-characters)
       (goto-char (point-min))
       (setq i 0)
       (message "Creating msgdb...")
index bf6e891..ed74f45 100644 (file)
 (eval-and-compile
   (autoload 'md5 "md5"))
 
-(defmacro elmo-set-buffer-multibyte (flag)
-  "Set the multibyte flag of the current buffer to FLAG."
-  (cond ((boundp 'MULE)
-        (list 'setq 'mc-flag flag))
-       ((featurep 'xemacs)
-        flag)
-       ((and (boundp 'emacs-major-version) (>= emacs-major-version 20))
-        (list 'set-buffer-multibyte flag))
-       (t
-        flag)))
-
 (defvar elmo-work-buf-name " *elmo work*")
 (defvar elmo-temp-buf-name " *elmo temp*")
 
@@ -83,7 +72,7 @@
   "Execute BODY on work buffer.  Work buffer remains."
   (` (save-excursion
        (set-buffer (get-buffer-create elmo-work-buf-name))
-       (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+       (set-buffer-multibyte default-enable-multibyte-characters)
        (erase-buffer)
        (,@ body))))
 
@@ -101,7 +90,7 @@ File content is decoded with MIME-CHARSET."
        (as-binary-input-file
        (insert-file-contents filename))
        (when mime-charset
-        (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+        (set-buffer-multibyte default-enable-multibyte-characters)
         (decode-mime-charset-region (point-min) (point-max) mime-charset))
        (condition-case nil
           (read (current-buffer))
@@ -123,7 +112,7 @@ File content is encoded with MIME-CHARSET."
     (if (file-writable-p filename)
        (progn
          (when mime-charset
-;;;        (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+;;;        (set-buffer-multibyte default-enable-multibyte-characters)
            (encode-mime-charset-region (point-min) (point-max) mime-charset))
          (as-binary-output-file
           (write-region (point-min) (point-max) filename nil 'no-msg)))
@@ -304,7 +293,7 @@ Return value is a cons cell of (STRUCTURE . REST)"
     (elmo-set-work-buf
      (let ((coding-system-for-read 'no-conversion)
           (coding-system-for-write 'no-conversion))
-       (if unibyte (elmo-set-buffer-multibyte nil))
+       (if unibyte (set-buffer-multibyte nil))
        (insert string)
        (goto-char (point-min))
        (while (search-forward (char-to-string char) nil t)
@@ -942,7 +931,7 @@ the directory becomes empty after deletion."
      (t
       (elmo-set-work-buf
        (as-binary-input-file (insert-file-contents file))
-       (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+       (set-buffer-multibyte default-enable-multibyte-characters)
        ;; Should consider charset?
        (decode-mime-charset-region (point-min)(point-max) elmo-mime-charset)
        (setq result
@@ -1009,13 +998,13 @@ Emacs 19.28 or earlier does not have `unintern'."
   "Normalize MIME encoded STRING."
   (and string
        (elmo-set-work-buf
-       (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+       (set-buffer-multibyte default-enable-multibyte-characters)
        (setq string
              (encode-mime-charset-string
               (eword-decode-and-unfold-unstructured-field-body
                string)
               elmo-mime-charset))
-       (elmo-set-buffer-multibyte nil)
+       (set-buffer-multibyte nil)
        string)))
 
 (defsubst elmo-collect-field (beg end downcase-field-name)
index d974213..39eb047 100644 (file)
@@ -800,7 +800,7 @@ Return a cons cell of (NUMBER-CROSSPOSTS . NEW-FLAG-ALIST).")
                     cache-path))))
     (when (and filename (file-readable-p filename))
       (with-temp-buffer
-       (elmo-set-buffer-multibyte nil)
+       (set-buffer-multibyte nil)
        ;;(insert-file-contents-as-binary filename)
        (elmo-message-fetch folder number
                            (elmo-make-fetch-strategy 'entire
@@ -808,7 +808,7 @@ Return a cons cell of (NUMBER-CROSSPOSTS . NEW-FLAG-ALIST).")
                                                      nil
                                                      cache-path)
                            nil (current-buffer) t)
-       (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+       (set-buffer-multibyte default-enable-multibyte-characters)
        (decode-coding-region (point-min) (point-max)
                              elmo-mime-display-as-is-coding-system)
        (elmo-buffer-field-condition-match condition number numbers)))))
index 1487154..b0a52d6 100644 (file)
@@ -206,7 +206,7 @@ Header region is supposed to be narrowed.")
        extra field-body charset size)
     (save-excursion
       (setq entity (modb-legacy-make-message-entity args))
-      (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+      (set-buffer-multibyte default-enable-multibyte-characters)
       (setq message-id (elmo-msgdb-get-message-id-from-buffer))
       (and (setq charset (cdr (assoc "charset" (mime-read-Content-Type))))
           (setq charset (intern-soft charset))
index 09714d0..08846e0 100644 (file)
@@ -1,3 +1,11 @@
+2004-05-22  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * bbdb-wl.el (bbdb-wl-get-addresses-1): Use set-buffer-multibyte
+       instead of elmo-set-buffer-multibyte.
+       (bbdb-wl-get-addresses-2): Ditto.
+       (bbdb-wl-update-records): Ditto.
+       (bbdb-extract-field-value): Ditto.
+
 2004-05-08  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
        * rfc2368.el: Sync with cvs version of emacs.
index b40e4c2..bd5140e 100644 (file)
@@ -182,7 +182,7 @@ For BBDB 2.33 or earlier."
              (setq fn (std11-full-name-string structure)
                    fn (and fn
                            (with-temp-buffer ; to keep raw buffer unibyte.
-                             (elmo-set-buffer-multibyte
+                             (set-buffer-multibyte
                               default-enable-multibyte-characters)
                              (eword-decode-string
                               (decode-mime-charset-string
@@ -227,7 +227,7 @@ For BBDB 2.34 or later."
                 (setq fn (std11-full-name-string structure)
                      fn (and fn
                              (with-temp-buffer ; to keep raw buffer unibyte.
-                               (elmo-set-buffer-multibyte
+                               (set-buffer-multibyte
                                 default-enable-multibyte-characters)
                                (eword-decode-string
                                 (decode-mime-charset-string
@@ -303,7 +303,7 @@ the user confirms the creation."
                          (string-match (bbdb-user-mail-names) addr))
                      (setq from (or (std11-field-body "To") from)))
                  (with-temp-buffer ; to keep raw buffer unibyte.
-                   (elmo-set-buffer-multibyte
+                   (set-buffer-multibyte
                     default-enable-multibyte-characters)
                    (setq from (eword-decode-string
                                (decode-mime-charset-string
@@ -478,7 +478,7 @@ displaying the record corresponding to the sender of the current message."
     (defun bbdb-extract-field-value (field)
       (let ((value (bbdb-wl-extract-field-value-internal field)))
        (with-temp-buffer ; to keep raw buffer unibyte.
-         (elmo-set-buffer-multibyte
+         (set-buffer-multibyte
           default-enable-multibyte-characters)
          (and value
               (eword-decode-string value)))))
index 5124215..f55575f 100644 (file)
@@ -1,5 +1,19 @@
 2004-05-22  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
+       * wl-draft.el (wl-draft-reply): Use set-buffer-multibyte instead
+       of elmo-set-buffer-multibyte.
+
+       * wl-message.el (wl-original-message-mode): Ditto.
+
+       * wl-score.el (wl-score-insert-header): Ditto.
+
+       * wl-summary.el
+       (wl-summary-edit-addresses-collect-candidate-fields): Ditto.
+       (wl-summary-goto-folder-subr): Ditto.
+       (wl-summary-insert-headers): Ditto.
+
+       * wl-util.el (wl-set-string-width): Ditto.
+
        * Version number is increased to 2.11.29.
 
 2004-05-20  Yoichi NAKAYAMA  <yoichi@geiin.org>
index 3d53e37..56e2050 100644 (file)
@@ -368,7 +368,7 @@ Reply to author if WITH-ARG is non-nil."
     (setq to (wl-parse-addresses to)
          cc (wl-parse-addresses cc))
     (with-temp-buffer                  ; to keep raw buffer unibyte.
-      (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+      (set-buffer-multibyte default-enable-multibyte-characters)
       (setq decoder (mime-find-field-decoder 'Subject 'plain))
       (setq subject (if (and subject decoder)
                        (funcall decoder subject) subject))
@@ -405,7 +405,7 @@ Reply to author if WITH-ARG is non-nil."
            (wl-draft-make-mail-followup-to (append to cc)))
       (setq mail-followup-to (wl-delete-duplicates mail-followup-to nil t)))
     (with-temp-buffer                  ; to keep raw buffer unibyte.
-      (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+      (set-buffer-multibyte default-enable-multibyte-characters)
       (setq newsgroups (wl-parse newsgroups
                                 "[ \t\f\r\n,]*\\([^ \t\f\r\n,]+\\)")
            newsgroups (wl-delete-duplicates newsgroups)
index 582f08f..a97fdc2 100644 (file)
@@ -118,7 +118,7 @@ With association ((\"folder\" message \"message-id\") . cache-buffer).")
   "A major mode for original message buffer."
   (setq major-mode 'wl-original-message-mode)
   (setq buffer-read-only t)
-  (elmo-set-buffer-multibyte nil)
+  (set-buffer-multibyte nil)
   (setq mode-name "Wanderlust original message"))
 
 (defun wl-original-message-buffer-get (name)
index bb465c3..1457489 100644 (file)
@@ -558,7 +558,7 @@ Set `wl-score-cache' nil."
       (make-local-variable 'wl-score-alike-hashtb)
       (setq wl-score-alike-hashtb (elmo-make-hash (* (length messages) 2)))
       (when mime-decode
-       (elmo-set-buffer-multibyte default-enable-multibyte-characters))
+       (set-buffer-multibyte default-enable-multibyte-characters))
       (let (art last this alike)
        (while (setq art (pop messages))
          (setq this (wl-score-ov-entity-get (car art)
index c79f5c9..8f0e651 100644 (file)
@@ -1273,7 +1273,7 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'."
       (setq fields (cdr fields)))
     (setq candidates (elmo-uniq-list candidates))
     (elmo-set-work-buf
-     (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+     (set-buffer-multibyte default-enable-multibyte-characters)
      (mapcar (function
              (lambda (x)
                (setq components (std11-extract-address-components x))
@@ -2354,7 +2354,7 @@ If ARG, without confirm."
                       (view (expand-file-name wl-summary-view-file dir)))
                  (when (file-exists-p cache)
                    (insert-file-contents-as-binary cache)
-                   (elmo-set-buffer-multibyte
+                   (set-buffer-multibyte
                     default-enable-multibyte-characters)
                    (decode-mime-charset-region
                     (point-min)(point-max)
@@ -2568,7 +2568,7 @@ If ARG, without confirm."
     (make-local-variable 'wl-summary-alike-hashtb)
     (setq wl-summary-alike-hashtb (elmo-make-hash (* (length numbers) 2)))
     (when mime-decode
-      (elmo-set-buffer-multibyte default-enable-multibyte-characters))
+      (set-buffer-multibyte default-enable-multibyte-characters))
     (while (setq ov (elmo-message-entity folder (pop numbers)))
       (setq this (funcall func ov))
       (and this (setq this (std11-unfold-string this)))
index 69f2cf0..654c8f0 100644 (file)
@@ -207,7 +207,7 @@ even when invalid character is contained."
          (concat string paddings)))))
    (t
     (elmo-set-work-buf
-     (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+     (set-buffer-multibyte default-enable-multibyte-characters)
      (insert string)
      (when (> (current-column) (abs width))
        (when (> (move-to-column (abs width)) (abs width))