comparison lisp/simple.el @ 16508:fd19350c1405

(comment-region): With just C-u as arg, delete any number of comment-end delimiters from end of line.
author Richard M. Stallman <rms@gnu.org>
date Sun, 03 Nov 1996 18:23:24 +0000
parents c5ec4ef6203c
children cd1a0e1e6975
comparison
equal deleted inserted replaced
16507:08855b88e955 16508:fd19350c1405
2262 (progn 2262 (progn
2263 (end-of-line) 2263 (end-of-line)
2264 ;; This is questionable if comment-end ends in 2264 ;; This is questionable if comment-end ends in
2265 ;; whitespace. That is pretty brain-damaged, 2265 ;; whitespace. That is pretty brain-damaged,
2266 ;; though. 2266 ;; though.
2267 (skip-chars-backward " \t") 2267 (while (progn (skip-chars-backward " \t")
2268 (if (and (>= (- (point) (point-min)) (length ce)) 2268 (and (>= (- (point) (point-min)) (length ce))
2269 (save-excursion 2269 (save-excursion
2270 (backward-char (length ce)) 2270 (backward-char (length ce))
2271 (looking-at (regexp-quote ce)))) 2271 (looking-at (regexp-quote ce)))))
2272 (delete-char (- (length ce))))) 2272 (delete-char (- (length ce)))))
2273 (let ((count numarg)) 2273 (let ((count numarg))
2274 (while (> 1 (setq count (1+ count))) 2274 (while (> 1 (setq count (1+ count)))
2275 (end-of-line) 2275 (end-of-line)
2276 ;; this is questionable if comment-end ends in whitespace 2276 ;; this is questionable if comment-end ends in whitespace