diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/newcomment.el | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ec3b5cdd686..de6d85c7f8b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-11-28 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * newcomment.el (comment-region-internal): Fix newline insertion | ||
| 4 | in `block' case. | ||
| 5 | |||
| 1 | 2007-11-28 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2007-11-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * pcvs-parse.el (cvs-parse-table): Adjust regexp for resurrections. | 8 | * pcvs-parse.el (cvs-parse-table): Adjust regexp for resurrections. |
diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 2de4fa025fd..1841b51e305 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el | |||
| @@ -969,9 +969,11 @@ INDENT indicates to put CS and CCS at the current indentation of | |||
| 969 | the region rather than at left margin." | 969 | the region rather than at left margin." |
| 970 | ;;(assert (< beg end)) | 970 | ;;(assert (< beg end)) |
| 971 | (let ((no-empty (not (or (eq comment-empty-lines t) | 971 | (let ((no-empty (not (or (eq comment-empty-lines t) |
| 972 | (and comment-empty-lines (zerop (length ce))))))) | 972 | (and comment-empty-lines (zerop (length ce)))))) |
| 973 | ce-sanitized) | ||
| 973 | ;; Sanitize CE and CCE. | 974 | ;; Sanitize CE and CCE. |
| 974 | (if (and (stringp ce) (string= "" ce)) (setq ce nil)) | 975 | (if (and (stringp ce) (string= "" ce)) (setq ce nil)) |
| 976 | (setq ce-sanitized ce) | ||
| 975 | (if (and (stringp cce) (string= "" cce)) (setq cce nil)) | 977 | (if (and (stringp cce) (string= "" cce)) (setq cce nil)) |
| 976 | ;; If CE is empty, multiline cannot be used. | 978 | ;; If CE is empty, multiline cannot be used. |
| 977 | (unless ce (setq ccs nil cce nil)) | 979 | (unless ce (setq ccs nil cce nil)) |
| @@ -988,7 +990,7 @@ the region rather than at left margin." | |||
| 988 | (goto-char end) | 990 | (goto-char end) |
| 989 | ;; If the end is not at the end of a line and the comment-end | 991 | ;; If the end is not at the end of a line and the comment-end |
| 990 | ;; is implicit (i.e. a newline), explicitly insert a newline. | 992 | ;; is implicit (i.e. a newline), explicitly insert a newline. |
| 991 | (unless (or ce (eolp)) (insert "\n") (indent-according-to-mode)) | 993 | (unless (or ce-sanitized (eolp)) (insert "\n") (indent-according-to-mode)) |
| 992 | (comment-with-narrowing beg end | 994 | (comment-with-narrowing beg end |
| 993 | (let ((min-indent (point-max)) | 995 | (let ((min-indent (point-max)) |
| 994 | (max-indent 0)) | 996 | (max-indent 0)) |