summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-07-30 06:30:23 +0200
committerStefan Kangas <stefan@marxist.se>2022-07-30 06:30:23 +0200
commit76bcbe5f930f16014343ae75e92df94c727f30af (patch)
treeb05186dda664417b0abfaca8dc32da00028d5e1e
parent40c0124816969985d00cb7edf55859ef2264d332 (diff)
parente0f54c62ecb72c41a9afc6d6c3e22b1a0b113f11 (diff)
downloademacs-76bcbe5f930f16014343ae75e92df94c727f30af.tar.gz
Merge from origin/emacs-28
e0f54c62ec CC Mode: fontify variables/functions after line comments e... 2c6a94c5b8 ; Correct the meaning of "cf." in tips.texi
-rw-r--r--doc/lispref/tips.texi2
-rw-r--r--lisp/progmodes/cc-engine.el10
2 files changed, 8 insertions, 4 deletions
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index 9faf3f33ba8..3a1f6de12b2 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -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.}
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index cfbb668baeb..bc6155dd668 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -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))) ?\\))