aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <courtieu@lri.fr>2015-03-13 14:12:13 +0000
committerGravatar Pierre Courtieu <courtieu@lri.fr>2015-03-13 14:12:13 +0000
commit40d0c079ac9acf8ddd1e531b6e229ccd71451bd4 (patch)
tree4ecfaeb1facd4c6362a380a8ba96bca8c3514730
parentee094de6145730aad0774adf9ac9f931a1b07cf0 (diff)
(fixes last commit) Added a command to send Queries to coq, with completion (C-c C-a C-q).
Should replace C-c C-v at some point. Needs to have a complete list of such queries. Obeys C-u prefix for Printing all flag.
-rw-r--r--lib/holes.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/holes.el b/lib/holes.el
index 7bceeb8b..09eb9dde 100644
--- a/lib/holes.el
+++ b/lib/holes.el
@@ -613,9 +613,11 @@ created. Return the number of holes created."
-(defun holes-replace-string-by-holes-backward-jump (pos &optional noindent)
+(defun holes-replace-string-by-holes-backward-jump (pos &optional noindent alwaysjump)
"Put holes between POS and point, backward, indenting.
-\"#\" and \"@{..}\" between this positions will become holes."
+\"#\" and \"@{..}\" between this positions will become holes. If
+ALWAYSJUMP is non nil, jump to the first hole even if more than
+one."
(unless noindent (save-excursion (indent-region pos (point) nil)))
(let ((n (holes-replace-string-by-holes-backward pos)))
(case n
@@ -625,6 +627,7 @@ created. Return the number of holes created."
(holes-set-point-next-hole-destroy)) ; if only one hole, go to it.
(t
(goto-char pos)
+ (when alwaysjump (holes-set-point-next-hole-destroy))
(unless (active-minibuffer-window) ; otherwise minibuffer gets hidden
(message (substitute-command-keys
"\\[holes-set-point-next-hole-destroy] to jump to active hole. \\[holes-short-doc] to see holes doc.")))))))