From: Richard M. Stallman Date: Sun, 3 Nov 1996 18:23:24 +0000 (+0000) Subject: (comment-region): With just C-u as arg, X-Git-Tag: emacs-20.1~3436 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5c8ddcfb2e80329e8ea1f57f52e23731a85b47f3;p=emacs.git (comment-region): With just C-u as arg, delete any number of comment-end delimiters from end of line. --- diff --git a/lisp/simple.el b/lisp/simple.el index f2fb11feeb0..bc4bee00c02 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2264,11 +2264,11 @@ not end the comment. Blank lines do not get comments." ;; This is questionable if comment-end ends in ;; whitespace. That is pretty brain-damaged, ;; though. - (skip-chars-backward " \t") - (if (and (>= (- (point) (point-min)) (length ce)) - (save-excursion - (backward-char (length ce)) - (looking-at (regexp-quote ce)))) + (while (progn (skip-chars-backward " \t") + (and (>= (- (point) (point-min)) (length ce)) + (save-excursion + (backward-char (length ce)) + (looking-at (regexp-quote ce))))) (delete-char (- (length ce))))) (let ((count numarg)) (while (> 1 (setq count (1+ count)))