aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2008-01-28 20:09:01 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2008-01-28 20:09:01 +0000
commite069c5537812431fb268395c339ec5b3b9f8b814 (patch)
tree76e1f9b99b13543316bedf877e9e4301d8a74dd9
parent52287bde38b57d16a51b640d9f8202a6b176bc16 (diff)
Fix to proof-x-symbol-enable: only engage when indeed being turned on.
-rw-r--r--generic/proof-x-symbol.el23
1 files changed, 10 insertions, 13 deletions
diff --git a/generic/proof-x-symbol.el b/generic/proof-x-symbol.el
index 951b4cc2..8c9df4f0 100644
--- a/generic/proof-x-symbol.el
+++ b/generic/proof-x-symbol.el
@@ -167,19 +167,16 @@ This invokes `x-symbol-mode' to toggle the setting for the current
buffer, and then sets PG's option for default to match.
Also we arrange to have X-Symbol mode turn itself on automatically
in future if we have just activated it for this buffer."
- (if (proof-ass-sym x-symbol-enable)
- ;; We're trying to initialise it
- (if (not proof-x-symbol-initialized) ;; Check inited
- (progn
- (set (proof-ass-sym x-symbol-enable) nil) ; assume failure!
- (proof-x-symbol-initialize 'giveerrors)
- (set (proof-ass-sym x-symbol-enable) t))))
-
- (if proof-x-symbol-initialized
- (if (fboundp 'x-symbol-mode)
- (progn
- (x-symbol-mode)
- (proof-x-symbol-mode-associated-buffers)))))
+ (when (proof-ass x-symbol-enable)
+ (unless proof-x-symbol-initialized ;; Check inited
+ (set (proof-ass-sym x-symbol-enable) nil) ; assume failure!
+ (proof-x-symbol-initialize 'giveerrors)
+ (set (proof-ass-sym x-symbol-enable) t))
+
+ (when (and proof-x-symbol-initialized
+ (fboundp 'x-symbol-mode))
+ (x-symbol-mode)
+ (proof-x-symbol-mode-associated-buffers))))
;; Old behaviour for proof-x-symbol-enable was to update state in all
;; buffers --- but this can take ages if there are many buffers!