aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq-indent.el
Commit message (Collapse)AuthorAge
* Simpler fix for #411.Gravatar Pierre Courtieu2019-02-12
|
* Fixes #411.Gravatar Pierre Courtieu2019-02-12
| | | | | Stefan's cleanup stumbled on my lack of comments :-(. Some function was supposed to return point found if found.
* Make coq-mode work without generic/proof-*Gravatar Stefan Monnier2018-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revise the various `require`s to avoid spurious dependencies, and tweak the code here and there to eliminate the remaining dependencies. * coq/coq-db.el: Don't require proof-config nor proof-syntax. (coq-build-opt-regexp-from-db): Avoid proof-regexp-alt-list. * coq/coq-indent.el: Use lexical-binding. Don't require coq-syntax. Comment out all the code that's not used any more. (coq-empty-command-p): Use forward-comment instead of coq-find-not-in-comment-backward. Fix paren typos. (coq-script-parse-cmdend-forward, coq-script-parse-cmdend-backward): Use forward-comment i.s.o proof-script-generic-parse-find-comment-end. Use syntax-ppss i.s.o proof-buffer-syntactic-context. (coq-find-current-start): Explicit case-fold-search i.s.o proof-looking-at. * coq/coq-mode.el (coq-mode): Set comment-start/end. * coq/coq-smie.el: Require coq-syntax explicitly. (coq-smie-detect-goal-command, coq-smie-module-deambiguate): Explicit case-fold-search i.s.o proof-looking-at. (coq-indent-basic): New custom var. (coq-smie-rules): Use it in case PG is not loaded. * coq/coq-syntax.el: Don't require proof-syntax, proof-utils, and span. (coq-goal-command-p): Use overlay-get i.s.o span-property. (coq-save-command-regexp-strict, coq-save-command-regexp): Use \` and regexp-opt i.s.o proof-anchor-regexp and proof-ids-to-regexp. (coq-save-command-p): Explicit case-fold-search i.s.o proof-string-match. (coq--regexp-alt-list-symb): Rename from proof-regexp-alt-list-symb. Use mapconcat i.s.o proof-regexp-alt-list. (coq-save-with-hole-regexp): Use regexp-opt i.s.o proof-regexp-alt-list. (coq-goal-command-regexp, coq-goal-with-hole-regexp) (coq-decl-with-hole-regexp, coq-defn-with-hole-regexp) (coq-font-lock-keywords-1): Use mapconcat i.s.o proof-regexp-alt-list. (coq-find-first-hyp, coq-detect-hyps-positions-in-goals): Use current buffer i.s.o proof-goals-buffer. (coq-with-altered-syntax-table): Fix broken use of unwind-protect. * coq/coq.el (coq-detect-hyps-in-goals): Change buffer before calling coq-find-first-hyp and coq-detect-hyps-positions-in-goals. (coq-pg-setup): Use comment-start/end. * generic/pg-goals.el: Require proof-script explicitly instead of autoloading via proof-insert-sendback-command. * generic/pg-pbrpm.el: Require proof-script explicitly instead of autoloading via proof-insert-pbp-command. * generic/pg-pgip.el: Require proof-script explicitly. * generic/proof-depends.el: Require proof-script explicitly instead of autoloading via pg-set-span-helphighlights. * generic/proof-script.el (pg-set-span-helphighlights) (proof-insert-pbp-command, proof-insert-sendback-command) (proof-script-generic-parse-find-comment-end): Don't autoload. * generic/proof-syntax.el (proof-ids-to-regexp): Simplify. * lib/span.el (span-delete): η-reduce.
* Cosmetic cleanup of coq-smie, coq-syntax, and coq-abbrev.Gravatar Stefan Monnier2018-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a few more cl.el leftovers. Get rid of remaining use of iso-2022. Use SMIE unconditionally. * coq/coq-abbrev.el: Use lexical-binding. (coq-install-abbrevs): Delete, only keep the relevant contents. (proof-defstringset-fn): Remove. Fold changes into the main version. * coq/coq-indent.el (coq-find-real-start): Use forward-comment. * coq/coq-smie.el: Use lexical-binding. Assume `smie` is available. (coq--string-suffix-p): Rename from coq-string-suffix-p. Use string-suffix-p for it when available. (string-suffix-p): Never define here. Change all users to use coq--string-suffix-p instead. (coq-smie-.-deambiguate): Use forward-comment. Remove unused var `beg`. (coq-backward-token-fast-nogluing-dot-friends) (coq-forward-token-fast-nogluing-dot-friends): Remove unused var `tok-other`. (coq-smie-search-token-backward): Remove unused var `p`. (coq-smie-:=-deambiguate, coq-smie-backward-token): Prefer char-before over looking-back. (coq-smie-rules): Use `pcase` over deprecated cl's `case`. * coq/coq-syntax.el: Use lexical-binding. (coq-count-match): Rewrite so it doesn't do needless heap-allocation. (coq-module-opening-p, coq-section-command-p, coq-goal-command-str-p): Use case-fold-search rather than proof-string-match. (coq-goal-command-regexp): Forward-declare. (coq-save-command-regexp-strict): Move before first use. (coq-reserved-regexp): Use a single \_< ... \_>. (coq-detect-hyps-positions): Limit search for looking-back. * coq/coq.el: Remove SMIE declarations since SMIE is always used. (coq-use-smie): Remove, unused. (coq-smie): Always require. * generic/pg-pbrpm.el: Fix leftover cl.el uses. * generic/proof-utils.el (proof-defstringset-fn): Fix copy&paste error in the docstring, improve interactive prompt. * lib/maths-menu.el: Use utf-8 and lexical-binding.
* Cleanup patch; Moving defvar to toplevelGravatar Stefan Monnier2018-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move `defvar`s used to silence warnings outside of eval-when-compile. Make sure they don't actually give a value to the var. * pg-init.el: Simplify. Use (if t ...) to avoid running `require` at compile-time. Don't add subdirs to load-path here since this code is never used. (pg-init--script-full-path, pg-init--pg-root): Inline their definition into their sole user. * generic/proof-utils.el (proof-resize-window-tofit): Inline definitions of window-leftmost-p and window-rightmost-p previously in proof-compat.el. * lib/proof-compat.el (proof-running-on-win32): Remove, not used. (mac-key-mode): Remove, there's no carbon-emacs-package-version in Emacs≥24.3. (pg-custom-undeclare-variable): Use dolist. (save-selected-frame): Remove, save-selected-window also saves&restores the selected frame at the same time. Update all users (which already used save-selected-window around it). (window-leftmost-p, window-rightmost-p, window-bottom-p) (find-coding-system): Remove, unused. * hol-light/hol-light.el (caml-font-lock-keywords): Don't try to defvar it to a dummy value and... (hol-light): ...check its existence before using it instead. * coq/coq.el (coq-may-use-prettify): Simplify initialization.
* Fix most doc issues raised by (checkdoc)Gravatar Erik Martin-Dorel2018-08-23
|
* Update copyright messages and improve the header of elisp files.Gravatar Erik Martin-Dorel2018-02-21
|
* look for vernac controls before focus bracket, fix for #223Gravatar Paul Steckler2018-01-26
|
* Experimental fix for #220.Gravatar Pierre Courtieu2018-01-15
|
* Fix incorrect uses of defvarGravatar Clément Pit--Claudel2017-03-08
| | | | | | | It didn't really matter that these variables were defined and set to nil during compilation, since we ran compilation in a clean Emacs in --batch mode; it does matter now, however, since package.el compiles PG in the user's currently running Emacs instance.
* Fixing a smal glitch in indentation.Gravatar Pierre Courtieu2016-05-27
|
* Fix #29 + indentation glitch + regexp refactoring.Gravatar Pierre Courtieu2016-01-14
|
* Speeding up indentation (regexp optim).Gravatar Pierre Courtieu2015-12-07
|
* Speeding up indentation.Gravatar Pierre Courtieu2015-12-07
| | | | Dedicated regexp for bullets when searching backward.
* Fixed #15 + more speedup of indentation.Gravatar Pierre Courtieu2015-12-05
| | | | | Experimenting on more regexp and less adhoc searching in the smie lexer. In particular the regexp for bullet seems now capture only real bullets.
* Fixed a bug in script navigation. Updated CHANGEGravatar Pierre Courtieu2015-01-27
|
* removed debug message.Gravatar Pierre Courtieu2014-12-30
|
* fixed indentation (lexing of 'with') + made local coq-load-path.Gravatar Pierre Courtieu2014-12-30
|
* fixed a bug in command parsing for coq, due to recent changes.Gravatar Pierre Courtieu2014-12-24
|
* Supporting more bullets (coq 8.5), like ++ or ++++.Gravatar Pierre Courtieu2014-12-23
|
* Summary: Don't quote lambda expressionsGravatar Stefan Monnier2012-08-30
| | | | | | | | | | | | | | | | * coq/coq-indent.el (coq-indent-inner-regexp): Remove old X-Symbol element. (coq-save-count, coq-proof-count): * obsolete/plastic/plastic.el (plastic-shell-handle-output): * lib/texi-docstring-magic.el (texi-docstring-magic-insert-magic): * lib/pg-dev.el (emacs-lisp-mode-hook): * lib/maths-menu.el (maths-menu-filter-predicate) (maths-menu-tokenise-insert): * lib/holes.el (holes-next): * lego/lego.el (lego-shell-handle-output): * isar/isabelle-system.el (isabelle-docs-menu): * coq/coq.el (coq-compile-command, coq-compile-auto-save) (coq-compile-ignored-directories, coq-load-path-safep) (proof-shell-handle-delayed-output-hook): Don't quote lambda.
* Fixed a syntactic recognition function. Should Fix #2819.Gravatar Pierre Courtieu2012-07-05
|
* Fix a bug in coq indet code when at the beginning of a buffer.Gravatar Pierre Courtieu2012-06-14
|
* Trying to minimize the slowness of indentation when no "Proof." isGravatar Pierre Courtieu2012-06-11
| | | | given. Seems to work.
* Fixed an ineficiency in comment detection.Gravatar Pierre Courtieu2012-02-10
|
* Cleaning some code.Gravatar Pierre Courtieu2012-02-01
|
* Quick fix of a regression introduced by my last commit. Looking for aGravatar Pierre Courtieu2012-02-01
| | | | better fix.
* Fixed command end recognition in presence of operators of the form .+Gravatar Pierre Courtieu2012-02-01
| | | | +. is not accepted yet.
* Adapting coq syntax recognition to the future v8.4 behavior of bulletsGravatar Pierre Courtieu2011-12-16
| | | | | (stand-alone commands), which is different of the experiments made until now in coq/trunk.
* Fix trac #420 indentation freezing.Gravatar Pierre Courtieu2011-09-04
|
* Crude patch for Trac #416. I haven't tried to understand indent code fully, ↵Gravatar David Aspinall2011-08-23
| | | | so may not be best fix.
* Fixing the scripting of new subproof script parenthesizing ({ and }).Gravatar Pierre Courtieu2011-07-08
|
* Removed { and } as command terminators for now.Gravatar Pierre Courtieu2011-06-19
| | | | Fixes #412.
* Fix trac #410.Gravatar Pierre Courtieu2011-06-10
|
* Fix compile errors (seems to be code duplication between coq.el and coq-indent)Gravatar David Aspinall2011-06-09
|
* 2011-06-07 Stefan Monnier <monnier@iro.umontreal.ca>Gravatar Stefan Monnier2011-06-07
| | | | | | | | | | | | | * coq/coq.el: Match Proof...Qed and fix ;-vs-| precedence. (coq-smie-grammar): Add ; and | tacticals. Rename decls => cmds. Add CoInductive, and Proof..Qed. (coq-smie-search-token-forward): Rename from coq-smie-search-token; make it more robust. (coq-smie-search-token-backward): New function. (coq-smie-forward-token, coq-smie-backward-token): Use it to distinguish Inductive's ":=" from other uses. (coq-smie-rules): Use smie-rule-separator for |. Add ugly hack for Qed without matching "Proof".
* Updated the old code for indentation, in case Stefan cannot finish theGravatar Pierre Courtieu2011-06-04
| | | | | | | new one for the release. Added also support for an experimental syntax modification: { .. } is a new syntax for Beginsubproof. ... EndSubproof. There a also few minor behavior changes. The code has changed a lot though.
* Some small fixes in indentation for coq.Gravatar Pierre Courtieu2011-05-31
|
* Added indentation for BeginSubProof/EndSubProof.Gravatar Pierre Courtieu2011-05-31
| | | | + added some tactics syntax.
* Fixed the cleaning of goals buffer when proof completedGravatar Pierre Courtieu2010-09-09
| | | | + fixed the refreshing of modeline goal number display.
* Cleaning indentation code.Gravatar Pierre Courtieu2010-09-09
|
* Fixed indentation at end of file.Gravatar Pierre Courtieu2010-09-09
|
* Fixed small bugs in indentation.Gravatar Pierre Courtieu2010-09-09
|
* Finished fixing the small indentation bug at buffer top.Gravatar Pierre Courtieu2010-09-07
|
* Fix of previous commit.Gravatar Pierre Courtieu2010-09-07
|
* half fixed the indentation bug at buffer start.Gravatar Pierre Courtieu2010-09-07
|
* First fix of bug introduced by the last font-lock fix. Not finished.Gravatar Pierre Courtieu2010-09-03
|
* Fixed bug #346. Coq code was using proof-ids-to-regexp on regexpGravatar Pierre Courtieu2010-09-01
| | | | instead of pure strings.
* coq-comment-at-point: avoid error if command start not foundGravatar David Aspinall2010-08-24
| | | | (see Trac #342)
* Fix compile warning, rearrange docsGravatar David Aspinall2009-09-07
|