From 11e276a622f206ff7b319068ccd7d5880fa8bf52 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Fri, 26 May 2006 14:05:05 +0000 Subject: Add back 'raw-text setting, now LANG settings aren't taking effect again [me: XEmacs 21.4.19 on FC5] --- generic/proof-shell.el | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'generic/proof-shell.el') diff --git a/generic/proof-shell.el b/generic/proof-shell.el index d0ecc038..4123be42 100644 --- a/generic/proof-shell.el +++ b/generic/proof-shell.el @@ -319,25 +319,33 @@ Does nothing if proof assistant is already running." (replace-in-string (getenv "LANG") "\\.UTF-8" "")) "LANG=C") - process-environment)))) + (delete + (concat "LANG=" (getenv "LANG")) + process-environment))))) ;; Since we use codes between 128 and 255 as special, we want to ;; treat the output of the process as binary, except for ;; end-of-line conversion (hence `raw-text'). ;; It is also the only sensible choice since we make the buffer ;; unibyte below. + ;; Update: there are problems here with systems where + ;; i) coding-system-for-read/write is not available (e.g. MacOS XEmacs non-mule) + ;; ii) 'rawtext gives wrong behaviour anyway (e.g. Mac OS GNU Emacs, maybe Windows) + ;; probably because of line-feed conversion. (coding-system-for-read - (if proof-shell-unicode 'utf-8 - ;; was: 'raw-text - ;; da: Unfortunately 'raw-text causes hangs with some Emacs, - ;; since we get something not as raw as it was otherwise; - ;; so leave it as it is, please - (if (boundp 'coding-system-for-read) coding-system-for-read))) - (coding-system-for-write - (if proof-shell-unicode 'utf-8 - ;; was: 'raw-text - (if (boundp 'coding-system-for-write) coding-system-for-write)))) - + (if proof-shell-unicode + 'utf-8 + (if (string-match "Linux" + (shell-command-to-string "uname")) + ;; raw-text seems to be useful/needed here. Overrides + ;; LANG mess above in some circumstances, it seems. + 'raw-text + (if (boundp 'coding-system-for-read) + coding-system-for-read)))) + + (coding-system-for-write + coding-system-for-read)) + ;; An improvement here might be to catch failure of ;; make-comint and then kill off the buffer. Then we ;; could add back code above for multiple shells <2> <3>, etc. -- cgit v1.2.3