[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/newcomment.el,v
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/newcomment.el,v |
Date: |
Wed, 28 Nov 2007 05:20:21 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 07/11/28 05:20:21
Index: newcomment.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/newcomment.el,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -b -r1.108 -r1.109
--- newcomment.el 3 Nov 2007 03:00:32 -0000 1.108
+++ newcomment.el 28 Nov 2007 05:20:21 -0000 1.109
@@ -969,9 +969,11 @@
the region rather than at left margin."
;;(assert (< beg end))
(let ((no-empty (not (or (eq comment-empty-lines t)
- (and comment-empty-lines (zerop (length ce)))))))
+ (and comment-empty-lines (zerop (length ce))))))
+ ce-sanitized)
;; Sanitize CE and CCE.
(if (and (stringp ce) (string= "" ce)) (setq ce nil))
+ (setq ce-sanitized ce)
(if (and (stringp cce) (string= "" cce)) (setq cce nil))
;; If CE is empty, multiline cannot be used.
(unless ce (setq ccs nil cce nil))
@@ -988,7 +990,7 @@
(goto-char end)
;; If the end is not at the end of a line and the comment-end
;; is implicit (i.e. a newline), explicitly insert a newline.
- (unless (or ce (eolp)) (insert "\n") (indent-according-to-mode))
+ (unless (or ce-sanitized (eolp)) (insert "\n")
(indent-according-to-mode))
(comment-with-narrowing beg end
(let ((min-indent (point-max))
(max-indent 0))