[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
For TODO: Syntax-tables - allow a \ at EOL to be part of line comment.
From: |
Alan Mackenzie |
Subject: |
For TODO: Syntax-tables - allow a \ at EOL to be part of line comment. |
Date: |
Fri, 4 Jan 2008 20:45:41 +0000 |
User-agent: |
Mutt/1.5.9i |
Hi, Emacs!
There are many languages which have line comments
"THE COMMENT EXTENDS TO THE END OF THE LINE!!"
and also allow a line to be continued on to the next line
"A BACKSLASH AT THE END OF A LINE CONTINUES IT ONTO THE NEXT LINE!!".
However, few of these languages' manuals state clearly which rule takes
precedence when a \ is the last character of such a comment; it varies
from language to language. For example, in C and C++,
// A line comment can be escaped to \
carry on on the next line.
But in shell script:
# This line is a comment, but \
echo this line is not. >&2
, or Emacs Lisp:
;; A comment line's EOL \
(message "cannot be escaped.")
. Although this isn't and never will be a showstopper, it's one of
these irritating things which it would do no harm to resolve. I
therefore propose adding it to ..../etc/TODO:
2008-01-04 acm <address@hidden>
* TODO: A note that Syntax tables should be enhanced so that on a
line comment, \ at EOL needn't continue the comment onto next line.
*** TODO~ 2007-12-31 13:25:48.000000000 +0000
--- TODO 2008-01-04 20:39:13.617142976 +0000
***************
*** 243,248 ****
--- 243,249 ----
by elisp code. Thus a char could both close a string and open a comment
at the same time and do it in a context-sensitive way.
*** ability to add mode-specific data to the partial-parse-state.
+ *** a way to say a `\' at the end of a line comment doesn't escape the NL.
** Add a way to convert a keyboard macro to equivalent Lisp code.
--
Alan Mackenzie (Nuremberg, Germany).
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- For TODO: Syntax-tables - allow a \ at EOL to be part of line comment.,
Alan Mackenzie <=