aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/cc-cmds.el
diff options
context:
space:
mode:
authorAlan Mackenzie <[email protected]>2007-01-03 20:19:29 +0000
committerAlan Mackenzie <[email protected]>2007-01-03 20:19:29 +0000
commitfd85cfb794803919757d48ad185f11974dd0c903 (patch)
tree644cae447c89778bc7cdf8dd26a2c5be42068ae9 /lisp/progmodes/cc-cmds.el
parent23f74f538c65b124f318e6453e1c2407546aeb7a (diff)
(c-mask-paragraph): Fix yesterday's buggy patch.
Diffstat (limited to 'lisp/progmodes/cc-cmds.el')
-rw-r--r--lisp/progmodes/cc-cmds.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 04008acdbe..e7bea0e0b2 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -3836,8 +3836,13 @@ command to conveniently insert and align the necessary backslashes."
(setq apply-outside-literal t))
((eq c-lit-type 'c) ; Block comment.
- (when (and (>= end (cdr c-lit-limits))
- (> (point-max) (cdr c-lit-limits)))
+ (when
+ (or (> end (cdr c-lit-limits))
+ (and (= end (cdr c-lit-limits))
+ (eq (char-before end) ?/)
+ (eq (char-before (1- end)) ?*)
+ ;; disallow "/*/"
+ (> (- (cdr c-lit-limits) (car c-lit-limits)) 3)))
;; There is a comment ender, and the region includes it. If
;; it's on its own line, it stays on its own line. If it's got
;; company on the line, it keeps (at least one word of) it.