From: Richard M. Stallman Date: Fri, 4 Feb 1994 01:13:05 +0000 (+0000) Subject: (comment-region): Fix previous change. X-Git-Tag: emacs-19.34~10084 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ee095968e6eec243a912a1e6aff6ed93125824e8;p=emacs.git (comment-region): Fix previous change. --- diff --git a/lisp/simple.el b/lisp/simple.el index 909427aeb96..5acbdaeaf4f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1854,16 +1854,16 @@ not end the comment. Blank lines do not get comments." (backward-char (length ce)) (looking-at (regexp-quote ce)))) (delete-char (- (length ce))))) - (setq count numarg) - (while (> 1 (setq count (1+ count))) - (end-of-line) - ;; this is questionable if comment-end ends in whitespace - ;; that is pretty brain-damaged though - (skip-chars-backward " \t") - (save-excursion - (backward-char (length ce)) - (if (looking-at (regexp-quote ce)) - (delete-char (length ce))))))) + (let ((count numarg)) + (while (> 1 (setq count (1+ count))) + (end-of-line) + ;; this is questionable if comment-end ends in whitespace + ;; that is pretty brain-damaged though + (skip-chars-backward " \t") + (save-excursion + (backward-char (length ce)) + (if (looking-at (regexp-quote ce)) + (delete-char (length ce)))))))) (forward-line 1)) ;; Insert at beginning and at end. (if (looking-at "[ \t]*$") ()