aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic/proof-shell.el
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2006-05-26 14:05:05 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2006-05-26 14:05:05 +0000
commit11e276a622f206ff7b319068ccd7d5880fa8bf52 (patch)
tree90adda5d634445b602f051a2b3343cf50eda8952 /generic/proof-shell.el
parentf5c8956c86825382245dce8039e07e93f4887270 (diff)
Add back 'raw-text setting, now LANG settings aren't taking effect again [me: XEmacs 21.4.19 on FC5]
Diffstat (limited to 'generic/proof-shell.el')
-rw-r--r--generic/proof-shell.el32
1 files changed, 20 insertions, 12 deletions
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.