Comments (6)
I think this is standard in emacs. You define comment starters and enders in the syntax table. This is a bit convoluted for two-letters comment delimiters:
Look at https://www.gnu.org/software/emacs/manual/html_node/elisp/Syntax-Descriptors.html
You can have a look at coq-menu.el
from pg.
I think this should help.
from pg.
P.S: I edited my first entry to write my concrete syntax for comments.
@Matafou If I'm not mistaken, with modifying syntax table, we don't need to set variables like proof-script-comment-start
. I mean I have
(defconst PA-mode-syntax-table-entries
(append '(?\` "< 23b")
'(?\n "> b")
'(?\{ "(}1nb")
'(?\} "){4nb")))
and
(proof-easy-config 'pa "PA"
;;other configurations
proof-script-syntax-table-entries PA-mode-syntax-table-entries)
Comment highlighting works as I expected. When I load the commands, it seems the comment lines and blocks are captured as expected. Is there something I missed? What I mean is, does the proof-script-comment-start configuration affect other things too?
from pg.
It is used in the generic code of proofgeneral. In particular when PG splits a file into a sequence of commands and comments. Otherwise a comment is "glued" to the next command. I think it will work ok without, but it is better to define it. May be a matter of taste though.
PG amso sets comment-end
and comment-start
according to these variables (see comment-region
and co).
from pg.
@Matafou I think when proof-script-comment-start and proof-script-comment-end are defined, a comment is "glued" to the next comand. Let me provide more configuration details
(proof-easy-config 'pa "PA"
;;other configurations
proof-script-syntax-table-entries PA-mode-syntax-table-entries
proof-script-comment-start "{`"
proof-script-comment-end "`}"
proof-script-command-start-regexp "\\<\\(axiom\\|def\\)\\>"
)
With this, next command is passing from a command to another one omitting the comments. I understand from your saying that "gluing" occurs without these two definitions. That's why I confused. Maybe, the problem is that I only defined proof-script-command-start-regexp, so next command is just passing one to another because of this. Is that correct?
PG amso sets
comment-end
andcomment-start
according to these variables (seecomment-region
and co).
Is there any reference for this? I would like to read it.
from pg.
I think the gluing behaviour becomes optional when these variables are set.
I don't know if this is documented but I just grepped "comment-start" in the generic directory and this seemed clear from comments there.
from pg.
Related Issues (20)
- makeinfo reports warning: @inforef is obsolete
- compile-tests/003-require-error fails sporadically with 8.19-rc1 HOT 4
- Build failure when "Compile Before Require" meets imported OCaml plugins HOT 13
- proof-goto-point is non-idempotent HOT 2
- wait for proof-goto-point to finish HOT 1
- void function error
- coq-load-project file should extract META files HOT 1
- dynamic highlighting HOT 1
- Bug: Frames in hybrid mode automatically revert to vertical mode HOT 2
- Indentation issue : "\in" HOT 2
- 3-pane mode broken with small frame heights
- UI and kernel out of sync from aborting tactics? HOT 1
- Proof General gets into a state where it doesn't know what + is. HOT 11
- Why retracting before restarting coqtop? HOT 3
- Incompatibility with `package-quickstart` HOT 4
- bug: newlines misparsed as space in string litterals HOT 10
- File mode specification error: (void-variable coq-cmd-force-next-proof-kept) HOT 14
- REGRESSION: ProofGeneral cannot step over Fail correctly HOT 10
- PG does not position to error HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pg.