diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2009-05-27 08:34:31 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2009-05-27 08:34:31 +0000 |
commit | 21e826b7cc3076364d72f6d4e453d4ffffed0982 (patch) | |
tree | 2a7e021047d29b756857c5b10b013609bbb5f690 /generic | |
parent | e3016def0716977cb6a147c6b852e474eb1d69d1 (diff) |
Cleanup more Emacs compatibility
Diffstat (limited to 'generic')
-rw-r--r-- | generic/proof-shell.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/generic/proof-shell.el b/generic/proof-shell.el index 43ca29d9..51bb15d1 100644 --- a/generic/proof-shell.el +++ b/generic/proof-shell.el @@ -265,20 +265,25 @@ Does nothing if proof assistant is already running." ;; 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 can give wrong behaviour anyway ;; (e.g. Mac OS GNU Emacs, maybe Windows) ;; probably because of line-feed conversion. + ;; + ;; Update: much more info now in Elisp manual and recommendations + ;; for sub processes. (normal-coding-system-for-read (and (boundp 'coding-system-for-read) coding-system-for-read)) (coding-system-for-read (if proof-shell-unicode - (if (find-coding-system 'utf-8) - 'utf-8 - normal-coding-system-for-read) + (or (condition-case nil + (check-coding-system 'utf-8) + (error nil)) + normal-coding-system-for-read) (if (string-match "Linux" (shell-command-to-string "uname")) |