From: teranisi Date: Thu, 11 Oct 2001 01:01:08 +0000 (+0000) Subject: * wl-message.el (wl-message-display-internal): Bind `default-mime-charset'. X-Git-Tag: wl-2_7_6~27 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d8a9c0e8f6060e9a3a83885ea9107dc8787591df;p=elisp%2Fwanderlust.git * wl-message.el (wl-message-display-internal): Bind `default-mime-charset'. * wl-fldmgr.el (wl-fldmgr-make-group): Check folder name error. * wl-draft.el (wl-draft-reply): Decode newsgroup field. * elmo.el (elmo-make-folder): Add folder name error check. * elmo-nntp.el (elmo-nntp-group-coding-system): New variable. (elmo-nntp-encode-group-string): New inline function. (elmo-nntp-decode-group-string): Ditto. (elmo-folder-initialize): Use elmo-nntp-encode-group-string. (elmo-nntp-folder-list-subfolders): Set processing buffer as unibyte; Use `not' instead of `null'; Use elmo-nntp-decode-group-string. * elmo-imap4.el (elmo-folder-list-subfolders): Don't append delimiter. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 447d9ef..2500ca6 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,17 @@ 2001-10-11 Yuuichi Teranishi + * elmo.el (elmo-make-folder): Add folder name error check. + + * elmo-nntp.el (elmo-nntp-group-coding-system): New variable. + (elmo-nntp-encode-group-string): New inline function. + (elmo-nntp-decode-group-string): Ditto. + (elmo-folder-initialize): Use elmo-nntp-encode-group-string. + (elmo-nntp-folder-list-subfolders): Set processing buffer as unibyte; + Use `not' instead of `null'; + Use elmo-nntp-decode-group-string. + + * elmo-imap4.el (elmo-folder-list-subfolders): Don't append delimiter. + * elmo-version.el (elmo-version): Up to 2.7.5. 2001-10-10 Hiroya Murata diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 22f3c1e..6215b53 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -1872,13 +1872,13 @@ Return nil if no complete line has arrived." elmo-imap4-default-hierarchy-delimiter)) result append-serv type) ;; Append delimiter - (if (and root - (not (string= root "")) - (not (string-match (concat "\\(.*\\)" - (regexp-quote delim) - "\\'") - root))) - (setq root (concat root delim))) +;; (if (and root +;; (not (string= root "")) +;; (not (string-match (concat "\\(.*\\)" +;; (regexp-quote delim) +;; "\\'") +;; root))) +;; (setq root (concat root delim))) (setq result (elmo-imap4-response-get-selectable-mailbox-list (elmo-imap4-send-command-wait session diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index e8be352..f6e6035 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -51,6 +51,19 @@ "Non-nil means max number of msgdb is set as the max number of `list active'. (Needed for inn 2.3 or later?).") +(defvar elmo-nntp-group-coding-system nil + "A coding system for newsgroup string.") + +(defsubst elmo-nntp-encode-group-string (string) + (if elmo-nntp-group-coding-system + (encode-coding-string string elmo-nntp-group-coding-system) + string)) + +(defsubst elmo-nntp-decode-group-string (string) + (if elmo-nntp-group-coding-system + (decode-coding-string string elmo-nntp-group-coding-system) + string)) + ;;; ELMO NNTP folder (eval-and-compile (luna-define-class elmo-nntp-folder (elmo-net-folder) @@ -73,7 +86,8 @@ (elmo-nntp-folder-set-group-internal folder (if (match-beginning 1) - (elmo-match-string 1 name))) + (elmo-nntp-encode-group-string + (elmo-match-string 1 name)))) ;; Setup slots for elmo-net-folder (elmo-net-folder-set-user-internal folder (if (match-beginning 2) @@ -430,6 +444,7 @@ Don't cache if nil.") (let ((session (elmo-nntp-get-session folder)) response ret-val top-ng append-serv use-list-active start) (with-temp-buffer + (set-buffer-multibyte nil) (if (and (elmo-nntp-folder-group-internal folder) (elmo-nntp-select-group session @@ -444,8 +459,8 @@ Don't cache if nil.") session (concat "list" (if (and (elmo-nntp-folder-group-internal folder) - (null (string= (elmo-nntp-folder-group-internal - folder) ""))) + (not (string= (elmo-nntp-folder-group-internal + folder) ""))) (concat " active" (format " %s.*" (elmo-nntp-folder-group-internal folder) @@ -542,14 +557,14 @@ Don't cache if nil.") (elmo-net-folder-stream-type-internal folder))))) (mapcar '(lambda (fld) (if (consp fld) - (list (concat "-" (car fld) + (list (concat "-" (elmo-nntp-decode-group-string (car fld)) (and (elmo-net-folder-user-internal folder) (concat ":" (elmo-net-folder-user-internal folder))) (and append-serv (concat append-serv)))) - (concat "-" fld + (concat "-" (elmo-nntp-decode-group-string fld) (and (elmo-net-folder-user-internal folder) (concat ":" (elmo-net-folder-user-internal folder))) diff --git a/elmo/elmo.el b/elmo/elmo.el index 26a3875..b059bd2 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -133,7 +133,9 @@ If optional argument NON-PERSISTENT is non-nil, folder is treated as (setq prefix (substring name 0 1)) (setq name (substring name 1))) (setq type (intern (car (setq split (split-string name ":"))))) - (setq name (substring name (+ 1 (length (car split))))) + (if (> (length split) 2) + (setq name (substring name (+ 1 (length (car split))))) + (error "Error in folder name `%s'" original)) (setq prefix (concat (car split) ":"))) (setq class (format "elmo-%s" (symbol-name type))) (require (intern class)) diff --git a/wl/ChangeLog b/wl/ChangeLog index 8b5ec70..c5d9025 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,12 @@ 2001-10-11 Yuuichi Teranishi + * wl-message.el (wl-message-display-internal): Bind + `default-mime-charset'. + + * wl-fldmgr.el (wl-fldmgr-make-group): Check folder name error. + + * wl-draft.el (wl-draft-reply): Decode newsgroup field. + * Version number is increased to 2.7.5. 2001-10-10 Hiroya Murata diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 28399c1..10e3729 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -355,10 +355,18 @@ Reply to author if WITH-ARG is non-nil." (setq mail-followup-to (wl-draft-make-mail-followup-to (append to cc))) (setq mail-followup-to (wl-delete-duplicates mail-followup-to nil t))) - (setq newsgroups (wl-parse newsgroups - "[ \t\f\r\n,]*\\([^ \t\f\r\n,]+\\)") - newsgroups (wl-delete-duplicates newsgroups) - newsgroups (if newsgroups (mapconcat 'identity newsgroups ","))) + (with-temp-buffer ; to keep raw buffer unibyte. + (elmo-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) + newsgroups + (if newsgroups + (mapconcat + (lambda (grp) + (setq decoder (mime-find-field-decoder 'Newsgroups 'plain)) + (if decoder (funcall decoder grp) grp)) + newsgroups ",")))) (setq to (wl-delete-duplicates to nil t)) (setq cc (wl-delete-duplicates (append (wl-delete-duplicates cc nil t) diff --git a/wl/wl-fldmgr.el b/wl/wl-fldmgr.el index fc4277f..5197378 100644 --- a/wl/wl-fldmgr.el +++ b/wl/wl-fldmgr.el @@ -938,6 +938,8 @@ return value is diffs '(-new -unread -all)." (wl-fldmgr-read-string (read-from-minibuffer (if access "Access Type Group: " "Group: "))))) + ;; To check the folder name is correct. + (elmo-make-folder group) (when (or access (string-match "[\t ]*/$" group)) (setq group (if access group (substring group 0 (match-beginning 0)))) diff --git a/wl/wl-message.el b/wl/wl-message.el index d722547..b003f36 100644 --- a/wl/wl-message.el +++ b/wl/wl-message.el @@ -506,7 +506,8 @@ Returns non-nil if bottom of message." (defun wl-message-display-internal (folder number flag &optional force-reload unread) - (let ((elmo-message-fetch-threshold wl-fetch-confirm-threshold)) + (let ((elmo-message-fetch-threshold wl-fetch-confirm-threshold) + (default-mime-charset wl-mime-charset)) (setq wl-message-buffer-all-header-flag (eq flag 'all-header)) (prog1 (if (eq flag 'as-is)