]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak the comment-start-skip example in the manual
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 21 Aug 2021 14:07:44 +0000 (16:07 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 21 Aug 2021 14:08:36 +0000 (16:08 +0200)
* doc/emacs/programs.texi (Options for Comments): Tweak the
example regexp for comment-start-skip (bug#15006).

doc/emacs/programs.texi
src/syntax.c

index fe3ee57ac0af5bb31772258b6971d64444319ccb..09216c278b1b0aa3409368e4af5379bcdac1533c 100644 (file)
@@ -1098,13 +1098,13 @@ match the last comment before point in the buffer, and then does a
 expression that is the value of the variable @code{comment-start-skip}.
 Make sure this regexp does not match the null string.  It may match more
 than the comment starting delimiter in the strictest sense of the word;
-for example, in C mode the value of the variable is
+for example, in C mode the value of the variable could be
 @c This stops M-q from breaking the line inside that @code.
-@code{@w{"\\(//+\\|/\\*+\\)\\s *"}}, which matches extra stars and
-spaces after the @samp{/*} itself, and accepts C++ style comments
-also.  (Note that @samp{\\} is needed in Lisp syntax to include a
-@samp{\} in the string, which is needed to deny the first star its
-special meaning in regexp syntax.  @xref{Regexp Backslash}.)
+@code{@w{"/\\*+[ \t]*\\|//+[ \t]*"}}, which matches extra stars and
+spaces after the @samp{/*} itself, and accepts C++ style (@samp{//})
+comments also.  (Note that @samp{\\} is needed in Lisp syntax to
+include a @samp{\} in the string, which is needed to deny the first
+star its special meaning in regexp syntax.  @xref{Regexp Backslash}.)
 
 @vindex comment-start
 @vindex comment-end
index 6cbe0f6855fe1147aee66bc8097312bacb2ecc81..1ef4a712281fd3a69134f21e9c146c38ac826055 100644 (file)
@@ -17,6 +17,7 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
+// foo
 
 #include <config.h>