diff options
| author | Michael Kifer | 2000-05-24 17:31:16 +0000 |
|---|---|---|
| committer | Michael Kifer | 2000-05-24 17:31:16 +0000 |
| commit | 6de3983ff852778ba46ce3ae019b16ded5a14880 (patch) | |
| tree | 33e57713f75020c2db9e41e3f5ebc12567502318 | |
| parent | 8217260645b7930ca09a6efefae40a83edc26f7b (diff) | |
| download | emacs-6de3983ff852778ba46ce3ae019b16ded5a14880.tar.gz emacs-6de3983ff852778ba46ce3ae019b16ded5a14880.zip | |
2000-05-24 Michael Kifer <kifer@cs.sunysb.edu>
* ediff-diff.el (ediff-forward-word): take syntactic word class into
account.
(ediff-test-utility,ediff-diff-mandatory-option,
ediff-reset-diff-options): utilities for proper initialization of
ediff-diff-options and ediff-diff3-options on Windows.
* ediff-init.el (ediff-merge-filename-prefix): new customizable
variable.
* ediff-mult.el (ediff-filegroup-action): use
ediff-merge-filename-prefix.
| -rw-r--r-- | lisp/ChangeLog | 14 | ||||
| -rw-r--r-- | lisp/ediff-diff.el | 51 | ||||
| -rw-r--r-- | lisp/ediff-init.el | 5 | ||||
| -rw-r--r-- | lisp/ediff-mult.el | 8 | ||||
| -rw-r--r-- | man/ediff.texi | 10 | ||||
| -rw-r--r-- | man/viper.texi | 4 |
6 files changed, 79 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f88d60fa654..b0cb1f31168 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,4 +1,18 @@ | |||
| 1 | 2000-05-24 Michael Kifer <kifer@cs.sunysb.edu> | 1 | 2000-05-24 Michael Kifer <kifer@cs.sunysb.edu> |
| 2 | |||
| 3 | * ediff-diff.el (ediff-forward-word): take syntactic word class into | ||
| 4 | account. | ||
| 5 | (ediff-test-utility,ediff-diff-mandatory-option, | ||
| 6 | ediff-reset-diff-options): utilities for proper initialization of | ||
| 7 | ediff-diff-options and ediff-diff3-options on Windows. | ||
| 8 | |||
| 9 | * ediff-init.el (ediff-merge-filename-prefix): new customizable | ||
| 10 | variable. | ||
| 11 | |||
| 12 | * ediff-mult.el (ediff-filegroup-action): use | ||
| 13 | ediff-merge-filename-prefix. | ||
| 14 | |||
| 15 | 2000-05-24 Michael Kifer <kifer@cs.sunysb.edu> | ||
| 2 | 16 | ||
| 3 | * viper-ex.el (ex-write): set selective display to nil. | 17 | * viper-ex.el (ex-write): set selective display to nil. |
| 4 | 18 | ||
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index ac26f522b5d..3311977d581 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el | |||
| @@ -45,6 +45,42 @@ | |||
| 45 | :group 'ediff) | 45 | :group 'ediff) |
| 46 | 46 | ||
| 47 | 47 | ||
| 48 | ;; The following functions needed for setting diff/diff3 options | ||
| 49 | ;; test if diff supports the --binary option | ||
| 50 | (defsubst ediff-test-utility (diff-util option &optional files) | ||
| 51 | (zerop (apply 'call-process | ||
| 52 | (append (list diff-util nil nil nil option) files)))) | ||
| 53 | |||
| 54 | (defun ediff-diff-mandatory-option (diff-util) | ||
| 55 | (let ((file (if (boundp 'null-device) null-device "/dev/null"))) | ||
| 56 | (cond ((not (memq system-type '(ms-dos windows-nt windows-95))) | ||
| 57 | "") | ||
| 58 | ((and (string= diff-util ediff-diff-program) | ||
| 59 | (ediff-test-utility | ||
| 60 | ediff-diff-program "--binary" (list file file))) | ||
| 61 | "--binary") | ||
| 62 | ((and (string= diff-util ediff-diff3-program) | ||
| 63 | (ediff-test-utility | ||
| 64 | ediff-diff3-program "--binary" (list file file file))) | ||
| 65 | "--binary") | ||
| 66 | (t "")))) | ||
| 67 | |||
| 68 | ;; make sure that mandatory options are added even if the user changes | ||
| 69 | ;; ediff-diff-options or ediff-diff3-options in the customization widget | ||
| 70 | (defun ediff-reset-diff-options (symb val) | ||
| 71 | (let* ((diff-program | ||
| 72 | (if (eq symb 'ediff-diff-options) | ||
| 73 | ediff-diff-program | ||
| 74 | ediff-diff3-program)) | ||
| 75 | (mandatory-option (ediff-diff-mandatory-option diff-program)) | ||
| 76 | (spacer (if (string-equal mandatory-option "") "" " "))) | ||
| 77 | (set symb | ||
| 78 | (if (string-match mandatory-option val) | ||
| 79 | val | ||
| 80 | (concat mandatory-option spacer val))) | ||
| 81 | )) | ||
| 82 | |||
| 83 | |||
| 48 | (defcustom ediff-shell | 84 | (defcustom ediff-shell |
| 49 | (cond ((eq system-type 'emx) "cmd") ; OS/2 | 85 | (cond ((eq system-type 'emx) "cmd") ; OS/2 |
| 50 | ((memq system-type '(ms-dos windows-nt windows-95)) | 86 | ((memq system-type '(ms-dos windows-nt windows-95)) |
| @@ -76,11 +112,12 @@ ignore changes whose lines all match RE." | |||
| 76 | "*Program to use for generating the differential of the two files." | 112 | "*Program to use for generating the differential of the two files." |
| 77 | :type 'string | 113 | :type 'string |
| 78 | :group 'ediff-diff) | 114 | :group 'ediff-diff) |
| 79 | (defcustom ediff-diff-options "" | 115 | (defcustom ediff-diff-options "" |
| 80 | "*Options to pass to `ediff-diff-program'. | 116 | "*Options to pass to `ediff-diff-program'. |
| 81 | If diff\(1\) is used as `ediff-diff-program', then the most useful options are | 117 | If diff\(1\) is used as `ediff-diff-program', then the most useful options are |
| 82 | `-w', to ignore space, and `-i', to ignore case of letters. | 118 | `-w', to ignore space, and `-i', to ignore case of letters. |
| 83 | At present, the option `-c' is not allowed." | 119 | At present, the option `-c' is not allowed." |
| 120 | :set 'ediff-reset-diff-options | ||
| 84 | :type 'string | 121 | :type 'string |
| 85 | :group 'ediff-diff) | 122 | :group 'ediff-diff) |
| 86 | 123 | ||
| @@ -105,6 +142,7 @@ Must produce output compatible with Unix's diff3 program." | |||
| 105 | :group 'ediff-diff) | 142 | :group 'ediff-diff) |
| 106 | (defcustom ediff-diff3-options "" | 143 | (defcustom ediff-diff3-options "" |
| 107 | "*Options to pass to `ediff-diff3-program'." | 144 | "*Options to pass to `ediff-diff3-program'." |
| 145 | :set 'ediff-reset-diff-options | ||
| 108 | :type 'string | 146 | :type 'string |
| 109 | :group 'ediff-diff) | 147 | :group 'ediff-diff) |
| 110 | (defcustom ediff-diff3-ok-lines-regexp | 148 | (defcustom ediff-diff3-ok-lines-regexp |
| @@ -1173,8 +1211,7 @@ Used for splitting difference regions into individual words.") | |||
| 1173 | "*Characters constituting white space. | 1211 | "*Characters constituting white space. |
| 1174 | These characters are ignored when differing regions are split into words.") | 1212 | These characters are ignored when differing regions are split into words.") |
| 1175 | 1213 | ||
| 1176 | ;;(defvar ediff-word-1 "a-zA-Z---_`'.?!:" | 1214 | (defvar ediff-word-1 "\\(a-zA-Z---_\\|\w\\)" |
| 1177 | (defvar ediff-word-1 "a-zA-Z---_" | ||
| 1178 | "*Characters that constitute words of type 1. | 1215 | "*Characters that constitute words of type 1. |
| 1179 | More precisely, [ediff-word-1] is a regexp that matches type 1 words. | 1216 | More precisely, [ediff-word-1] is a regexp that matches type 1 words. |
| 1180 | See `ediff-forward-word' for more details.") | 1217 | See `ediff-forward-word' for more details.") |
| @@ -1201,9 +1238,11 @@ See `ediff-forward-word' for more details.") | |||
| 1201 | "Move point one word forward. | 1238 | "Move point one word forward. |
| 1202 | There are four types of words, each of which consists entirely of | 1239 | There are four types of words, each of which consists entirely of |
| 1203 | characters in `ediff-word-1', `ediff-word-2', `ediff-word-3', or | 1240 | characters in `ediff-word-1', `ediff-word-2', `ediff-word-3', or |
| 1204 | `ediff-word-4'. Words are recognized by passing these in turn as the | 1241 | `ediff-word-4'. Words are recognized by passing these one after another as |
| 1205 | argument to `skip-chars-forward'." | 1242 | arguments to `skip-chars-forward'." |
| 1206 | (or (> (skip-chars-forward ediff-word-1) 0) | 1243 | (or (> (+ (skip-chars-forward ediff-word-1) |
| 1244 | (skip-syntax-forward "w")) | ||
| 1245 | 0) | ||
| 1207 | (> (skip-chars-forward ediff-word-2) 0) | 1246 | (> (skip-chars-forward ediff-word-2) 0) |
| 1208 | (> (skip-chars-forward ediff-word-3) 0) | 1247 | (> (skip-chars-forward ediff-word-3) 0) |
| 1209 | (> (skip-chars-forward ediff-word-4) 0) | 1248 | (> (skip-chars-forward ediff-word-4) 0) |
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el index 08490c4c16c..438492032ba 100644 --- a/lisp/ediff-init.el +++ b/lisp/ediff-init.el | |||
| @@ -1206,6 +1206,11 @@ as `ediff-merge-directory' or `ediff-merge-directory-revisions'." | |||
| 1206 | 1206 | ||
| 1207 | ;; file where the result of the merge is to be saved. used internally | 1207 | ;; file where the result of the merge is to be saved. used internally |
| 1208 | (ediff-defvar-local ediff-merge-store-file nil "") | 1208 | (ediff-defvar-local ediff-merge-store-file nil "") |
| 1209 | |||
| 1210 | (defcustom ediff-merge-filename-prefix "merge_" | ||
| 1211 | "*Prefix to be attached to saved merge buffers." | ||
| 1212 | :type 'string | ||
| 1213 | :group 'ediff-merge) | ||
| 1209 | 1214 | ||
| 1210 | (defcustom ediff-no-emacs-help-in-control-buffer nil | 1215 | (defcustom ediff-no-emacs-help-in-control-buffer nil |
| 1211 | "*Non-nil means C-h should not invoke Emacs help in control buffer. | 1216 | "*Non-nil means C-h should not invoke Emacs help in control buffer. |
diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el index 39ffc834d9d..2246426a741 100644 --- a/lisp/ediff-mult.el +++ b/lisp/ediff-mult.el | |||
| @@ -1587,7 +1587,7 @@ all marked sessions must be active." | |||
| 1587 | merge-autostore-dir) | 1587 | merge-autostore-dir) |
| 1588 | (concat | 1588 | (concat |
| 1589 | merge-autostore-dir | 1589 | merge-autostore-dir |
| 1590 | "merge_" | 1590 | ediff-merge-filename-prefix |
| 1591 | (file-name-nondirectory file1)) | 1591 | (file-name-nondirectory file1)) |
| 1592 | )) | 1592 | )) |
| 1593 | ;; make ediff-startup pass | 1593 | ;; make ediff-startup pass |
| @@ -1618,7 +1618,7 @@ all marked sessions must be active." | |||
| 1618 | merge-autostore-dir) | 1618 | merge-autostore-dir) |
| 1619 | (concat | 1619 | (concat |
| 1620 | merge-autostore-dir | 1620 | merge-autostore-dir |
| 1621 | "merge_" | 1621 | ediff-merge-filename-prefix |
| 1622 | (file-name-nondirectory file1))) ) | 1622 | (file-name-nondirectory file1))) ) |
| 1623 | ;; make ediff-startup pass | 1623 | ;; make ediff-startup pass |
| 1624 | ;; ediff-control-buffer back to the meta | 1624 | ;; ediff-control-buffer back to the meta |
| @@ -1647,7 +1647,7 @@ all marked sessions must be active." | |||
| 1647 | merge-autostore-dir) | 1647 | merge-autostore-dir) |
| 1648 | (concat | 1648 | (concat |
| 1649 | merge-autostore-dir | 1649 | merge-autostore-dir |
| 1650 | "merge_" | 1650 | ediff-merge-filename-prefix |
| 1651 | (file-name-nondirectory file1))) ) | 1651 | (file-name-nondirectory file1))) ) |
| 1652 | ;; make ediff-startup pass | 1652 | ;; make ediff-startup pass |
| 1653 | ;; ediff-control-buffer back to the meta | 1653 | ;; ediff-control-buffer back to the meta |
| @@ -1673,7 +1673,7 @@ all marked sessions must be active." | |||
| 1673 | merge-autostore-dir) | 1673 | merge-autostore-dir) |
| 1674 | (concat | 1674 | (concat |
| 1675 | merge-autostore-dir | 1675 | merge-autostore-dir |
| 1676 | "merge_" | 1676 | ediff-merge-filename-prefix |
| 1677 | (file-name-nondirectory file1))) ) | 1677 | (file-name-nondirectory file1))) ) |
| 1678 | (setq ediff-meta-buffer , (current-buffer) | 1678 | (setq ediff-meta-buffer , (current-buffer) |
| 1679 | ediff-meta-session-number | 1679 | ediff-meta-session-number |
diff --git a/man/ediff.texi b/man/ediff.texi index d0832ec68f5..d3d28cd531a 100644 --- a/man/ediff.texi +++ b/man/ediff.texi | |||
| @@ -975,8 +975,8 @@ invoked from a session group. This behavior is implemented in the function | |||
| 975 | necessary. | 975 | necessary. |
| 976 | 976 | ||
| 977 | The variable @code{ediff-autostore-merges} is buffer-local, so it can be | 977 | The variable @code{ediff-autostore-merges} is buffer-local, so it can be |
| 978 | set in a per-buffer manner. Therefore, use @code{setq-default} to globally | 978 | set on a per-buffer basis. Therefore, use @code{setq-default} to change |
| 979 | change this variable. | 979 | this variable globally. |
| 980 | 980 | ||
| 981 | @cindex Multi-file patches | 981 | @cindex Multi-file patches |
| 982 | A multi-file patch is a concatenated output of several runs of the Unix | 982 | A multi-file patch is a concatenated output of several runs of the Unix |
| @@ -1980,6 +1980,12 @@ The variable @code{ediff-autostore-merges} is buffer-local, so it can be | |||
| 1980 | set in a per-buffer manner. Therefore, use @code{setq-default} to globally | 1980 | set in a per-buffer manner. Therefore, use @code{setq-default} to globally |
| 1981 | change this variable. | 1981 | change this variable. |
| 1982 | 1982 | ||
| 1983 | @vindex ediff-merge-filename-prefix | ||
| 1984 | When merge buffers are saved automatically as directed by | ||
| 1985 | @code{ediff-autostore-merges}, Ediff attaches a prefix to each file, as | ||
| 1986 | specified by the variable @code{ediff-merge-filename-prefix}. The default | ||
| 1987 | is @code{merge_}, but this can be changed by the user. | ||
| 1988 | |||
| 1983 | @node Support for Version Control, Customizing the Mode Line, Merging and diff3, Customization | 1989 | @node Support for Version Control, Customizing the Mode Line, Merging and diff3, Customization |
| 1984 | @section Support for Version Control | 1990 | @section Support for Version Control |
| 1985 | 1991 | ||
diff --git a/man/viper.texi b/man/viper.texi index 655a8c5983b..5c5ca62063a 100644 --- a/man/viper.texi +++ b/man/viper.texi | |||
| @@ -2031,7 +2031,8 @@ If you wish to change a Viper binding, you can use the | |||
| 2031 | @code{define-key} command, to modify @code{viper-vi-global-user-map}, | 2031 | @code{define-key} command, to modify @code{viper-vi-global-user-map}, |
| 2032 | @code{viper-insert-global-user-map}, and @code{viper-emacs-global-user-map}, as | 2032 | @code{viper-insert-global-user-map}, and @code{viper-emacs-global-user-map}, as |
| 2033 | explained below. Each of these key maps affects the corresponding Viper state. | 2033 | explained below. Each of these key maps affects the corresponding Viper state. |
| 2034 | The keymap @code{viper-vi-global-user-map} also affects Viper's Replace state. | 2034 | The keymap @code{viper-insert-global-user-map} also affects Viper's Replace |
| 2035 | state. | ||
| 2035 | 2036 | ||
| 2036 | @noindent | 2037 | @noindent |
| 2037 | If you want to | 2038 | If you want to |
| @@ -4442,6 +4443,7 @@ kanze@@gabi-soft.fr (James Kanze), | |||
| 4442 | kin@@isi.com (Kin Cho), | 4443 | kin@@isi.com (Kin Cho), |
| 4443 | kwzh@@gnu.org (Karl Heuer), | 4444 | kwzh@@gnu.org (Karl Heuer), |
| 4444 | lindstro@@biostat.wisc.edu (Mary Lindstrom), | 4445 | lindstro@@biostat.wisc.edu (Mary Lindstrom), |
| 4446 | minakaji@@osaka.email.ne.jp (Mikio Nakajima), | ||
| 4445 | Mark.Bordas@@East.Sun.COM (Mark Bordas), | 4447 | Mark.Bordas@@East.Sun.COM (Mark Bordas), |
| 4446 | meyering@@comco.com (Jim Meyering), | 4448 | meyering@@comco.com (Jim Meyering), |
| 4447 | mrb@@Eng.Sun.COM (Martin Buchholz), | 4449 | mrb@@Eng.Sun.COM (Martin Buchholz), |