aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-16 03:40:20 +0000
committerRichard M. Stallman1997-08-16 03:40:20 +0000
commit0f0b1be19986c1373c67152eb759e376cea6c9da (patch)
tree6608c6a0fbf0eb144443f831527be3052ef93daa
parent041ec7f62a5a5b7140c7df4b9390a57f27e0cedc (diff)
downloademacs-0f0b1be19986c1373c67152eb759e376cea6c9da.tar.gz
emacs-0f0b1be19986c1373c67152eb759e376cea6c9da.zip
(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.
-rw-r--r--lisp/progmodes/cc-cmds.el13
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 @@
7;; 1985 Richard M. Stallman 7;; 1985 Richard M. Stallman
8;; Maintainer: cc-mode-help@python.org 8;; Maintainer: cc-mode-help@python.org
9;; Created: 22-Apr-1997 (split from cc-mode.el) 9;; Created: 22-Apr-1997 (split from cc-mode.el)
10;; Version: 5.15 10;; Version: 5.16
11;; Keywords: c languages oop 11;; Keywords: c languages oop
12 12
13;; This file is part of GNU Emacs. 13;; This file is part of GNU Emacs.
@@ -750,7 +750,8 @@ comment."
750;; for proposed new variable comment-line-break-function 750;; for proposed new variable comment-line-break-function
751(defun c-comment-line-break-function (&optional soft) 751(defun c-comment-line-break-function (&optional soft)
752 ;; we currently don't do anything with soft line breaks 752 ;; we currently don't do anything with soft line breaks
753 (if (not c-comment-continuation-stars) 753 (if (or (not c-comment-continuation-stars)
754 (not (c-in-literal)))
754 (indent-new-comment-line soft) 755 (indent-new-comment-line soft)
755 (let ((here (point)) 756 (let ((here (point))
756 (leader c-comment-continuation-stars)) 757 (leader c-comment-continuation-stars))
@@ -775,6 +776,7 @@ comment."
775 (require 'advice) 776 (require 'advice)
776 (defadvice indent-new-comment-line (around c-line-break-advice activate) 777 (defadvice indent-new-comment-line (around c-line-break-advice activate)
777 (if (or (not c-buffer-is-cc-mode) 778 (if (or (not c-buffer-is-cc-mode)
779 (not (c-in-literal))
778 (not c-comment-continuation-stars)) 780 (not c-comment-continuation-stars))
779 ad-do-it 781 ad-do-it
780 (c-comment-line-break-function (ad-get-arg 0))))) 782 (c-comment-line-break-function (ad-get-arg 0)))))
@@ -1252,10 +1254,9 @@ Optional prefix ARG means justify paragraph as well."
1252 (and (looking-at comment-start-skip) 1254 (and (looking-at comment-start-skip)
1253 (setq comment-start-place (point))))) 1255 (setq comment-start-place (point)))))
1254 (re1 "\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$")) 1256 (re1 "\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$"))
1255 (if (and c-double-slash-is-comments-p 1257 (if (save-excursion
1256 (save-excursion 1258 (beginning-of-line)
1257 (beginning-of-line) 1259 (looking-at ".*//"))
1258 (looking-at ".*//")))
1259 (let ((fill-prefix fill-prefix) 1260 (let ((fill-prefix fill-prefix)
1260 ;; Lines containing just a comment start or just an end 1261 ;; Lines containing just a comment start or just an end
1261 ;; should not be filled into paragraphs they are next 1262 ;; should not be filled into paragraphs they are next