# HG changeset patch # User Alan Mackenzie # Date 1167855569 0 # Node ID 48be84ccbef35244d42a54c2276f4ee6344d3a1b # Parent 4d82edf1a3046242f14b0d816ab3507c9151eaa6 (c-mask-paragraph): Fix yesterday's buggy patch. diff -r 4d82edf1a304 -r 48be84ccbef3 lisp/progmodes/cc-cmds.el --- a/lisp/progmodes/cc-cmds.el Wed Jan 03 20:17:09 2007 +0000 +++ b/lisp/progmodes/cc-cmds.el Wed Jan 03 20:19:29 2007 +0000 @@ -3836,8 +3836,13 @@ (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.