From 2478ff4744592718bdc748cb29e6ef15fea943e6 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Thu, 1 Jun 2000 14:30:45 +0000 Subject: Allow two strings for boolean settings to handle non-uniformity in Coq --- generic/proof-menu.el | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'generic') 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 -- cgit v1.2.3