Merge from origin/emacs-28

e0f54c62ec CC Mode: fontify variables/functions after line comments e...
2c6a94c5b8 ; Correct the meaning of "cf." in tips.texi
This commit is contained in:
Stefan Kangas 2022-07-30 06:30:23 +02:00
commit 76bcbe5f93
2 changed files with 8 additions and 4 deletions

View file

@ -868,7 +868,7 @@ find an alternate phrasing that conveys the meaning.
@item
Try to avoid using abbreviations such as ``e.g.'' (for ``for
example''), ``i.e.'' (for ``that is''), ``no.'' (for ``number''),
``cf.'' (for ``in contrast to'') and ``w.r.t.'' (for ``with respect
``cf.'' (for ``compare''/``see also'') and ``w.r.t.'' (for ``with respect
to'') as much as possible. It is almost always clearer and easier to
read the expanded version.@footnote{We do use these occasionally, but
try not to overdo it.}

View file

@ -1672,9 +1672,13 @@ comment at the start of cc-engine.el for more info."
Return the result of `forward-comment' if it gets called, nil otherwise."
`(if (not comment-end-can-be-escaped)
(forward-comment -1)
(when (and (< (skip-syntax-backward " >") 0)
(eq (char-after) ?\n))
(forward-char))
(let ((dist (skip-syntax-backward " >")))
(when (and
(< dist 0)
(progn
(skip-syntax-forward " " (- (point) dist 1))
(eq (char-after) ?\n)))
(forward-char)))
(cond
((and (eq (char-before) ?\n)
(eq (char-before (1- (point))) ?\\))