aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic/proof-menu.el
diff options
context:
space:
mode:
authorGravatar Stefan Monnier <monnier@iro.umontreal.ca>2018-12-20 14:47:33 -0500
committerGravatar Stefan Monnier <monnier@iro.umontreal.ca>2018-12-25 14:48:54 -0500
commit7389d43893569ff0e1eff892254901876fc8225e (patch)
treeaff068ef99924c1170a14f876b3fe745dadf2301 /generic/proof-menu.el
parentf7cc8f1f76baf5e517e51f1db47510ed605064e8 (diff)
Reduce the impact of proof-site, in case PG is not used
* generic/proof-autoloads.el: Remove `require`s; not needed. * generic/proof-site.el: Don't require `pg-vars`. (proof-ready-for-assistant): Move to proof-script.el. * generic/proof-menu.el (proof-assistant-format): Make dynamically scoped var explicit (preparation for lexical-binding). * generic/proof-script.el: Require `pg-vars`. (proof-ready-for-assistant): Move from proof-site.el. * generic/proof-syntax.el (proof-replace-regexp-in-string): * generic/proof-shell.el (proof-shell-live-buffer): Don't mark it as inlinable: it's not performance sensitive.
Diffstat (limited to 'generic/proof-menu.el')
-rw-r--r--generic/proof-menu.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/proof-menu.el b/generic/proof-menu.el
index dd3d05c8..2900a6b1 100644
--- a/generic/proof-menu.el
+++ b/generic/proof-menu.el
@@ -1006,7 +1006,7 @@ We first clear the dynamic settings from `proof-assistant-settings'."
(cons "%f" '(proof-assistant-format-float curvalue))
(cons "%s" '(proof-assistant-format-string curvalue)))
"Table to use with `proof-format' for formatting CURVALUE for assistant.
-NB: variable curvalue is dynamically scoped (used in `proof-assistant-format').")
+NB: variable `curvalue' is dynamically scoped (used in `proof-assistant-format').")
(defun proof-assistant-format-bool (value)
(if value proof-assistant-true-value proof-assistant-false-value))
@@ -1034,7 +1034,10 @@ value) and the second for false."
(let ((setting
(cond
((stringp string) ;; use % format characters
- (proof-format proof-assistant-format-table string))
+ ;; Dynbind for use in proof-assistant-format-table!
+ (with-no-warnings (defvar curvalue))
+ (let ((curvalue curvalue))
+ (proof-format proof-assistant-format-table string)))
((functionp string) ;; call the function
(funcall string curvalue))
((consp string) ;; true/false options