From 7389d43893569ff0e1eff892254901876fc8225e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 20 Dec 2018 14:47:33 -0500 Subject: 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. --- generic/proof-menu.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'generic/proof-menu.el') 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 -- cgit v1.2.3