comparison lisp/simple.el @ 5767:8fef255fe6b3

(comment-region): Fix previous change.
author Richard M. Stallman <rms@gnu.org>
date Fri, 04 Feb 1994 01:13:05 +0000
parents 5726c18895e3
children 95188ebbb0bc
comparison
equal deleted inserted replaced
5766:27a2ad893b22 5767:8fef255fe6b3
1852 (if (and (>= (- (point) (point-min)) (length ce)) 1852 (if (and (>= (- (point) (point-min)) (length ce))
1853 (save-excursion 1853 (save-excursion
1854 (backward-char (length ce)) 1854 (backward-char (length ce))
1855 (looking-at (regexp-quote ce)))) 1855 (looking-at (regexp-quote ce))))
1856 (delete-char (- (length ce))))) 1856 (delete-char (- (length ce)))))
1857 (setq count numarg) 1857 (let ((count numarg))
1858 (while (> 1 (setq count (1+ count))) 1858 (while (> 1 (setq count (1+ count)))
1859 (end-of-line) 1859 (end-of-line)
1860 ;; this is questionable if comment-end ends in whitespace 1860 ;; this is questionable if comment-end ends in whitespace
1861 ;; that is pretty brain-damaged though 1861 ;; that is pretty brain-damaged though
1862 (skip-chars-backward " \t") 1862 (skip-chars-backward " \t")
1863 (save-excursion 1863 (save-excursion
1864 (backward-char (length ce)) 1864 (backward-char (length ce))
1865 (if (looking-at (regexp-quote ce)) 1865 (if (looking-at (regexp-quote ce))
1866 (delete-char (length ce))))))) 1866 (delete-char (length ce))))))))
1867 (forward-line 1)) 1867 (forward-line 1))
1868 ;; Insert at beginning and at end. 1868 ;; Insert at beginning and at end.
1869 (if (looking-at "[ \t]*$") () 1869 (if (looking-at "[ \t]*$") ()
1870 (insert cs) 1870 (insert cs)
1871 (if (string= "" ce) () 1871 (if (string= "" ce) ()