aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
authorDavid Aspinall2000-06-01 14:30:45 +0000
committerDavid Aspinall2000-06-01 14:30:45 +0000
commit2478ff4744592718bdc748cb29e6ef15fea943e6 (patch)
tree974d77b7ca215e752b1a940ce96619b8366f5521 /generic
parentb8aa85e6e5a027d44d53ce9e8a723a3cd660c016 (diff)
Allow two strings for boolean settings to handle non-uniformity in Coq
Diffstat (limited to 'generic')
-rw-r--r--generic/proof-menu.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/generic/proof-menu.el b/generic/proof-menu.el
index cada66b3..5337c486 100644
--- a/generic/proof-menu.el
+++ b/generic/proof-menu.el
@@ -480,11 +480,17 @@ Otherwise return a string for configuring all settings."
"Replace a format characters %b %i %s in STRING by formatted CURVALUE.
Formatting suitable for current proof assistant, controlled by
`proof-assistant-format-table' which see.
-Finally, apply `proof-assistant-setting-format' if non-nil."
- (let ((setting (proof-format proof-assistant-format-table string)))
- (if proof-assistant-setting-format
- (funcall proof-assistant-setting-format setting)
- setting)))
+Finally, apply `proof-assistant-setting-format' if non-nil.
+As a special case for boolean settings: the setting STRING
+can be a cons cell of two strings, the first one for true (non-nil
+value) and the second for false."
+ (if (consp string)
+ (if curvalue (car string) (cdr string))
+ ;; Otherwise must use % format characters
+ (let ((setting (proof-format proof-assistant-format-table string)))
+ (if proof-assistant-setting-format
+ (funcall proof-assistant-setting-format setting)
+ setting))))
(defvar proof-assistant-format-table
(list