Mercurial > emacs
diff lisp/ediff-diff.el @ 36857:f6386773ce30
2001-03-17 Michael Kifer <kifer@cs.sunysb.edu>
* ediff-util.el: Copyright years.
(ediff-choose-syntax-table): New function.
(ediff-setup): Use ediff-choose-syntax-table.
* ediff-init.el (ediff-with-syntax-table): New macro, uses
with-syntax-table.
* ediff.el: Date of last update, copyright years.
* ediff-wind (ediff-setup-control-frame): Nill->nil.
* viper-ex.el (ex-token-list,ex-cmd-execute): Revamped, courtesy
of Scott Bronson.
(ex-cmd-assoc,ex-cmd-one-letr): New functions.
(viper-check-sub,viper-get-ex-command,viper-execute-ex-command):
Deleted functions.
(viper-get-ex-com-subr,viper-ex,ex-mark): Changed to use the new
ex-token-list.
* viper-util.el: Spaces, indentation.
* viper.el: Changed version, modification time.
| author | Michael Kifer <kifer@cs.stonybrook.edu> |
|---|---|
| date | Sat, 17 Mar 2001 18:59:39 +0000 |
| parents | 5d6b76d28b83 |
| children | 7a94f1c588c4 |
line wrap: on
line diff
--- a/lisp/ediff-diff.el Sat Mar 17 16:02:56 2001 +0000 +++ b/lisp/ediff-diff.el Sat Mar 17 18:59:39 2001 +0000 @@ -1256,11 +1256,15 @@ (defun ediff-wordify (beg end in-buffer out-buffer &optional control-buf) - (let (inbuf-syntax-tbl sv-point string) + (let (inbuf-syntax-tbl sv-point diff-string) (save-excursion (set-buffer in-buffer) - (setq inbuf-syntax-tbl (syntax-table)) - (setq string (buffer-substring-no-properties beg end)) + (setq inbuf-syntax-tbl + (if control-buf + (ediff-with-current-buffer control-buf + ediff-syntax-table) + (syntax-table))) + (setq diff-string (buffer-substring-no-properties beg end)) (set-buffer out-buffer) ;; Make sure that temp buff syntax table is the same a the original buf @@ -1268,18 +1272,18 @@ ;; ediff-forward-word depends on the syntax classes of characters. (set-syntax-table inbuf-syntax-tbl) (erase-buffer) - (insert string) + (insert diff-string) (goto-char (point-min)) (skip-chars-forward ediff-whitespace) (delete-region (point-min) (point)) (while (not (eobp)) - ;; eval incontrol buf to let user create local versions for + ;; eval in control buf to let user create local versions for ;; different invocations (if control-buf (funcall - (ediff-with-current-buffer - control-buf ediff-forward-word-function)) + (ediff-with-current-buffer control-buf + ediff-forward-word-function)) (funcall ediff-forward-word-function)) (setq sv-point (point)) (skip-chars-forward ediff-whitespace) @@ -1300,16 +1304,17 @@ ;; goto word #n starting at current position in buffer `buf' -;; For ediff, a word is either a string of a-z,A-Z, incl `-' and `_'; -;; or a string of other non-blanks. A blank is a \n\t\f +;; For ediff, a word is determined by ediff-forward-word-function ;; If `flag' is non-nil, goto the end of the n-th word. (defun ediff-goto-word (n buf &optional flag) ;; remember val ediff-forward-word-function has in ctl buf - (let ((fwd-word-fun ediff-forward-word-function)) + (let ((fwd-word-fun ediff-forward-word-function) + (syntax-tbl ediff-syntax-table)) (ediff-with-current-buffer buf (skip-chars-forward ediff-whitespace) (while (> n 1) - (funcall fwd-word-fun) + (ediff-with-syntax-table syntax-tbl + (funcall fwd-word-fun)) (skip-chars-forward ediff-whitespace) (setq n (1- n))) (if (and flag (> n 0))
