* elmo-util.el (elmo-quoted-specials-list): New constant.
[elisp/wanderlust.git] / elmo / elmo-util.el
index 2d96da1..e3768c1 100644 (file)
@@ -181,7 +181,7 @@ File content is decoded with MIME-CHARSET."
       nil
     (with-temp-buffer
       (insert-file-contents-as-binary filename)
-      (let ((coding-system (or (elmo-set-auto-coding filename)
+      (let ((coding-system (or (elmo-set-auto-coding)
                               (mime-charset-to-coding-system
                                mime-charset))))
        (when coding-system
@@ -1450,6 +1450,13 @@ ELT must be a string.  Upper-case and lower-case letters are treated as equal."
       newtext)))
 
 ;;; Folder parser utils.
+(defconst elmo-quoted-specials-list '(?\\ ?\"))
+
+(defun elmo-quoted-token (string)
+  (concat "\""
+         (std11-wrap-as-quoted-pairs string elmo-quoted-specials-list)
+         "\""))
+
 (defun elmo-parse-token (string &optional seps)
   "Parse atom from STRING using SEPS as a string of separator char list."
   (let ((len (length string))