[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Comment syntax
From: |
Stefan Monnier |
Subject: |
Re: Comment syntax |
Date: |
Fri, 28 Jun 2019 08:37:06 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> I am trying to write Emacs support for a major mode where * (an
> asterisk) starts a comment, but only if * is at the beginning of the
> line (comments started this way end at the end of the line). I've read
> through (info "(elisp) Syntax Flags") about how to support this but
> nothing there seems to help (unless I missed something, which is very
> possible.) Is there a way to get bol-* recognized as starting a comment?
You need to setup a syntax-propertize-function for that.
E.g.
(setq-local syntax-propertize-function
(syntax-propertize-rules ("^\\*" (0 "<"))))
Stefan
- Comment syntax, Alex Branham, 2019/06/27
- Re: Comment syntax,
Stefan Monnier <=