From c4ec51bc48097bb0b8947b7ac7d78a8b4de4a6f2 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Wed, 29 Sep 2010 12:20:10 +0000 Subject: Support proof-shell-init-cmd being a list --- generic/proof-config.el | 4 ++-- generic/proof-shell.el | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/generic/proof-config.el b/generic/proof-config.el index b817b10b..0ede4c5f 100644 --- a/generic/proof-config.el +++ b/generic/proof-config.el @@ -826,14 +826,14 @@ See also `proof-shell-init-cmd'." :group 'proof-shell) (defcustom proof-shell-init-cmd nil - "The command for initially configuring the proof process. + "The command(s) for initially configuring the proof process. This command is sent to the process as soon as synchronization is gained \(when an annotated prompt is first recognized). It can be used to configure the proof assistant in some way, or print a welcome message \(since output before the first prompt is discarded). See also `proof-shell-pre-sync-init-cmd'." - :type '(choice string (const nil)) + :type '(choice (list string) string (const nil)) :group 'proof-shell) ;; TODO: remove proof-shell-init-cmd in favour of this hook diff --git a/generic/proof-shell.el b/generic/proof-shell.el index 207fb10f..daf7db09 100644 --- a/generic/proof-shell.el +++ b/generic/proof-shell.el @@ -1756,8 +1756,13 @@ processing." (unwind-protect (progn (run-hooks 'proof-shell-init-hook) - (if proof-shell-init-cmd - (proof-shell-invisible-command proof-shell-init-cmd t)) + (when proof-shell-init-cmd + (if (listp proof-shell-init-cmd) + (mapcar 'proof-shell-invisible-command-invisible-result + proof-shell-init-cmd) + (proof-shell-invisible-command-invisible-result + proof-shell-init-cmd))) + (proof-shell-wait) (if proof-assistant-settings (mapcar (lambda (c) (proof-shell-invisible-command c t)) -- cgit v1.2.3