From 1ebb05c430dfc6bd212eba02e2e2f5a5ef416daf Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 25 Feb 2003 06:19:36 +0000 Subject: [PATCH] (setenv): Fix previous change. --- lisp/ChangeLog | 4 ++++ lisp/env.el | 12 +++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b740adea8b8..a36a7cdf109 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2003-02-25 Kenichi Handa + + * env.el (setenv): Fix previous change. + 2003-02-25 Ramakrishnan M (tiny change) * language/mlm-util.el (mlm-char-glyph): Fix more rules. diff --git a/lisp/env.el b/lisp/env.el index 912634482bf..3fde25f5246 100644 --- a/lisp/env.el +++ b/lisp/env.el @@ -121,13 +121,11 @@ a side-effect." 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 -- 2.39.2