summaryrefslogtreecommitdiff
path: root/lisp/ediff-util.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
commit200da69e5136e16e55dc5146484887b70232afb7 (patch)
tree0fd39f397ddd91d41b41a1d7395c093778a29f49 /lisp/ediff-util.el
parent80820a58b9ca5242d021929ed5530cd7fd31accd (diff)
downloademacs-200da69e5136e16e55dc5146484887b70232afb7.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-util.el')
-rw-r--r--lisp/ediff-util.el25
1 files changed, 23 insertions, 2 deletions
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el
index dff95ce4cb8..c26162715c7 100644
--- a/lisp/ediff-util.el
+++ b/lisp/ediff-util.el
@@ -1,6 +1,6 @@
;;; ediff-util.el --- the core commands and utilities of ediff
-;; Copyright (C) 1994, 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.sunysb.edu>
@@ -354,6 +354,8 @@ to invocation.")
ediff-buffer-B buffer-B
ediff-buffer-C buffer-C
ediff-control-buffer control-buffer)
+
+ (ediff-choose-syntax-table)
(setq ediff-control-buffer-suffix
(if (string-match "<[0-9]*>" control-buffer-name)
@@ -3692,7 +3694,26 @@ Mail anyway? (y or n) ")
(ediff-with-current-buffer ctl-buf
(ediff-recenter 'no-rehighlight))))
))
-
+
+
+;; Find an appropriate syntax table for everyone to use
+;; If buffer B is not fundamental or text mode, use its syntax table
+;; Otherwise, use buffer B's.
+;; The syntax mode is used in ediff-forward-word-function
+;; The important thing is that every buffer should use the same syntax table
+;; during the refinement operation
+(defun ediff-choose-syntax-table ()
+ (setq ediff-syntax-table
+ (ediff-with-current-buffer ediff-buffer-A
+ (if (not (memq major-mode
+ '(fundamental-mode text-mode indented-text-mode)))
+ (syntax-table))))
+ (if (not ediff-syntax-table)
+ (setq ediff-syntax-table
+ (ediff-with-current-buffer ediff-buffer-B
+ (syntax-table))))
+ )
+
(defun ediff-deactivate-mark ()
(if ediff-xemacs-p