fixed.
[elisp/flim.git] / eword-decode.el
index c8a4a0f..4663610 100644 (file)
@@ -644,17 +644,24 @@ be the result."
              ))))
 
 (defun eword-lexical-analyze-internal (string must-unfold)
-  (let (dest ret)
+  (let ((last 'eword-analyze-spaces)
+        dest ret)
     (while (not (string-equal string ""))
       (setq ret
-           (let ((rest eword-lexical-analyzers)
-                 func r)
-             (while (and (setq func (car rest))
-                         (null (setq r (funcall func string must-unfold)))
-                         )
-               (setq rest (cdr rest)))
-             (or r `((error . ,string) . ""))
-             ))
+            (let ((rest eword-lexical-analyzers)
+                  func r)
+              (while (and (setq func (car rest))
+                          (or
+                           (and
+                            (not eword-decode-sticked-encoded-word)
+                            (not (eq last 'eword-analyze-spaces))
+                            (eq func 'eword-analyze-encoded-word))
+                           (null (setq r (funcall func string must-unfold))))
+                          )
+                (setq rest (cdr rest)))
+              (setq last func)
+              (or r `((error . ,string) . ""))
+              ))
       (setq dest (cons (car ret) dest))
       (setq string (cdr ret))
       )