summaryrefslogtreecommitdiff
path: root/lisp/ediff-diff.el
diff options
context:
space:
mode:
authorMichael Kifer <kifer@cs.stonybrook.edu>2001-03-17 18:59:39 +0000
committerMichael Kifer <kifer@cs.stonybrook.edu>2001-03-17 18:59:39 +0000
commit4986c2c6c8b786409fb44f740b2e358736145313 (patch)
treea159e994a7ca65985c2e7b03f56ff0e3472071f6 /lisp/ediff-diff.el
parent42b7180c96b3855e62720491ba55e432ca470356 (diff)
downloademacs-4986c2c6c8b786409fb44f740b2e358736145313.tar.gz
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.
Diffstat (limited to 'lisp/ediff-diff.el')
-rw-r--r--lisp/ediff-diff.el27
1 files changed, 16 insertions, 11 deletions
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el
index 3bf2277d6be..79b8b539de9 100644
--- a/lisp/ediff-diff.el
+++ b/lisp/ediff-diff.el
@@ -1256,11 +1256,15 @@ arguments to `skip-chars-forward'."
(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 @@ arguments to `skip-chars-forward'."
;; 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 @@ arguments to `skip-chars-forward'."
;; 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))