Mercurial > hg > xemacs-beta
diff lisp/cc-mode/cc-cmds.el @ 183:e121b013d1f0 r20-3b18
Import from CVS: tag r20-3b18
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:54:23 +0200 |
parents | bfd6434d15b3 |
children | b405438285a2 |
line wrap: on
line diff
--- a/lisp/cc-mode/cc-cmds.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/cc-mode/cc-cmds.el Mon Aug 13 09:54:23 2007 +0200 @@ -7,7 +7,7 @@ ;; 1985 Richard M. Stallman ;; Maintainer: cc-mode-help@python.org ;; Created: 22-Apr-1997 (split from cc-mode.el) -;; Version: 5.15 +;; Version: 5.16 ;; Keywords: c languages oop ;; This file is part of GNU Emacs. @@ -196,7 +196,8 @@ blink-paren-function (insertion-point (point)) delete-temp-newline - (preserve-p (eq ? (char-syntax (char-before)))) + (preserve-p (and (not (bobp)) + (eq ?\ (char-syntax (char-before))))) ;; shut this up too (c-echo-syntactic-information-p nil) (syntax (progn @@ -749,7 +750,8 @@ ;; for proposed new variable comment-line-break-function (defun c-comment-line-break-function (&optional soft) ;; we currently don't do anything with soft line breaks - (if (not c-comment-continuation-stars) + (if (or (not c-comment-continuation-stars) + (not (c-in-literal))) (indent-new-comment-line soft) (let ((here (point)) (leader c-comment-continuation-stars)) @@ -774,6 +776,7 @@ (require 'advice) (defadvice indent-new-comment-line (around c-line-break-advice activate) (if (or (not c-buffer-is-cc-mode) + (not (c-in-literal)) (not c-comment-continuation-stars)) ad-do-it (c-comment-line-break-function (ad-get-arg 0))))) @@ -1251,10 +1254,9 @@ (and (looking-at comment-start-skip) (setq comment-start-place (point))))) (re1 "\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$")) - (if (and c-double-slash-is-comments-p - (save-excursion - (beginning-of-line) - (looking-at ".*//"))) + (if (save-excursion + (beginning-of-line) + (looking-at ".*//")) (let ((fill-prefix fill-prefix) ;; Lines containing just a comment start or just an end ;; should not be filled into paragraphs they are next