comparison lisp/compare-w.el @ 5005:c762abae3964

(compare-windows-skip-whitespace): Swap the two and's within the or.
author Richard M. Stallman <rms@gnu.org>
date Sun, 14 Nov 1993 02:56:24 +0000
parents 76fb8b35df3f
children ec15948b9458
comparison
equal deleted inserted replaced
5004:1c1661097590 5005:c762abae3964
139 ;; then return t, but don't advance point. 139 ;; then return t, but don't advance point.
140 (defun compare-windows-skip-whitespace (start) 140 (defun compare-windows-skip-whitespace (start)
141 (let ((end (point)) 141 (let ((end (point))
142 (beg (point)) 142 (beg (point))
143 (opoint (point))) 143 (opoint (point)))
144 (while (or (and (/= (point) start) 144 (while (or (and (looking-at compare-windows-whitespace)
145 ;; Consider at least the char before point,
146 ;; unless it is also before START.
147 (= (point) opoint))
148 (and (looking-at compare-windows-whitespace)
149 (<= end (match-end 0)) 145 (<= end (match-end 0))
150 ;; This match goes past END, so advance END. 146 ;; This match goes past END, so advance END.
151 (progn (setq end (match-end 0)) 147 (progn (setq end (match-end 0))
152 (> (point) start)))) 148 (> (point) start)))
149 (and (/= (point) start)
150 ;; Consider at least the char before point,
151 ;; unless it is also before START.
152 (= (point) opoint)))
153 ;; keep going back until whitespace 153 ;; keep going back until whitespace
154 ;; doesn't extend to or past end 154 ;; doesn't extend to or past end
155 (forward-char -1)) 155 (forward-char -1))
156 (setq beg (point)) 156 (setq beg (point))
157 (goto-char end) 157 (goto-char end)