All Questions
Tagged with comment major-mode
8 questions
2
votes
1
answer
983
views
Emacs custom major mode with multiple comment types
I'm trying to write my first (very simple) major mode for Emacs. My goal is to have multiple comment types, but I can't find a way to implement this. Basically, I want my major mode to make ...
2
votes
0
answers
78
views
Strange comment indentation results
I am working with a simple major mode. The format has one single line comment delimiter, i.e., %. However, I get strange results when running fill-paragraph on a comment. Specifically, the result I ...
2
votes
0
answers
867
views
How to add additional comment syntax to a mode?
In general, given a major mode with a defined comment syntax, what do I have to define or change to add a new comment syntax? By "adding", I mean setting some new characters so that they
work with ...
1
vote
1
answer
249
views
Elisp: Inserting Comments
I'm trying to write an elisp program that will insert a section header and footer as a comment. For example, if I need a section called "intro" for my LaTeX document, the following would be inserted:
...
1
vote
0
answers
97
views
Keyword as comment ender (and starter)
In my previous question I asked about complex comment-start sequence and I think I figured it out, but now I have another problem. Let say we have this mode:
(defconst test-font-lock-keywords
'(("\\...
1
vote
1
answer
116
views
Complex comment-start (and end) sequence
As far as I understand there is syntax flags only for comment delimiters made up of two characters but if I have comment delimiters of length greater than two characters is it possible to change ...
5
votes
1
answer
195
views
Using a different major mode in comments
A programming language that I use lets me format comments and docstrings using markdown, and then export my code and documentation to PDF.
When I edit the file, though, Emacs doesn't see comments as ...
9
votes
2
answers
4k
views
How to change comment character from # (hash) to % (percent sign) for Octave major mode
By default, comment-region inserts # for comments in Octave major mode:
# foo
I want to modify the behavior so that it inserts the percent sign
% foo
I used the following
(setq octave-mode-hook
...