changeset: 4650:38e8af61f38dcf558615694e65f7fb85c289c81b
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Feb 11 12:14:28 2009 +0000
files: lisp/ChangeLog lisp/process.el
description:
Check if env vars are encodable by native coding system, #'setenv
2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
* process.el (setenv):
Check whether the environment variable and value can be encoded by
the native coding system, error if not, as does GNU Emacs (but our
implementation is different).
diff -r 33b8c874b2c86c5ae027cbf2a784ead324a73e56 -r
38e8af61f38dcf558615694e65f7fb85c289c81b lisp/ChangeLog
--- a/lisp/ChangeLog Wed Feb 11 12:11:26 2009 +0000
+++ b/lisp/ChangeLog Wed Feb 11 12:14:28 2009 +0000
@@ -1,3 +1,10 @@ 2009-02-11 Aidan Kehoe <kehoea@parhasa
+2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * process.el (setenv):
+ Check whether the environment variable and value can be encoded by
+ the native coding system, error if not, as does GNU Emacs (but our
+ implementation is different).
+
2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
* coding.el (query-coding-string):
diff -r 33b8c874b2c86c5ae027cbf2a784ead324a73e56 -r
38e8af61f38dcf558615694e65f7fb85c289c81b lisp/process.el
--- a/lisp/process.el Wed Feb 11 12:11:26 2009 +0000
+++ b/lisp/process.el Wed Feb 11 12:14:28 2009 +0000
@@ -599,17 +599,10 @@ a side-effect."
(if substitute-env-vars
(setq value (substitute-env-vars value))))
- ;; GNU fuck around with coding systems here. We do it at a much lower
- ;; level; an equivalent of the following code of Handa's would be
- ;; worthwhile here, though:
-
-; (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 "")))))
-
- ;; But then right now our find-coding-systems analogue is in packages.
+ ;; XEmacs change: check whether the environment understands this variable,
+ ;; using our function for exactly that, don't use
+ ;; #'find-coding-systems-string or trust `undecided' to encode it.
+ (query-coding-string (concat variable "=" value) 'native nil t)
(if (string-match "=" variable)
(error "Environment variable name `%s' contains `='" variable)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches