Mercurial > emacs
diff lisp/ediff-init.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-init.el Sat Mar 17 16:02:56 2001 +0000 +++ b/lisp/ediff-init.el Sat Mar 17 18:59:39 2001 +0000 @@ -519,6 +519,11 @@ ;; where some buffer-objects may be missing. (ediff-defvar-local ediff-killed-diffs-alist nil "") +;; Syntax table to use in ediff-forward-word-function +;; This is chosen by a heuristic. The important thing is for all buffers to +;; have the same syntax table. Which is not too important. +(ediff-defvar-local ediff-syntax-table nil "") + ;; Highlighting (defcustom ediff-before-flag-bol (if ediff-xemacs-p (make-glyph "->>") "->>") @@ -1749,6 +1754,24 @@ fname)) +(if (fboundp 'with-syntax-table) + (fset 'ediff-with-syntax-table 'with-syntax-table) + ;; stolen from subr.el in emacs 21 + (defmacro ediff-with-syntax-table (table &rest body) + (let ((old-table (make-symbol "table")) + (old-buffer (make-symbol "buffer"))) + `(let ((,old-table (syntax-table)) + (,old-buffer (current-buffer))) + (unwind-protect + (progn + (set-syntax-table (copy-syntax-table ,table)) + ,@body) + (save-current-buffer + (set-buffer ,old-buffer) + (set-syntax-table ,old-table))))))) + + + ;;; Local Variables: ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) ;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)