Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion coq/coq-abbrev.el
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ start."
(when snippet
(if (and coq-use-yasnippet (fboundp 'yas-expand))
(yas-expand-snippet (coq-yas-snippet-from-db snippet))
(insert (coq-simple-abbrev-from-db snippet)))))
(let ((start (point)))
(insert (coq-simple-abbrev-from-db snippet))
(indent-region start (point))))))

;; (if (fboundp 'with-undo-amalgamate) ;; emacs > 29.1
;; (with-undo-amalgamate (insert abbr) (yas-expand))
Expand Down
7 changes: 2 additions & 5 deletions coq/coq.el
Original file line number Diff line number Diff line change
Expand Up @@ -2938,13 +2938,10 @@ Goals that are marked as \"only printing\" are ignored."
;; NOTE: Adding braces would be great, but it messes up indentation.
(format-selector (lambda (name) (format "[%s]: #." name)))
(goal-selectors (cl-mapcar format-selector goal-names))
(snippet (string-join goal-selectors "\n"))
(snippet (coq-insert-template snippet)))
(message "%s" goal-names)
(snippet (string-join goal-selectors "\n")))
(if (equal goal-selectors nil)
(error "Couldn't find any named goals")
(let ((start (point)))
(if coq-use-yasnippet (yas-expand-snippet snippet) (insert snippet))))))))
(coq-insert-template snippet))))))

(defun coq-insert-match ()
"Insert a match expression from a type name by Show Match.
Expand Down
Loading