Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL and editor support for multiline comments #6132

Closed
5 of 9 tasks
stevengj opened this issue Mar 12, 2014 · 13 comments
Closed
5 of 9 tasks

REPL and editor support for multiline comments #6132

stevengj opened this issue Mar 12, 2014 · 13 comments

Comments

@stevengj
Copy link
Member

Now that #6128 is merged (#= ... =# multiline comments), some work needs to be done in supporting it in the REPL and in editors:

Feel free to edit this issue to add checkboxes for other editors and cc the relevant people.

(I'm not trying to obligate anyone to implement this, obviously, just trying to cc people with interest in the relevant editing modes.)

@StefanKarpinski
Copy link
Sponsor Member

noooooooo

@JeffBezanson
Copy link
Sponsor Member

I'm not even sure I like this feature.

@malmaud
Copy link
Contributor

malmaud commented Mar 12, 2014

Multiline comments are the only good things in my life right now.

Textmate/sublime mode will also need updating.

@nolta
Copy link
Member

nolta commented Mar 12, 2014

Ugh, i can't stand multiline comments. Someone else will have to modify pygments.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Mar 13, 2014

For (1), the parser should return Expr(:incomplete, "description") to trigger the heuristics

stevengj added a commit that referenced this issue Mar 13, 2014
@JeffBezanson JeffBezanson added this to the 0.3 milestone Mar 21, 2014
@JeffBezanson
Copy link
Sponsor Member

I'm having a bit of trouble with the emacs mode. Syntax tables don't seem to support using the same character as both a 1-character comment open and part of a 2-character comment open. So I settled on the idea of using syntax tables for multi-line comments:

    (modify-syntax-entry ?# ". 14n" table)
    (modify-syntax-entry ?= ". 23n" table)

and font-lock for single-line comments:

    '("#[^=].*$" . font-lock-comment-face)

This works nearly perfectly, except emacs seems to skip coloring some single-line comments essentially at random, as far as I can tell. Anyone have any ideas?

@BobPortmann
Copy link
Contributor

Maybe look at how cc-mode deals with //... and /* ... */ comments? I would but my elisp fu is weak.

@JeffBezanson
Copy link
Sponsor Member

I did; in fact the syntax table system looks like it was extended to handle C++ and little else. It special-cases 2-character comment delimiters; line comments starting with a single # are the problem.
Perhaps others can get more out of this: http://www.gnu.org/software/emacs/manual/html_node/elisp/Syntax-Flags.html#Syntax-Flags

@stevengj
Copy link
Member Author

stevengj commented Apr 1, 2014

I don't see why this issue should be a blocker for 0.3.

@StefanKarpinski
Copy link
Sponsor Member

I don't either.

@stevengj stevengj removed this from the 0.3 milestone Apr 1, 2014
@stevengj
Copy link
Member Author

stevengj commented Apr 1, 2014

Okay, clearing the milestone marker.

@kmsquire
Copy link
Member

FWIW, GtkSourceView seems to have the same issue that emacs had. I've posted a message on the gnome-devtools mailing list, but my account hasn't been approved there yet.

cc: @Waldir

@quinnj
Copy link
Member

quinnj commented Jul 2, 2014

I say we close this. I think the most relevant editors/environments have been implemented and if someone notices it's not supported somewhere, they can request or do it and submit a PR.

@quinnj quinnj closed this as completed Jul 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants