diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-08-16 03:40:20 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-08-16 03:40:20 +0000 |
commit | 0f0b1be19986c1373c67152eb759e376cea6c9da (patch) | |
tree | 6608c6a0fbf0eb144443f831527be3052ef93daa /lisp/progmodes/cc-cmds.el | |
parent | 041ec7f62a5a5b7140c7df4b9390a57f27e0cedc (diff) | |
download | emacs-0f0b1be19986c1373c67152eb759e376cea6c9da.tar.gz |
(c-comment-line-break-function): In this function, and the defadvice,
call indent-new-comment-line if not in a comment.
(c-fill-paragraph): Remove conditional on obsolete variable
c-double-slash-is-comments-p.
Diffstat (limited to 'lisp/progmodes/cc-cmds.el')
-rw-r--r-- | lisp/progmodes/cc-cmds.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 46d5747f9d0..2f4780306f0 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -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. @@ -750,7 +750,8 @@ comment." ;; 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)) @@ -775,6 +776,7 @@ comment." (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))))) @@ -1252,10 +1254,9 @@ Optional prefix ARG means justify paragraph as well." (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 |