Skip to content

Commit 1fd2a93

Browse files
committed
Coq: make printing parentheses/notations flags accessible
Add menu entry and Coq keymap binding available to set/unset the Printing Parentheses and Printing Notations flags.
1 parent c3e6c39 commit 1fd2a93

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

CHANGES

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ the Git ChangeLog, the GitHub repo https://github.com/ProofGeneral/PG
4040
*** New command `proof-check-annotate' to annotate all failing proofs
4141
with FAIL comments. Useful in the development process as described
4242
above to ensure all currently failing proofs are marked as such.
43+
*** flag Printing Parentheses and Printing Notations can be set/unset
44+
via menu and Coq keymap (C-c C-a C-9 and C-c C-a C-0 for
45+
Parentheses (optimized for British and American keyboards); C-c
46+
C-a n and C-c C-a N for Notations).
4347
*** New options coq-compile-extra-coqc-arguments and
4448
coq-compile-extra-coqdep-arguments to configure additional
4549
command line arguments to calls of, respetively, coqc and coqdep

coq/coq-abbrev.el

+4
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,10 @@
335335
["Unset Printing All" coq-unset-printing-all t]
336336
["Set Printing Implicit" coq-set-printing-implicit t]
337337
["Unset Printing Implicit" coq-unset-printing-implicit t]
338+
["Set Printing Parentheses" coq-set-printing-parentheses t]
339+
["Unset Printing Parentheses" coq-unset-printing-parentheses t]
340+
["Set Printing Notations" coq-set-printing-notations t]
341+
["Unset Printing Notations" coq-unset-printing-notations t]
338342
["Set Printing Coercions" coq-set-printing-coercions t]
339343
["Unset Printing Coercions" coq-unset-printing-coercions t]
340344
["Set Printing Compact Contexts" coq-set-printing-implicit t]

coq/coq.el

+8
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,10 @@ See `coq-fold-hyp'."
17751775
(proof-definvisible coq-unset-printing-implicit "Unset Printing Implicit.")
17761776
(proof-definvisible coq-set-printing-all "Set Printing All.")
17771777
(proof-definvisible coq-unset-printing-all "Unset Printing All.")
1778+
(proof-definvisible coq-set-printing-parentheses "Set Printing Parentheses.")
1779+
(proof-definvisible coq-unset-printing-parentheses "Unset Printing Parentheses.")
1780+
(proof-definvisible coq-set-printing-notations "Set Printing Notations.")
1781+
(proof-definvisible coq-unset-printing-notations "Unset Printing Notations.")
17781782
(proof-definvisible coq-set-printing-synth "Set Printing Synth.")
17791783
(proof-definvisible coq-unset-printing-synth "Unset Printing Synth.")
17801784
(proof-definvisible coq-set-printing-coercions "Set Printing Coercions.")
@@ -2862,6 +2866,10 @@ Completion is on a quasi-exhaustive list of Coq tacticals."
28622866
(define-key coq-keymap [(control ?l)] #'coq-LocateConstant)
28632867
(define-key coq-keymap [(control ?n)] #'coq-LocateNotation)
28642868
(define-key coq-keymap [(control ?w)] #'coq-ask-adapt-printing-width-and-show)
2869+
(define-key coq-keymap [(control ?9)] #'coq-set-printing-parentheses)
2870+
(define-key coq-keymap [(control ?0)] #'coq-unset-printing-parentheses)
2871+
(define-key coq-keymap [(?N)] #'coq-set-printing-notations)
2872+
(define-key coq-keymap [(?n)] #'coq-unset-printing-notations)
28652873

28662874
;(proof-eval-when-ready-for-assistant
28672875
; (define-key ??? [(control c) (control a)] (proof-ass keymap)))

0 commit comments

Comments
 (0)