aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2009-08-13 08:16:07 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2009-08-13 08:16:07 +0000
commitb96c86304499a4b4d764ee31647fab1b60869828 (patch)
treee276775d0addbc69102d24d490a39db723b6198f /generic
parent5e20f42b2ffa0afce849df725b0f8e6aff3fc36b (diff)
Add menu setting to set proof-strict-read-only to 'retract
Diffstat (limited to 'generic')
-rw-r--r--generic/proof-menu.el14
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/proof-menu.el b/generic/proof-menu.el
index c3ef32d8..e65819ae 100644
--- a/generic/proof-menu.el
+++ b/generic/proof-menu.el
@@ -274,6 +274,12 @@ without adjusting window layout."
(proof-ass-sym maths-menu-enable) 'proof-maths-menu-toggle)
(proof-deftoggle-fn (proof-ass-sym mmm-enable) 'proof-mmm-toggle))
+(defun proof-retract-on-edit-toggle ()
+ (interactive)
+ (customize-set-variable
+ 'proof-strict-read-only
+ (if (eq proof-strict-read-only 'retract)
+ nil 'retract)))
(defun proof-keep-response-history ()
"Enable associated buffer histories following `proof-keep-response-history'."
@@ -306,8 +312,14 @@ without adjusting window layout."
["Strict Read Only" proof-strict-read-only-toggle
:style toggle
- :selected proof-strict-read-only
+ :selected (eq proof-strict-read-only t)
+ :active (not (eq proof-strict-read-only 'retract))
:help "Do not allow editing in processed region"]
+ ["Retract On Edit" proof-retract-on-edit-toggle
+ :style toggle
+ :selected (eq proof-strict-read-only 'retract)
+ :active (not (eq proof-strict-read-only t))
+ :help "Automaticall retract on edit in processed region"]
["Unicode Tokens"
(proof-unicode-tokens-toggle (if (boundp 'unicode-tokens-mode)