Show
Ignore:
Timestamp:
08/18/06 08:35:31 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/compare-w.el

    r4058 r4148  
    168168on third call it again advances points to the next difference and so on." 
    169169  (interactive "P") 
     170  (if compare-ignore-whitespace 
     171      (setq ignore-whitespace (not ignore-whitespace))) 
    170172  (let* (p1 p2 maxp1 maxp2 b1 b2 w2 
    171173            (progress 1) 
    172174            (opoint1 (point)) 
    173175            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 
    180178            (sync-func (if (stringp compare-windows-sync) 
    181179                           'compare-windows-sync-regexp 
     
    191189    (setq opoint2 p2) 
    192190    (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))) 
    195206      (push-mark p2 t) 
    196207      (setq maxp2 (point-max))) 
     
    200211      ;; If both windows have whitespace next to point, 
    201212      ;; optionally skip over it. 
    202       (and skip-func 
     213      (and skip-func-1 
    203214           (save-excursion 
    204215             (let (p1a p2a w1 w2 result1 result2) 
    205                (setq result1 (funcall skip-func opoint1)) 
     216               (setq result1 (funcall skip-func-1 opoint1)) 
    206217               (setq p1a (point)) 
    207218               (set-buffer b2) 
    208219               (goto-char p2) 
    209                (setq result2 (funcall skip-func opoint2)) 
     220               (setq result2 (funcall skip-func-2 opoint2)) 
    210221               (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)) 
    213223                   (setq p1 p1a 
    214224                         p2 p2a)))))