diff options
| author | Michael Kifer | 2000-07-06 05:36:21 +0000 |
|---|---|---|
| committer | Michael Kifer | 2000-07-06 05:36:21 +0000 |
| commit | d396e5218f3fc00543852284be85bc3c1db28663 (patch) | |
| tree | c17f5db138ae0ffcb0845191586944dcd36f7ae4 | |
| parent | 5e2dfaa48edd8fc566892fd3e72baa50a7dbe2b4 (diff) | |
| download | emacs-d396e5218f3fc00543852284be85bc3c1db28663.tar.gz emacs-d396e5218f3fc00543852284be85bc3c1db28663.zip | |
2000-07-05 Michael Kifer <kifer@cs.sunysb.edu>
* ediff-diff.el (ediff-wordify): use syntax table.
* ediff-init.el (ediff-has-face-support-p): use
ediff-color-display-p.
(ediff-color-display-p): use display-color-p, changed to defun
from defsubst.
Got rid of special cases for NeXT and OS/2.
* ediff-wind.el (ediff-setup-control-frame): set proper modeline
face.
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/ediff-diff.el | 13 | ||||
| -rw-r--r-- | lisp/ediff-init.el | 51 |
3 files changed, 44 insertions, 31 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 83df703356b..5b96988b6fc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2000-07-05 Michael Kifer <kifer@cs.sunysb.edu> | ||
| 2 | |||
| 3 | * ediff-diff.el (ediff-wordify): use syntax table. | ||
| 4 | * ediff-init.el (ediff-has-face-support-p): use | ||
| 5 | ediff-color-display-p. | ||
| 6 | (ediff-color-display-p): use display-color-p, changed to defun | ||
| 7 | from defsubst. | ||
| 8 | Got rid of special cases for NeXT and OS/2. | ||
| 9 | * ediff-wind.el (ediff-setup-control-frame): set proper modeline | ||
| 10 | face. | ||
| 11 | |||
| 1 | 2000-07-05 Stefan Monnier <monnier@cs.yale.edu> | 12 | 2000-07-05 Stefan Monnier <monnier@cs.yale.edu> |
| 2 | 13 | ||
| 3 | * emacs-lisp/lucid.el: Require CL. | 14 | * emacs-lisp/lucid.el: Require CL. |
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index a7236bd1d35..e6864bf02fe 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el | |||
| @@ -1216,7 +1216,7 @@ Used for splitting difference regions into individual words.") | |||
| 1216 | "*Characters constituting white space. | 1216 | "*Characters constituting white space. |
| 1217 | These characters are ignored when differing regions are split into words.") | 1217 | These characters are ignored when differing regions are split into words.") |
| 1218 | 1218 | ||
| 1219 | (defvar ediff-word-1 "\\(a-zA-Z---_\\|\w\\)" | 1219 | (defvar ediff-word-1 "a-zA-Z---_" |
| 1220 | "*Characters that constitute words of type 1. | 1220 | "*Characters that constitute words of type 1. |
| 1221 | More precisely, [ediff-word-1] is a regexp that matches type 1 words. | 1221 | More precisely, [ediff-word-1] is a regexp that matches type 1 words. |
| 1222 | See `ediff-forward-word' for more details.") | 1222 | See `ediff-forward-word' for more details.") |
| @@ -1253,13 +1253,19 @@ arguments to `skip-chars-forward'." | |||
| 1253 | (> (skip-chars-forward ediff-word-4) 0) | 1253 | (> (skip-chars-forward ediff-word-4) 0) |
| 1254 | )) | 1254 | )) |
| 1255 | 1255 | ||
| 1256 | |||
| 1256 | (defun ediff-wordify (beg end in-buffer out-buffer &optional control-buf) | 1257 | (defun ediff-wordify (beg end in-buffer out-buffer &optional control-buf) |
| 1257 | (let (sv-point string) | 1258 | (let (inbuf-syntax-tbl sv-point string) |
| 1258 | (save-excursion | 1259 | (save-excursion |
| 1259 | (set-buffer in-buffer) | 1260 | (set-buffer in-buffer) |
| 1261 | (setq inbuf-syntax-tbl (syntax-table)) | ||
| 1260 | (setq string (buffer-substring-no-properties beg end)) | 1262 | (setq string (buffer-substring-no-properties beg end)) |
| 1261 | 1263 | ||
| 1262 | (set-buffer out-buffer) | 1264 | (set-buffer out-buffer) |
| 1265 | ;; Make sure that temp buff syntax table is the same a the original buf | ||
| 1266 | ;; syntax tbl, because we use ediff-forward-word in both and | ||
| 1267 | ;; ediff-forward-word depends on the syntax classes of characters. | ||
| 1268 | (set-syntax-table inbuf-syntax-tbl) | ||
| 1263 | (erase-buffer) | 1269 | (erase-buffer) |
| 1264 | (insert string) | 1270 | (insert string) |
| 1265 | (goto-char (point-min)) | 1271 | (goto-char (point-min)) |
| @@ -1271,7 +1277,8 @@ arguments to `skip-chars-forward'." | |||
| 1271 | ;; different invocations | 1277 | ;; different invocations |
| 1272 | (if control-buf | 1278 | (if control-buf |
| 1273 | (funcall | 1279 | (funcall |
| 1274 | (ediff-with-current-buffer control-buf ediff-forward-word-function)) | 1280 | (ediff-with-current-buffer |
| 1281 | control-buf ediff-forward-word-function)) | ||
| 1275 | (funcall ediff-forward-word-function)) | 1282 | (funcall ediff-forward-word-function)) |
| 1276 | (setq sv-point (point)) | 1283 | (setq sv-point (point)) |
| 1277 | (skip-chars-forward ediff-whitespace) | 1284 | (skip-chars-forward ediff-whitespace) |
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el index 7cd3d3da229..ed8cfa29e1e 100644 --- a/lisp/ediff-init.el +++ b/lisp/ediff-init.el | |||
| @@ -63,8 +63,8 @@ that Ediff doesn't know about.") | |||
| 63 | (defun ediff-has-face-support-p () | 63 | (defun ediff-has-face-support-p () |
| 64 | (cond ((ediff-window-display-p)) | 64 | (cond ((ediff-window-display-p)) |
| 65 | (ediff-force-faces) | 65 | (ediff-force-faces) |
| 66 | (ediff-emacs-p (or (x-display-color-p) | 66 | ((ediff-color-display-p)) |
| 67 | (memq (ediff-device-type) '(pc)))) | 67 | (ediff-emacs-p (memq (ediff-device-type) '(pc))) |
| 68 | (ediff-xemacs-p (memq (ediff-device-type) '(tty pc))))) | 68 | (ediff-xemacs-p (memq (ediff-device-type) '(tty pc))))) |
| 69 | 69 | ||
| 70 | (defun ediff-has-toolbar-support-p () | 70 | (defun ediff-has-toolbar-support-p () |
| @@ -739,22 +739,15 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire." | |||
| 739 | ((memq op '(< <=)) t)))) | 739 | ((memq op '(< <=)) t)))) |
| 740 | 740 | ||
| 741 | 741 | ||
| 742 | 742 | (defun ediff-color-display-p () | |
| 743 | ;; A fix for NeXT Step | 743 | (condition-case nil |
| 744 | ;; Should probably be eliminated in later versions. | 744 | (if ediff-emacs-p |
| 745 | (if (and (ediff-window-display-p) (eq (ediff-device-type) 'ns)) | 745 | (if (fboundp 'display-color-p) |
| 746 | (progn | 746 | (display-color-p) |
| 747 | (fset 'x-display-color-p (symbol-function 'ns-display-color-p)) | 747 | (x-display-color-p)) |
| 748 | (fset 'x-color-defined-p (symbol-function 'ns-color-defined-p)) | 748 | (eq (device-class (selected-device)) 'color)) |
| 749 | (fset 'x-display-pixel-height (symbol-function 'ns-display-pixel-height)) | 749 | (error |
| 750 | (fset 'x-display-pixel-width (symbol-function 'ns-display-pixel-width)) | 750 | nil))) |
| 751 | )) | ||
| 752 | |||
| 753 | |||
| 754 | (defsubst ediff-color-display-p () | ||
| 755 | (if ediff-emacs-p | ||
| 756 | (x-display-color-p) | ||
| 757 | (eq (device-class (selected-device)) 'color))) | ||
| 758 | 751 | ||
| 759 | 752 | ||
| 760 | (if (ediff-has-face-support-p) | 753 | (if (ediff-has-face-support-p) |
| @@ -762,12 +755,10 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire." | |||
| 762 | (progn | 755 | (progn |
| 763 | (fset 'ediff-valid-color-p (symbol-function 'valid-color-name-p)) | 756 | (fset 'ediff-valid-color-p (symbol-function 'valid-color-name-p)) |
| 764 | (fset 'ediff-get-face (symbol-function 'get-face))) | 757 | (fset 'ediff-get-face (symbol-function 'get-face))) |
| 765 | ;; Temporary fix for OS/2 port of Emacs | 758 | (fset 'ediff-valid-color-p (symbol-function |
| 766 | ;; pm-win.el in PM-Emacs should be fixed. | 759 | (if (fboundp 'color-defined-p) |
| 767 | (if (eq (ediff-device-type) 'pm) | 760 | 'color-defined-p |
| 768 | (fset 'ediff-valid-color-p | 761 | 'x-color-defined-p))) |
| 769 | (lambda (color) (assoc color pm-color-alist))) | ||
| 770 | (fset 'ediff-valid-color-p (symbol-function 'x-color-defined-p))) | ||
| 771 | (fset 'ediff-get-face (symbol-function 'internal-get-face)))) | 762 | (fset 'ediff-get-face (symbol-function 'internal-get-face)))) |
| 772 | 763 | ||
| 773 | (if (ediff-window-display-p) | 764 | (if (ediff-window-display-p) |
| @@ -777,10 +768,14 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire." | |||
| 777 | (symbol-function 'device-pixel-width)) | 768 | (symbol-function 'device-pixel-width)) |
| 778 | (fset 'ediff-display-pixel-height | 769 | (fset 'ediff-display-pixel-height |
| 779 | (symbol-function 'device-pixel-height))) | 770 | (symbol-function 'device-pixel-height))) |
| 780 | (fset 'ediff-display-pixel-width | 771 | (fset 'ediff-display-pixel-width (symbol-function |
| 781 | (symbol-function 'x-display-pixel-width)) | 772 | (if (fboundp 'display-pixel-width) |
| 782 | (fset 'ediff-display-pixel-height | 773 | 'display-pixel-width |
| 783 | (symbol-function 'x-display-pixel-height)))) | 774 | 'x-display-pixel-width))) |
| 775 | (fset 'ediff-display-pixel-height (symbol-function | ||
| 776 | (if (fboundp 'display-pixel-height) | ||
| 777 | 'display-pixel-height | ||
| 778 | 'x-display-pixel-height))))) | ||
| 784 | 779 | ||
| 785 | ;; A-list of current-diff-overlay symbols asssociated with buf types | 780 | ;; A-list of current-diff-overlay symbols asssociated with buf types |
| 786 | (defconst ediff-current-diff-overlay-alist | 781 | (defconst ediff-current-diff-overlay-alist |