aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
authorThomas Kleymann1998-12-08 17:29:29 +0000
committerThomas Kleymann1998-12-08 17:29:29 +0000
commit51ad1cdadcd31150760e8564b7539f210f98f287 (patch)
treef5dac7eb42642254ff193d07c7ac100a4f1dc549 /generic
parentba9f173363d704eb4ebca3c3a4ebc9403efbedf1 (diff)
o special characters are no longer displayed in (16Bit) FSF GNU Emacs
20.3 o however, there is still a mysterious bug in 'proof-shell-analyse-structure' when processing lego/example.l
Diffstat (limited to 'generic')
-rw-r--r--generic/proof-shell.el21
1 files changed, 19 insertions, 2 deletions
diff --git a/generic/proof-shell.el b/generic/proof-shell.el
index 478fa103..1da9f236 100644
--- a/generic/proof-shell.el
+++ b/generic/proof-shell.el
@@ -231,7 +231,18 @@ Does nothing if proof assistant is already running."
"-response*")))
(save-excursion
(set-buffer proof-shell-buffer)
- (funcall proof-mode-for-shell)
+
+ ;; Disable 16 Bit
+ ;; We noticed that for LEGO, it otherwise converts annotations
+ ;; to characters with (non-ASCII) code around 3000 which screws
+ ;; up our conventions that annotations lie between 128 and
+ ;; 256. We only observed the problem with FSF GNU Emacs 20.3 at
+ ;; present.
+ (and (fboundp 'toggle-enable-multibyte-characters)
+ (toggle-enable-multibyte-characters -1))
+
+
+ (funcall proof-mode-for-shell)
;; Check to see that the process is still going.
;; Otherwise the sentinel will have killed off the
;; other buffers and there's no point initialising
@@ -241,6 +252,9 @@ Does nothing if proof assistant is already running."
(set-buffer proof-response-buffer)
(funcall proof-mode-for-response)
(set-buffer proof-goals-buffer)
+ (and (fboundp 'toggle-enable-multibyte-characters)
+ (toggle-enable-multibyte-characters -1))
+
(funcall proof-mode-for-pbp))
(switch-to-buffer proof-shell-buffer)
(error "%s process exited!" proc)))
@@ -546,7 +560,10 @@ This is a list of tuples of the form (type . string). type is either
(incf ap)
(incf ip))
(setq stack (cons op (cons (substring ann 0 ap) stack))))
- ((= c proof-shell-field-char)
+ ((and (consp stack) (= c proof-shell-field-char))
+ ;; (consp stack) has been added to make the code more robust.
+ ;; In fact, this condition is violated when using
+ ;; lego/example.l and FSF GNU Emacs 20.3
(setq span (make-span (car stack) op))
(set-span-property span 'mouse-face 'highlight)
(set-span-property span 'proof (car (cdr stack)))