changeset 49977:f491c5cee974

(setenv): Fix previous change.
author Kenichi Handa <handa@m17n.org>
date Tue, 25 Feb 2003 06:19:21 +0000
parents bd3e068b492a
children 1687b79d54e7
files lisp/env.el
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/env.el	Tue Feb 25 06:00:40 2003 +0000
+++ b/lisp/env.el	Tue Feb 25 06:19:21 2003 +0000
@@ -121,13 +121,11 @@
 	     nil
 	     t))))
   (if (and (multibyte-string-p variable) locale-coding-system)
-      (unless (memq (coding-system-base locale-coding-system)
-		    (find-coding-systems-string (concat variable value)))
-	(error "Can't encode `%s=%s' with `locale-coding-system'"
-	       variable (or value "")))
-    (unless (memq 'undecided (find-coding-systems-string variable))
-      (error "Can't encode `%s=%s' with unspecified `locale-coding-system'"
-	     variable (or value ""))))
+      (let ((codings (find-coding-systems-string (concat variable value))))
+	(unless (or (eq 'undecided (car codings))
+		    (memq (coding-system-base locale-coding-system) codings))
+	  (error "Can't encode `%s=%s' with `locale-coding-system'"
+		 variable (or value "")))))
   (if unset 
       (setq value nil)
     (if substitute-env-vars