Skip to content

[Fix #277] Apply font-lock-comment-face to (comment) and #_ #354

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

Merged
merged 1 commit into from
Dec 8, 2015

Conversation

Malabarba
Copy link
Member

No description provided.

@bbatsov
Copy link
Member

bbatsov commented Dec 8, 2015

As I noted in the original I have some doubts about applying this to comment, as the behaviour there's not exactly the same as with #_ (e.g. comment returns a result nil).

@expez What do you think?

(goto-char start)
(clojure-forward-logical-sexp 1)
;; Data for (match-end 1).
(setf (elt md 3) (point))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've almost never seen setf in Emacs Lisp code (although it was quite popular in CL).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I almost always use it to destructively change a sequence or struct. :-)
It's considerably more convenient than something like (setcar (cdr (cdr (cdr md))) start).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. :-) I just said it's pretty uncommon.

@bbatsov
Copy link
Member

bbatsov commented Dec 8, 2015

Two more remarks - this needs a changelog entry and maybe there should be some config option about the comment macro. Anyways, let's hear what @expez and possibly others would have to say about the change.

@expez
Copy link
Member

expez commented Dec 8, 2015

I don't think we should font-lock comment with comment face. The only time I see the comment macro used is to provide example usage, or to put some code in the buffer which can easily be evaluated (e.g. with C-c C-e) while developing. In those two scenarios font-locking is quite beneficial.

I don't have time right now, but I think it would be a good idea to run a code search on github to check out how people are using comment.

@Malabarba
Copy link
Member Author

I'll remove the comment macro support and just add an example on the docstring about how to support it.

@bbatsov
Copy link
Member

bbatsov commented Dec 8, 2015

Sounds good to me.

bbatsov added a commit that referenced this pull request Dec 8, 2015
[Fix #277] Apply font-lock-comment-face to (comment) and #_
@bbatsov bbatsov merged commit 9144360 into master Dec 8, 2015
@bbatsov bbatsov deleted the comment-face branch December 8, 2015 15:56
@bbatsov
Copy link
Member

bbatsov commented Dec 8, 2015

👍

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

Successfully merging this pull request may close these issues.

3 participants