Changeset 4148 for trunk/lisp/compare-w.el
- Timestamp:
- 08/18/06 08:35:31 (2 years ago)
- Files:
-
- trunk/lisp/compare-w.el (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/compare-w.el
r4058 r4148 168 168 on third call it again advances points to the next difference and so on." 169 169 (interactive "P") 170 (if compare-ignore-whitespace 171 (setq ignore-whitespace (not ignore-whitespace))) 170 172 (let* (p1 p2 maxp1 maxp2 b1 b2 w2 171 173 (progress 1) 172 174 (opoint1 (point)) 173 175 opoint2 174 (skip-func (if (if ignore-whitespace ; XOR 175 (not compare-ignore-whitespace) 176 compare-ignore-whitespace) 177 (if (stringp compare-windows-whitespace) 178 'compare-windows-skip-whitespace 179 compare-windows-whitespace))) 176 skip-func-1 177 skip-func-2 180 178 (sync-func (if (stringp compare-windows-sync) 181 179 'compare-windows-sync-regexp … … 191 189 (setq opoint2 p2) 192 190 (setq maxp1 (point-max)) 193 (save-excursion 194 (set-buffer b2) 191 192 (setq skip-func-1 (if ignore-whitespace 193 (if (stringp compare-windows-whitespace) 194 (lambda (pos) 195 (compare-windows-skip-whitespace pos) 196 t) 197 compare-windows-whitespace))) 198 199 (with-current-buffer b2 200 (setq skip-func-2 (if ignore-whitespace 201 (if (stringp compare-windows-whitespace) 202 (lambda (pos) 203 (compare-windows-skip-whitespace pos) 204 t) 205 compare-windows-whitespace))) 195 206 (push-mark p2 t) 196 207 (setq maxp2 (point-max))) … … 200 211 ;; If both windows have whitespace next to point, 201 212 ;; optionally skip over it. 202 (and skip-func 213 (and skip-func-1 203 214 (save-excursion 204 215 (let (p1a p2a w1 w2 result1 result2) 205 (setq result1 (funcall skip-func opoint1))216 (setq result1 (funcall skip-func-1 opoint1)) 206 217 (setq p1a (point)) 207 218 (set-buffer b2) 208 219 (goto-char p2) 209 (setq result2 (funcall skip-func opoint2))220 (setq result2 (funcall skip-func-2 opoint2)) 210 221 (setq p2a (point)) 211 (if (or (stringp compare-windows-whitespace) 212 (and result1 result2 (eq result1 result2))) 222 (if (and result1 result2 (eq result1 result2)) 213 223 (setq p1 p1a 214 224 p2 p2a)))))
