diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2002-07-01 00:28:50 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2002-07-01 00:28:50 +0000 |
commit | a17aef71ab2da5584baa70490aec75486e054dae (patch) | |
tree | 3639c0d448d2cb90320a8012d7fdcb9e1396ab73 /generic | |
parent | 562fe97c4e506cf7f748d58c0e877359c0623b3e (diff) |
Fix problem with GNU Emacs support: switch to multibyte in output buffers
Diffstat (limited to 'generic')
-rw-r--r-- | generic/proof-x-symbol.el | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/generic/proof-x-symbol.el b/generic/proof-x-symbol.el index e53dfd1a..fd42b4f9 100644 --- a/generic/proof-x-symbol.el +++ b/generic/proof-x-symbol.el @@ -304,10 +304,27 @@ Assumes that the current buffer is the proof shell buffer." ;;;###autoload (defun proof-x-symbol-configure () - "Configure the current buffer (goals or response) for X-Symbol." + "Configure the current output buffer (goals/response/trace) for X-Symbol." (if (proof-ass x-symbol-enable) (progn (proof-x-symbol-set-language) + ;; BEGIN: Code below from x-symbol.el/x-symbol-mode-internal + (unless (or (not (boundp 'enable-multibyte-characters)) + (not (fboundp 'set-buffer-multibyte)) + enable-multibyte-characters) + ;; Emacs: we need to convert the buffer from unibyte to multibyte + ;; since we'll use multibyte support for the symbol charset. + ;; TODO: try to do it less often + (let ((modified (buffer-modified-p)) + (inhibit-read-only t) + (inhibit-modification-hooks t)) + (unwind-protect + (progn + (decode-coding-region (point-min) (point-max) 'undecided) + (set-buffer-multibyte t)) + (set-buffer-modified-p modified)))) + ;; END code from x-symbol.el/x-symbol-mode-internal + ;; If we're turning on x-symbol, attempt to convert to ;; characters. (Only works if the buffer already ;; contains tokens!) |