aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Healfdene Goguen <da+pg-hhg@inf.ed.ac.uk>1998-01-15 12:23:59 +0000
committerGravatar Healfdene Goguen <da+pg-hhg@inf.ed.ac.uk>1998-01-15 12:23:59 +0000
commitf4781c9dcabf44a31d8dd65d00e3a46d38867e68 (patch)
treebe2ccbd9286f4a1b8a328ed6879a81ca4a777344
parentf523b125957c2bc7dcbecd08e07ebf9264daa3a5 (diff)
Updated method of defining proof-shell-cd to be consistent with other
proof-assistant-dependent variables. Added ctrl-button1 to copy selected region to end of locked region
-rw-r--r--lego.el11
-rw-r--r--proof.el22
2 files changed, 28 insertions, 5 deletions
diff --git a/lego.el b/lego.el
index 2de2ca5a..3ddfbe1c 100644
--- a/lego.el
+++ b/lego.el
@@ -5,6 +5,11 @@
;; $Log$
+;; Revision 1.34 1998/01/15 12:23:59 hhg
+;; Updated method of defining proof-shell-cd to be consistent with other
+;; proof-assistant-dependent variables.
+;; Added ctrl-button1 to copy selected region to end of locked region
+;;
;; Revision 1.33 1998/01/05 14:59:03 tms
;; fixed a bug in the indenting functions
;;
@@ -145,7 +150,7 @@
;; ----- lego-shell configuration options
-(defvar lego-prog-name "/home/tms/src/lego/bin/lego"
+(defvar lego-prog-name "/home/ctm/lego/bin/legoML"
"*Name of program to run as lego.")
(defvar lego-shell-working-dir ""
@@ -154,6 +159,9 @@
(defvar lego-shell-prompt-pattern "^\\(Lego>[ \201]*\\)+"
"*The prompt pattern for the inferior shell running lego.")
+(defvar lego-shell-cd "Cd \"%s\";"
+ "*Command of the inferior process to change the directory.")
+
(defvar lego-shell-abort-goal-regexp "KillRef: ok, not in proof state"
"*Regular expression indicating that the proof of the current goal
has been abandoned.")
@@ -635,6 +643,7 @@
(defun lego-shell-mode-config ()
(setq proof-shell-prompt-pattern lego-shell-prompt-pattern
+ proof-shell-cd lego-shell-cd
proof-shell-abort-goal-regexp lego-shell-abort-goal-regexp
proof-shell-proof-completed-regexp lego-shell-proof-completed-regexp
proof-shell-error-regexp lego-error-regexp
diff --git a/proof.el b/proof.el
index d6391574..812a90a1 100644
--- a/proof.el
+++ b/proof.el
@@ -9,6 +9,11 @@
;; $Log$
+;; Revision 1.32 1998/01/15 12:23:57 hhg
+;; Updated method of defining proof-shell-cd to be consistent with other
+;; proof-assistant-dependent variables.
+;; Added ctrl-button1 to copy selected region to end of locked region
+;;
;; Revision 1.31 1998/01/12 11:07:53 tms
;; o added support for remote proof processes
;; o bound C-c C-z to 'proof-frob-locked-end
@@ -157,7 +162,7 @@
;; Configuration ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar proof-shell-cd "Cd \"%s\";"
+(defvar proof-shell-cd nil
"*Command of the inferior process to change the directory.")
(defvar proof-prog-name-ask-p nil
@@ -494,6 +499,15 @@
(incf a))
(apply 'concat (nreverse ls))))
+(defun proof-send-span (event)
+ (interactive "e")
+ (let* ((ext (span-at (mouse-set-point event) 'type))
+ (str (span-property ext 'cmd)))
+ (cond ((and (eq proof-script-buffer (current-buffer)) (not (null ext)))
+ (proof-goto-end-of-locked)
+ (cond ((eq (span-property ext 'type) 'vanilla)
+ (insert str)))))))
+
(defun pbp-construct-command ()
(let* ((ext (span-at (point) 'proof))
(top-ext (span-at (point) 'proof-top-element))
@@ -889,8 +903,6 @@ at the end of locked region (after inserting a newline and indenting)."
(setq ext (prev-span ext 'type)))
ext)))
-
-
(defun proof-steal-process ()
(proof-start-shell)
(if proof-shell-busy (error "Proof Process Busy!"))
@@ -1376,6 +1388,7 @@ current command."
(define-key proof-mode-map [(control c) (control u)] 'proof-undo-last-successful-command)
(define-key proof-mode-map [(control c) (control v)] 'proof-execute-minibuffer-cmd)
(define-key proof-mode-map [(control c) ?\'] 'proof-goto-end-of-locked)
+ (define-key proof-mode-map [(control button1)] 'proof-send-span)
(define-key proof-mode-map [(control c) (control b)] 'proof-process-buffer)
(define-key proof-mode-map [(control c) (control z)] 'proof-frob-locked-end)
@@ -1406,7 +1419,8 @@ current command."
;; If the proof process in invoked on a different machine e.g.,
;; for proof-prog-name="rsh fastmachine proofprocess", one needs
;; to adjust the directory:
- (proof-shell-insert (format proof-shell-cd default-directory))
+ (and proof-shell-cd
+ (proof-shell-insert (format proof-shell-cd default-directory)))
(if proof-shell-init-cmd
(proof-shell-insert proof-shell-init-cmd))