X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=ew-unit.el;h=e7808539c401c488fd5d8500ac4d971128d68e51;hb=99c158b34f006c5840785347fc7e711a6b246c0c;hp=569c1acf32bbc88287d91b396fc88cf8e0c9bb08;hpb=5fb11b58b6a6c8ebabf0cee2c30b92293b056a23;p=elisp%2Fflim.git diff --git a/ew-unit.el b/ew-unit.el index 569c1ac..e780853 100644 --- a/ew-unit.el +++ b/ew-unit.el @@ -25,13 +25,16 @@ bdec cdec bcheck tmp) - (if (and (setq bdec (ew-byte-decoder encoding)) - (setq cdec (ew-char-decoder charset))) - (if (or (null (setq bcheck (ew-byte-checker encoding))) - (funcall bcheck encoding encoded-text)) - (ew-quote (closure-call cdec (funcall bdec encoded-text))) - (ew-quote str)) - (ew-quote-eword charset encoding encoded-text))) + (if (or ew-permit-null-encoded-text + (< 0 (length encoded-text))) + (if (and (setq bdec (ew-byte-decoder encoding)) + (setq cdec (ew-char-decoder charset))) + (if (or (null (setq bcheck (ew-byte-checker encoding))) + (funcall bcheck encoding encoded-text)) + (ew-quote (closure-call cdec (funcall bdec encoded-text))) + (ew-quote str)) + (ew-quote-eword charset encoding encoded-text)) + (ew-quote str))) (ew-quote str))) (defun ew-byte-decoder (encoding)