From 4125ec7e79f8f95f42cce9ff080f23ebd90b0ae9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 22 May 2000 04:24:01 +0000 Subject: [PATCH] (comment-region-internal): Go back to BEG after quoting the nested comment markers. --- lisp/ChangeLog | 5 ++++- lisp/newcomment.el | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 159a64ed380..737524baa43 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,4 +1,7 @@ -2000-05-21 Stefan Monnier +2000-05-22 Stefan Monnier + + * newcomment.el (comment-region-internal): Go back to BEG after quoting + the nested comment markers. * subr.el (remove-hook): Don't turn the hook's value into a list. diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 223eb5f3ee3..f73b6961888 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -6,7 +6,7 @@ ;; Maintainer: Stefan Monnier ;; Keywords: comment uncomment ;; Version: $Name: $ -;; Revision: $Id: newcomment.el,v 1.11 2000/05/19 15:37:41 monnier Exp $ +;; Revision: $Id: newcomment.el,v 1.12 2000/05/21 00:27:31 monnier Exp $ ;; This file is part of GNU Emacs. @@ -664,8 +664,8 @@ indentation to be kept as it was before narrowing." (defun comment-region-internal (beg end cs ce &optional ccs cce block lines indent) "Comment region BEG..END. -CS and CE are the comment start resp. end string. -CCS and CCE are the comment continuation strings for the start resp. end +CS and CE are the comment start resp end string. +CCS and CCE are the comment continuation strings for the start resp end of lines (default to CS and CE). BLOCK indicates that end of lines should be marked with either CCE, CE or CS \(if CE is empty) and that those markers should be aligned. @@ -702,6 +702,7 @@ rather than at left margin." (comment-quote-nested comment-start comment-end nil) ;; Loop over all lines to find the needed indentations. + (goto-char (point-min)) (while (progn (unless (looking-at "[ \t]*$") @@ -938,6 +939,18 @@ unless optional argument SOFT is non-nil." ;;; Change Log: ;; $Log: newcomment.el,v $ +;; Revision 1.12 2000/05/21 00:27:31 monnier +;; (comment-styles): New `box-multi'. +;; (comment-normalize-vars): Better default for comment-continue to +;; avoid whitespace-only continuations. +;; (comment-search-forward): Always move even in the no-syntax case. +;; (comment-padright): Only obey N if it's only obeyed for padleft. +;; (comment-make-extra-lines): Better handling of empty continuations. +;; Use `=' for the filler if comment-start has only one character. +;; (uncomment-region): Try handling the special `=' filler. +;; (comment-region): Allow LINES even if MULTI is nil. +;; (comment-box): Choose box style based on comment-style. +;; ;; Revision 1.11 2000/05/19 15:37:41 monnier ;; Fix license text and author. ;; Move aliases (indent-for-comment, set-comment-column, kill-comment -- 2.39.5