diff options
| author | David Aspinall | 2004-06-13 21:10:16 +0000 |
|---|---|---|
| committer | David Aspinall | 2004-06-13 21:10:16 +0000 |
| commit | 7eb2222e64e25f1bd224fa5a04aba3982da0f5d4 (patch) | |
| tree | ef3053e0eb949dd64c1a3a0575f16852535c4aa7 /generic | |
| parent | 3672ec30e43d82fa3b95c77e7316462841a654a2 (diff) | |
Generalise proof-def-invisible.
Diffstat (limited to 'generic')
| -rw-r--r-- | generic/proof-menu.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/generic/proof-menu.el b/generic/proof-menu.el index 4d879c35..c9a99f83 100644 --- a/generic/proof-menu.el +++ b/generic/proof-menu.el @@ -534,16 +534,22 @@ KEY is added onto proof-assistant map." "Define function FN to send STRING to proof assistant, optional keydef KEY. This is intended for defining proof assistant specific functions. STRING is sent using proof-shell-invisible-command, which see. +STRING may be a string or a function which returns a string. KEY is added onto proof-assistant map." `(progn (if ,key (define-key (proof-ass keymap) (quote ,key) (quote ,fn))) (defun ,fn () ,(concat "Command to send " - (replace-in-string string "\\\\" "\\\\=") ;; for substitute-command-keys + (if (stringp string) + (replace-in-string + string "\\\\" "\\\\=") ;; for substitute-command-keys + "an instruction") " to the proof assistant.") (interactive) - (proof-shell-invisible-command ,string)))) + ,(if (stringp string) + (list 'proof-shell-invisible-command string) + (list 'proof-shell-invisible-command (eval string)))))) (defun proof-def-favourite (command inscript menuname &optional key new) "Define and a \"favourite\" proof assisant function. |
