Mercurial > emacs
changeset 75072:48be84ccbef3
(c-mask-paragraph): Fix yesterday's buggy patch.
author | Alan Mackenzie <acm@muc.de> |
---|---|
date | Wed, 03 Jan 2007 20:19:29 +0000 |
parents | 4d82edf1a304 |
children | 483807cc58bd |
files | lisp/progmodes/cc-cmds.el |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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.