aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kifer <[email protected]>2000-10-29 04:56:45 +0000
committerMichael Kifer <[email protected]>2000-10-29 04:56:45 +0000
commit657f9cb8b7f7c3a9687f3998319ce63346ef13a4 (patch)
tree1ee552a157cf60e2c30151a8341d5bef0d9f9e4d
parent4f490d995d44a68878c1bd7dd0df3be5355b81a8 (diff)
2000-10-29 Michael Kifer <[email protected]>
* viper-cmd.el (viper-preserve-cursor-color): new test that avoids rewrawing the screen when changing cursor color. (viper-insert-state-pre-command-sentinel, viper-replace-state-pre-command-sentinel, viper-replace-state-post-command-sentinel): use viper-preserve-cursor-color. Many functions changed to use viper= instead of = when comparing characters. * viper-util.el (viper-memq-char,viper=): new functions for working with characters. (viper-change-cursor-color): fixed buglet. Many functions changed to use viper= instead of = when comparing characters. * viper.el (viper-insert-state-mode-list): added eshell. * ediff-init.el (ediff-before-setup-hook): new hook. Several typos fixed in various docstrings. * ediff-merg.el (ediff-show-clashes-only): docstring typo fixed. * ediff-nult.el (ediff-before-session-group-setup-hooks): new hook. (ediff-show-meta-buffer): run ediff-before-session-group-setup-hooks. * ediff-util.el (ediff-setup): run ediff-before-setup-hook. (ediff-other-buffer): use selected buffers if in Buffer-menu buffer. (ediff-get-selected-buffers): new function. * ediff-vers.el (ediff-vc-internal,ediff-rcs-internal, ediff-vc-merge-internal,ediff-rcs-merge-internal): use save-window-excursion. * ediff-wind.el (ediff-skip-unsuitable-frames): more robust termination check in while loop. * ediff.el (ediff-get-default-file-name): better defaults when in dired buffer. (ediff-files,ediff-merge-files,ediff-files3, ediff-merge-files-with-ancestor): use ediff-get-default-file-name.
-rw-r--r--lisp/ChangeLog36
-rw-r--r--lisp/ediff-init.el17
-rw-r--r--lisp/ediff-merg.el2
-rw-r--r--lisp/ediff-mult.el13
-rw-r--r--lisp/ediff-util.el81
-rw-r--r--lisp/ediff-vers.el105
-rw-r--r--lisp/ediff-wind.el17
-rw-r--r--lisp/ediff.el42
-rw-r--r--lisp/emulation/viper-cmd.el149
-rw-r--r--lisp/emulation/viper-util.el51
-rw-r--r--lisp/emulation/viper.el7
-rw-r--r--man/ediff.texi32
-rw-r--r--man/viper.texi8
13 files changed, 357 insertions, 203 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 14f51333e6..903612bed0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,39 @@
+2000-10-29 Michael Kifer <[email protected]>
+
+ * viper-cmd.el (viper-preserve-cursor-color): new test that avoids
+ rewrawing the screen when changing cursor color.
+ (viper-insert-state-pre-command-sentinel,
+ viper-replace-state-pre-command-sentinel,
+ viper-replace-state-post-command-sentinel): use
+ viper-preserve-cursor-color.
+ Many functions changed to use viper= instead of = when comparing
+ characters.
+ * viper-util.el (viper-memq-char,viper=): new functions for
+ working with characters.
+ (viper-change-cursor-color): fixed buglet.
+ Many functions changed to use viper= instead of = when comparing
+ characters.
+ * viper.el (viper-insert-state-mode-list): added eshell.
+
+ * ediff-init.el (ediff-before-setup-hook): new hook.
+ Several typos fixed in various docstrings.
+ * ediff-merg.el (ediff-show-clashes-only): docstring typo fixed.
+ * ediff-nult.el (ediff-before-session-group-setup-hooks): new
+ hook.
+ (ediff-show-meta-buffer): run ediff-before-session-group-setup-hooks.
+ * ediff-util.el (ediff-setup): run ediff-before-setup-hook.
+ (ediff-other-buffer): use selected buffers if in Buffer-menu buffer.
+ (ediff-get-selected-buffers): new function.
+ * ediff-vers.el (ediff-vc-internal,ediff-rcs-internal,
+ ediff-vc-merge-internal,ediff-rcs-merge-internal): use
+ save-window-excursion.
+ * ediff-wind.el (ediff-skip-unsuitable-frames): more robust
+ termination check in while loop.
+ * ediff.el (ediff-get-default-file-name): better defaults when in
+ dired buffer.
+ (ediff-files,ediff-merge-files,ediff-files3,
+ ediff-merge-files-with-ancestor): use ediff-get-default-file-name.
+
2000-10-28 Dave Love <[email protected]>
* info.el (Info-fontify-node): Add help-echo for menu items.
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el
index 21416c8ee6..a3e3bcd156 100644
--- a/lisp/ediff-init.el
+++ b/lisp/ediff-init.el
@@ -376,10 +376,17 @@ that Ediff doesn't know about.")
;; Hook variables
+(defcustom ediff-before-setup-hook nil
+ "*Hooks to run before Ediff begins to set up windows and buffers.
+This hook can be used to save the previous window config, which can be restored
+on ediff-quit or ediff-suspend."
+ :type 'hook
+ :group 'ediff-hook)
(defcustom ediff-before-setup-windows-hook nil
"*Hooks to run before Ediff sets its window configuration.
-This can be used to save the previous window config, which can be restored
-on ediff-quit or ediff-suspend."
+This hook is called every time when Ediff arranges its windows.
+This happens each time Ediff detects that the windows were messed up by the
+user."
:type 'hook
:group 'ediff-hook)
(defcustom ediff-after-setup-windows-hook nil
@@ -399,7 +406,7 @@ Can be used to move the frame where it is desired."
:type 'hook
:group 'ediff-hook)
(defcustom ediff-startup-hook nil
- "*Hooks to run in the control buffer after Ediff has been set up."
+ "*Hooks to run in the control buffer after Ediff has been set up and is ready for the job."
:type 'hook
:group 'ediff-hook)
(defcustom ediff-select-hook nil
@@ -777,14 +784,14 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
'display-pixel-height
'x-display-pixel-height)))))
-;; A-list of current-diff-overlay symbols asssociated with buf types
+;; A-list of current-diff-overlay symbols associated with buf types
(defconst ediff-current-diff-overlay-alist
'((A . ediff-current-diff-overlay-A)
(B . ediff-current-diff-overlay-B)
(C . ediff-current-diff-overlay-C)
(Ancestor . ediff-current-diff-overlay-Ancestor)))
-;; A-list of current-diff-face-* symbols asssociated with buf types
+;; A-list of current-diff-face-* symbols associated with buf types
(defconst ediff-current-diff-face-alist
'((A . ediff-current-diff-face-A)
(B . ediff-current-diff-face-B)
diff --git a/lisp/ediff-merg.el b/lisp/ediff-merg.el
index a8752ff52a..92788ae968 100644
--- a/lisp/ediff-merg.el
+++ b/lisp/ediff-merg.el
@@ -80,7 +80,7 @@ STRING4
(defcustom ediff-show-clashes-only nil
"*If t, show only those diff regions where both buffers disagree with the ancestor.
This means that regions that have status prefer-A or prefer-B will be
-skiped over. Nil means show all regions."
+skipped over. Nil means show all regions."
:type 'boolean
:group 'ediff-merge
)
diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el
index 2246426a74..206ef40351 100644
--- a/lisp/ediff-mult.el
+++ b/lisp/ediff-mult.el
@@ -187,7 +187,15 @@ This can be toggled with `ediff-toggle-filename-truncation'."
"*Hooks run just after the registry control panel is set up."
:type 'hook
:group 'ediff-mult)
-(defcustom ediff-session-group-setup-hook nil
+
+(defcustom ediff-before-session-group-setup-hooks nil
+ "*Hooks to run before Ediff arranges the window for group-level operations.
+It is used by commands such as ediff-directories.
+This hook can be used to save the previous window config, which can be restored
+on ediff-quit, ediff-suspend, or ediff-quit-session-group-hook."
+ :type 'hook
+ :group 'ediff-hook)
+(defcustom ediff-after-session-group-setup-hook nil
"*Hooks run just after a meta-buffer controlling a session group, such as
ediff-directories, is run."
:type 'hook
@@ -706,7 +714,7 @@ behavior."
(if (eq ediff-metajob-name 'ediff-registry)
(run-hooks 'ediff-registry-setup-hook)
- (run-hooks 'ediff-session-group-setup-hook))
+ (run-hooks 'ediff-after-session-group-setup-hook))
) ; eval in meta-buffer
meta-buffer))
@@ -1719,6 +1727,7 @@ all marked sessions must be active."
(defun ediff-show-meta-buffer (&optional meta-buf session-number)
"Show the session group buffer."
(interactive)
+ (run-hooks 'ediff-before-directory-setup-hooks)
(let (wind frame silent)
(if meta-buf (setq silent t))
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el
index 03beef1e6c..44c9641718 100644
--- a/lisp/ediff-util.el
+++ b/lisp/ediff-util.el
@@ -254,6 +254,7 @@ to invocation.")
(defun ediff-setup (buffer-A file-A buffer-B file-B buffer-C file-C
startup-hooks setup-parameters
&optional merge-buffer-file)
+ (run-hooks 'ediff-before-setup-hook)
;; ediff-convert-standard-filename puts file names in the form appropriate
;; for the OS at hand.
(setq file-A (ediff-convert-standard-filename (expand-file-name file-A)))
@@ -955,7 +956,7 @@ On a dumb terminal, switches between ASCII highlighting and no highlighting."
(defun ediff-make-or-kill-fine-diffs (arg)
"Compute fine diffs. With negative prefix arg, kill fine diffs.
-In both cases, operates on the currrent difference region."
+In both cases, operates on the current difference region."
(interactive "P")
(ediff-barf-if-not-control-buffer)
(cond ((eq arg '-)
@@ -3459,7 +3460,11 @@ Ediff Control Panel to restore highlighting."
;; EXCL-BUFF-LIST is an exclusion list.
(defun ediff-other-buffer (excl-buff-lst)
(or (listp excl-buff-lst) (setq excl-buff-lst (list excl-buff-lst)))
- (let* ((all-buffers (buffer-list))
+ (let* ((all-buffers (nconc (ediff-get-selected-buffers) (buffer-list)))
+ ;; we compute this the second time because we need to do memq on it
+ ;; later, and nconc above will break it. Either this or use slow
+ ;; append instead of nconc
+ (selected-buffers (ediff-get-selected-buffers))
(prefered-buffer (car all-buffers))
visible-dired-buffers
(excl-buff-name-list
@@ -3488,33 +3493,34 @@ Ediff Control Panel to restore highlighting."
(mapcar
(lambda (x)
(cond ((member (buffer-name x) excl-buff-name-list) nil)
- ((not (ediff-get-visible-buffer-window x)) nil)
- ((eq x prefered-buffer) x)
- ;; if prev selected buffer is dired, look only at
- ;; dired.
- ((eq use-dired-major-mode 'yes)
- (if (eq (ediff-with-current-buffer x major-mode)
- 'dired-mode)
- x nil))
- ((eq (ediff-with-current-buffer x major-mode)
- 'dired-mode)
- (if (null use-dired-major-mode)
- ;; don't know if we must enforce dired.
- ;; Remember this buffer in case
- ;; dired buffs are the only ones visible.
- (setq visible-dired-buffers
- (cons x visible-dired-buffers)))
- ;; skip, if dired is not forced
- nil)
- ((memq (ediff-with-current-buffer x major-mode)
- '(rmail-mode
- vm-mode
- gnus-article-mode
- mh-show-mode))
- x)
- ((string-match "^[ *]" (buffer-name x)) nil)
- ((string= "*scratch*" (buffer-name x)) nil)
- (t x)))
+ ((memq x selected-buffers) x)
+ ((not (ediff-get-visible-buffer-window x)) nil)
+ ((eq x prefered-buffer) x)
+ ;; if prev selected buffer is dired, look only at
+ ;; dired.
+ ((eq use-dired-major-mode 'yes)
+ (if (eq (ediff-with-current-buffer x major-mode)
+ 'dired-mode)
+ x nil))
+ ((eq (ediff-with-current-buffer x major-mode)
+ 'dired-mode)
+ (if (null use-dired-major-mode)
+ ;; don't know if we must enforce dired.
+ ;; Remember this buffer in case
+ ;; dired buffs are the only ones visible.
+ (setq visible-dired-buffers
+ (cons x visible-dired-buffers)))
+ ;; skip, if dired is not forced
+ nil)
+ ((memq (ediff-with-current-buffer x major-mode)
+ '(rmail-mode
+ vm-mode
+ gnus-article-mode
+ mh-show-mode))
+ x)
+ ((string-match "^[ *]" (buffer-name x)) nil)
+ ((string= "*scratch*" (buffer-name x)) nil)
+ (t x)))
all-buffers))
(clean-significant-buffers (delq nil significant-buffers))
less-significant-buffers)
@@ -3547,6 +3553,23 @@ Ediff Control Panel to restore highlighting."
(t "*scratch*"))
))
+
+;; If current buffer is a Buffer-menu buffer, then take the selected buffers
+;; and append the buffer at the cursor to the end.
+;; This list would be the preferred list.
+(defun ediff-get-selected-buffers ()
+ (if (eq major-mode 'Buffer-menu-mode)
+ (let ((lis (condition-case nil
+ (list (Buffer-menu-buffer t))
+ (error))
+ ))
+ (save-excursion
+ (goto-char (point-max))
+ (while (search-backward "\n>" nil t)
+ (forward-char 1)
+ (setq lis (cons (Buffer-menu-buffer t) lis)))
+ lis))
+ ))
;; Construct a unique buffer name.
;; The first one tried is prefixsuffix, then prefix<2>suffix,
diff --git a/lisp/ediff-vers.el b/lisp/ediff-vers.el
index dac4cecef0..aca09b19b2 100644
--- a/lisp/ediff-vers.el
+++ b/lisp/ediff-vers.el
@@ -47,20 +47,21 @@
;; If the current buffer is named `F', the version is named `F.~REV~'.
;; If `F.~REV~' already exists, it is used instead of being re-created.
(let (file1 file2 rev1buf rev2buf)
- (save-excursion
- (vc-version-other-window rev1)
- (setq rev1buf (current-buffer)
- file1 (buffer-file-name)))
- (save-excursion
- (or (string= rev2 "") ; use current buffer
- (vc-version-other-window rev2))
- (setq rev2buf (current-buffer)
- file2 (buffer-file-name)))
- (setq startup-hooks
- (cons `(lambda ()
- (delete-file ,file1)
- (or ,(string= rev2 "") (delete-file ,file2)))
- startup-hooks))
+ (save-window-excursion
+ (save-excursion
+ (vc-version-other-window rev1)
+ (setq rev1buf (current-buffer)
+ file1 (buffer-file-name)))
+ (save-excursion
+ (or (string= rev2 "") ; use current buffer
+ (vc-version-other-window rev2))
+ (setq rev2buf (current-buffer)
+ file2 (buffer-file-name)))
+ (setq startup-hooks
+ (cons `(lambda ()
+ (delete-file ,file1)
+ (or ,(string= rev2 "") (delete-file ,file2)))
+ startup-hooks)))
(ediff-buffers
rev1buf rev2buf
startup-hooks
@@ -107,10 +108,12 @@
(defun ediff-rcs-internal (rev1 rev2 &optional startup-hooks)
;; Run Ediff on versions of the current buffer.
;; If REV2 is "" then use current buffer.
- (let ((rev2buf (if (string= rev2 "")
- (current-buffer)
- (rcs-ediff-view-revision rev2)))
- (rev1buf (rcs-ediff-view-revision rev1)))
+ (let (rev2buf rev1buf)
+ (save-window-excursion
+ (setq rev2buf (if (string= rev2 "")
+ (current-buffer)
+ (rcs-ediff-view-revision rev2))
+ rev1buf (rcs-ediff-view-revision rev1)))
;; rcs.el doesn't create temp version files, so we don't have to delete
;; anything in startup hooks to ediff-buffers
@@ -149,30 +152,31 @@
&optional startup-hooks merge-buffer-file)
;; If ANCESTOR-REV non-nil, merge with ancestor
(let (buf1 buf2 ancestor-buf)
- (save-excursion
- (vc-version-other-window rev1)
- (setq buf1 (current-buffer)))
- (save-excursion
- (or (string= rev2 "")
- (vc-version-other-window rev2))
- (setq buf2 (current-buffer)))
- (if ancestor-rev
- (save-excursion
- (if (string= ancestor-rev "")
- (setq ancestor-rev (vc-workfile-version buffer-file-name)))
- (vc-version-other-window ancestor-rev)
- (setq ancestor-buf (current-buffer))))
- (setq startup-hooks
- (cons
- `(lambda ()
- (delete-file ,(buffer-file-name buf1))
- (or ,(string= rev2 "")
- (delete-file ,(buffer-file-name buf2)))
- (or ,(string= ancestor-rev "")
- ,(not ancestor-rev)
- (delete-file ,(buffer-file-name ancestor-buf)))
- )
- startup-hooks))
+ (save-window-excursion
+ (save-excursion
+ (vc-version-other-window rev1)
+ (setq buf1 (current-buffer)))
+ (save-excursion
+ (or (string= rev2 "")
+ (vc-version-other-window rev2))
+ (setq buf2 (current-buffer)))
+ (if ancestor-rev
+ (save-excursion
+ (if (string= ancestor-rev "")
+ (setq ancestor-rev (vc-workfile-version buffer-file-name)))
+ (vc-version-other-window ancestor-rev)
+ (setq ancestor-buf (current-buffer))))
+ (setq startup-hooks
+ (cons
+ `(lambda ()
+ (delete-file ,(buffer-file-name buf1))
+ (or ,(string= rev2 "")
+ (delete-file ,(buffer-file-name buf2)))
+ (or ,(string= ancestor-rev "")
+ ,(not ancestor-rev)
+ (delete-file ,(buffer-file-name ancestor-buf)))
+ )
+ startup-hooks)))
(if ancestor-rev
(ediff-merge-buffers-with-ancestor
buf1 buf2 ancestor-buf
@@ -186,14 +190,15 @@
startup-hooks merge-buffer-file)
;; If ANCESTOR-REV non-nil, merge with ancestor
(let (buf1 buf2 ancestor-buf)
- (setq buf1 (rcs-ediff-view-revision rev1)
- buf2 (if (string= rev2 "")
- (current-buffer)
- (rcs-ediff-view-revision rev2))
- ancestor-buf (if ancestor-rev
- (if (string= ancestor-rev "")
- (current-buffer)
- (rcs-ediff-view-revision ancestor-rev))))
+ (save-window-excursion
+ (setq buf1 (rcs-ediff-view-revision rev1)
+ buf2 (if (string= rev2 "")
+ (current-buffer)
+ (rcs-ediff-view-revision rev2))
+ ancestor-buf (if ancestor-rev
+ (if (string= ancestor-rev "")
+ (current-buffer)
+ (rcs-ediff-view-revision ancestor-rev)))))
;; rcs.el doesn't create temp version files, so we don't have to delete
;; anything in startup hooks to ediff-buffers
(if ancestor-rev
diff --git a/lisp/ediff-wind.el b/lisp/ediff-wind.el
index 13167ab7a6..cfebeb2b91 100644
--- a/lisp/ediff-wind.el
+++ b/lisp/ediff-wind.el
@@ -151,7 +151,6 @@ In this case, Ediff will use those frames to display these buffers."
'(vertical-scroll-bars . nil) ; Emacs only
'(scrollbar-width . 0) ; XEmacs only
'(menu-bar-lines . 0) ; Emacs only
- '(tool-bar-lines . 0) ; Emacs only
;; don't lower and auto-raise
'(auto-lower . nil)
'(auto-raise . t)
@@ -831,8 +830,14 @@ into icons, regardless of the window manager."
;; create a new splittable frame if none is found
(defun ediff-skip-unsuitable-frames (&optional ok-unsplittable)
(if (ediff-window-display-p)
- (let (last-window)
- (while (and (not (eq (selected-window) last-window))
+ ;;(let (last-window)
+ (let (seen-windows)
+ ;; (memq ... seen-windows) has quadratic behavior,
+ ;; but (eq ... last-window) runs into an emacs bug where next-window
+ ;; gets stuck in a loop if the only frame is the minibuffer.
+ ;;
+ ;;(while (and (not (eq (selected-window) last-window))
+ (while (and (not (memq (selected-window) seen-windows))
(or
(ediff-frame-has-dedicated-windows (selected-frame))
(ediff-frame-iconified-p (selected-frame))
@@ -846,10 +851,12 @@ into icons, regardless of the window manager."
nil
(ediff-frame-unsplittable-p (selected-frame)))))
;; remember where started
- (or last-window (setq last-window (selected-window)))
+ ;;(or last-window (setq last-window (selected-window)))
+ (setq seen-windows (cons (selected-window) seen-windows))
;; try new window
(other-window 1 t))
- (if (eq (selected-window) last-window)
+ ;;(if (eq (selected-window) last-window)
+ (if (memq (selected-window) seen-windows)
;; fed up, no appropriate frame
(progn
(select-frame (make-frame '((unsplittable)))))))))
diff --git a/lisp/ediff.el b/lisp/ediff.el
index efab0dec0d..140a80c684 100644
--- a/lisp/ediff.el
+++ b/lisp/ediff.el
@@ -6,8 +6,8 @@
;; Created: February 2, 1994
;; Keywords: comparing, merging, patching, version control.
-(defconst ediff-version "2.74" "The current version of Ediff")
-(defconst ediff-date "October 31, 1999" "Date of last update")
+(defconst ediff-version "2.75" "The current version of Ediff")
+(defconst ediff-date "October 29, 2000" "Date of last update")
;; This file is part of GNU Emacs.
@@ -163,13 +163,27 @@
(toggle-read-only 1)))
;; Return a plausible default for ediff's first file:
-;; In dired, return the file name under the point, unless it is a directory
-;; If the buffer has a file name, return that file name.
-(defun ediff-get-default-file-name ()
+;; In dired, return the file number FILENO (or 0) in the list
+;; (all-selected-files, filename under the cursor), where directories are
+;; ignored. Otherwise, return DEFAULT file name, if non-nil. Else,
+;; if the buffer is visiting a file, return that file name.
+(defun ediff-get-default-file-name (&optional default fileno)
(cond ((eq major-mode 'dired-mode)
- (let ((f (dired-get-filename nil 'no-error)))
- (if (and (stringp f) (not (file-directory-p f)))
- f)))
+ (let ((current (dired-get-filename nil 'no-error))
+ (marked (condition-case nil
+ (dired-get-marked-files 'no-dir)
+ (error)))
+ aux-list choices result)
+ (or (integerp fileno) (setq fileno 0))
+ (if (stringp default)
+ (setq aux-list (cons default aux-list)))
+ (if (and (stringp current) (not (file-directory-p current)))
+ (setq aux-list (cons current aux-list)))
+ (setq choices (nconc marked aux-list))
+ (setq result (elt choices fileno))
+ (or result
+ default)))
+ ((stringp default) default)
((buffer-file-name (current-buffer))
(file-name-nondirectory (buffer-file-name (current-buffer))))
))
@@ -199,7 +213,7 @@
(file-name-nondirectory f)
dir-B))
file-name-history))
- f))
+ (ediff-get-default-file-name f 1)))
)))
(ediff-files-internal file-A
(if (file-directory-p file-B)
@@ -234,7 +248,7 @@
(file-name-nondirectory f)
dir-B))
file-name-history))
- f)))
+ (ediff-get-default-file-name f 1))))
(ediff-read-file-name "File C to compare"
(setq dir-C (if ediff-use-last-dir
ediff-last-dir-C
@@ -246,7 +260,7 @@
(file-name-nondirectory ff)
dir-C))
file-name-history))
- ff))
+ (ediff-get-default-file-name ff 2)))
)))
(ediff-files-internal file-A
(if (file-directory-p file-B)
@@ -1009,7 +1023,7 @@ Continue anyway? (y/n) "))
(file-name-nondirectory f)
dir-B))
file-name-history))
- f))
+ (ediff-get-default-file-name f 1)))
)))
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
(ediff-files-internal file-A
@@ -1052,7 +1066,7 @@ Continue anyway? (y/n) "))
(file-name-nondirectory f)
dir-B))
file-name-history))
- f)))
+ (ediff-get-default-file-name f 1))))
(ediff-read-file-name "Ancestor file"
(setq dir-ancestor
(if ediff-use-last-dir
@@ -1065,7 +1079,7 @@ Continue anyway? (y/n) "))
(file-name-nondirectory ff)
dir-ancestor))
file-name-history))
- ff))
+ (ediff-get-default-file-name ff 2)))
)))
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
(ediff-files-internal file-A
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 4a0cc5ed3b..b97995b545 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -79,8 +79,11 @@
(nm-p (intern (concat snm "-p")))
(nms (intern (concat snm "s"))))
`(defun ,nm-p (com)
- (consp (memq (if (and (viper-characterp com) (< com 0))
- (- com) com) ,nms)))))
+ (consp (viper-memq-char
+ (if (and (viper-characterp com) (< com 0))
+ (- com) com)
+ ,nms)
+ ))))
;; Variables for defining VI commands
@@ -191,11 +194,19 @@
(viper-move-marker-locally viper-insert-point viper-pre-command-point))
)
-(defsubst viper-insert-state-pre-command-sentinel ()
- (or (memq this-command '(self-insert-command))
+(defsubst viper-preserve-cursor-color ()
+ (or (memq this-command '(self-insert-command
+ viper-del-backward-char-in-insert
+ viper-del-backward-char-in-replace
+ viper-delete-backward-char
+ viper-join-lines
+ viper-delete-char))
(memq (viper-event-key last-command-event)
'(up down left right (meta f) (meta b)
- (control n) (control p) (control f) (control b)))
+ (control n) (control p) (control f) (control b)))))
+
+(defsubst viper-insert-state-pre-command-sentinel ()
+ (or (viper-preserve-cursor-color)
(viper-restore-cursor-color 'after-insert-mode))
(if (and (memq this-command '(dabbrev-expand hippie-expand))
(markerp viper-insert-point)
@@ -218,10 +229,7 @@
;; to speed up, don't change cursor color before self-insert
;; and common move commands
(defsubst viper-replace-state-pre-command-sentinel ()
- (or (memq this-command '(self-insert-command))
- (memq (viper-event-key last-command-event)
- '(up down left right (meta f) (meta b)
- (control n) (control p) (control f) (control b)))
+ (or (viper-preserve-cursor-color)
(viper-restore-cursor-color 'after-replace-mode)))
@@ -248,10 +256,11 @@
;; we set the point outside the replacement region, then the cursor color
;; will remain red. Restoring the default, below, fixes this problem.
;;
- ;; We optimize for self-insert-command's here, since they either don't change
+ ;; We optimize for some commands, like self-insert-command,
+ ;; viper-delete-backward-char, etc., since they either don't change
;; cursor color or, if they terminate replace mode, the color will be changed
;; in viper-finish-change
- (or (memq this-command '(self-insert-command))
+ (or (viper-preserve-cursor-color)
(viper-restore-cursor-color 'after-replace-mode))
(cond
((eq viper-current-state 'replace-state)
@@ -679,7 +688,7 @@
ARG is used as the prefix value for the executed command. If
EVENTS is a list of events, which become the beginning of the command."
(interactive "P")
- (if (= last-command-char ?\\)
+ (if (viper= last-command-char ?\\)
(message "Switched to EMACS state for the next command..."))
(viper-escape-to-state arg events 'emacs-state))
@@ -981,17 +990,17 @@ as a Meta key and any number of multiple escapes is allowed."
;; Get com part of prefix-argument ARG and modify it.
(defun viper-getCom (arg)
(let ((com (viper-getcom arg)))
- (cond ((equal com ?c) ?c)
+ (cond ((viper= com ?c) ?c)
;; Previously, ?c was being converted to ?C, but this prevented
;; multiline replace regions.
- ;;((equal com ?c) ?C)
- ((equal com ?d) ?D)
- ((equal com ?y) ?Y)
+ ;;((viper= com ?c) ?C)
+ ((viper= com ?d) ?D)
+ ((viper= com ?y) ?Y)
(t com))))
;; Compute numeric prefix arg value.
-;; Invoked by EVENT. COM is the command part obtained so far.
+;; Invoked by EVENT-CHAR. COM is the command part obtained so far.
(defun viper-prefix-arg-value (event-char com)
(let ((viper-intermediate-command 'viper-digit-argument)
value func)
@@ -1046,31 +1055,31 @@ as a Meta key and any number of multiple escapes is allowed."
cmd-info
cmd-to-exec-at-end)
(while (and cont
- (memq char
- (list ?c ?d ?y ?! ?< ?> ?= ?# ?r ?R ?\"
- viper-buffer-search-char)))
+ (viper-memq-char char
+ (list ?c ?d ?y ?! ?< ?> ?= ?# ?r ?R ?\"
+ viper-buffer-search-char)))
(if com
;; this means that we already have a command character, so we
;; construct a com list and exit while. however, if char is "
;; it is an error.
(progn
;; new com is (CHAR . OLDCOM)
- (if (memq char '(?# ?\")) (error ""))
+ (if (viper-memq-char char '(?# ?\")) (error ""))
(setq com (cons char com))
(setq cont nil))
;; If com is nil we set com as char, and read more. Again, if char is
;; ", we read the name of register and store it in viper-use-register.
;; if char is !, =, or #, a complete com is formed so we exit the while
;; loop.
- (cond ((memq char '(?! ?=))
+ (cond ((viper-memq-char char '(?! ?=))
(setq com char)
(setq char (read-char))
(setq cont nil))
- ((= char ?#)
+ ((viper= char ?#)
;; read a char and encode it as com
(setq com (+ 128 (read-char)))
(setq char (read-char)))
- ((= char ?\")
+ ((viper= char ?\")
(let ((reg (read-char)))
(if (viper-valid-register reg)
(setq viper-use-register reg)
@@ -1086,7 +1095,7 @@ as a Meta key and any number of multiple escapes is allowed."
;; we prepare the command that will be executed at the end.
(progn
(setq cmd-info (cons value com))
- (while (= char ?U)
+ (while (viper= char ?U)
(viper-describe-arg cmd-info)
(setq char (read-char)))
;; `char' is a movement cmd, a digit arg cmd, or a register cmd---so we
@@ -1094,18 +1103,18 @@ as a Meta key and any number of multiple escapes is allowed."
(or (viper-movement-command-p char)
(viper-digit-command-p char)
(viper-regsuffix-command-p char)
- (= char ?!) ; bang command
+ (viper= char ?!) ; bang command
(error ""))
(setq cmd-to-exec-at-end
(viper-exec-form-in-vi
`(key-binding (char-to-string ,char)))))
;; as com is non-nil, this means that we have a command to execute
- (if (memq (car com) '(?r ?R))
+ (if (viper-memq-char (car com) '(?r ?R))
;; execute apropriate region command.
(let ((char (car com)) (com (cdr com)))
(setq prefix-arg (cons value com))
- (if (= char ?r) (viper-region prefix-arg)
+ (if (viper= char ?r) (viper-region prefix-arg)
(viper-Region prefix-arg))
;; reset prefix-arg
(setq prefix-arg nil))
@@ -1233,7 +1242,7 @@ as a Meta key and any number of multiple escapes is allowed."
(exchange-point-and-mark))
(if (eq (preceding-char) ?\n)
(viper-backward-char-carefully)) ; give back the newline
- (if (= com ?c)
+ (if (viper= com ?c)
(viper-change (mark t) (point))
(viper-change-subr (mark t) (point))))
@@ -1255,7 +1264,7 @@ as a Meta key and any number of multiple escapes is allowed."
(setq viper-use-register nil)))
(delete-region (mark t) (point)))
(open-line 1)
- (if (= com ?C)
+ (if (viper= com ?C)
(viper-change-state-to-insert)
(viper-yank-last-insertion)))
@@ -1364,7 +1373,7 @@ as a Meta key and any number of multiple escapes is allowed."
(exchange-point-and-mark)
(shell-command-on-region
(mark t) (point)
- (if (= com ?!)
+ (if (viper= com ?!)
(setq viper-last-shell-com
(viper-read-string-with-history
"!"
@@ -1388,7 +1397,7 @@ as a Meta key and any number of multiple escapes is allowed."
(viper-enlarge-region (mark t) (point))
(if (> (mark t) (point)) (exchange-point-and-mark))
(indent-rigidly (mark t) (point)
- (if (= com ?>)
+ (if (viper= com ?>)
viper-shift-width
(- viper-shift-width))))
;; return point to where it was before shift
@@ -1446,7 +1455,7 @@ as a Meta key and any number of multiple escapes is allowed."
(if (viper-dotable-command-p com)
(viper-set-destructive-command
(list m-com val
- (if (memq com (list ?c ?C ?!)) (- com) com)
+ (if (viper-memq-char com (list ?c ?C ?!)) (- com) com)
reg nil nil)))
))
@@ -1536,19 +1545,20 @@ invokes the command before that, etc."
;; The hash-command. It is invoked interactively by the key sequence #<char>.
;; The chars that can follow `#' are determined by viper-hash-command-p
(defun viper-special-prefix-com (char)
- (cond ((= char ?c)
+ (cond ((viper= char ?c)
(downcase-region (min viper-com-point (point))
(max viper-com-point (point))))
- ((= char ?C)
+ ((viper= char ?C)
(upcase-region (min viper-com-point (point))
(max viper-com-point (point))))
- ((= char ?g)
+ ((viper= char ?g)
(push-mark viper-com-point t)
(viper-global-execute))
- ((= char ?q)
+ ((viper= char ?q)
(push-mark viper-com-point t)
(viper-quote-region))
- ((= char ?s) (funcall viper-spell-function viper-com-point (point)))
+ ((viper= char ?s)
+ (funcall viper-spell-function viper-com-point (point)))
(t (error "#%c: %s" char viper-InvalidViCommand))))
@@ -1858,7 +1868,7 @@ Undo previous insertion and inserts new."
;; Thie is a temp hook that uses free variables init-message and initial.
;; A dirty feature, but it is the simplest way to have it do the right thing.
-;; The init-message and initial vars come from the scope set by
+;; The INIT-MESSAGE and INITIAL vars come from the scope set by
;; viper-read-string-with-history
(defun viper-minibuffer-standard-hook ()
(if (stringp init-message)
@@ -2054,7 +2064,7 @@ problems."
(com (viper-getcom arg)))
(viper-set-destructive-command (list 'viper-append val ?r nil nil nil))
(if (not (eolp)) (forward-char))
- (if (equal com ?r)
+ (if (viper= com ?r)
(viper-loop val (viper-yank-last-insertion))
(viper-change-state-to-insert))))
@@ -2066,7 +2076,7 @@ problems."
(com (viper-getcom arg)))
(viper-set-destructive-command (list 'viper-Append val ?r nil nil nil))
(end-of-line)
- (if (equal com ?r)
+ (if (viper= com ?r)
(viper-loop val (viper-yank-last-insertion))
(viper-change-state-to-insert))))
@@ -2078,7 +2088,7 @@ problems."
(com (viper-getcom arg)))
(viper-set-destructive-command (list 'viper-Insert val ?r nil nil nil))
(back-to-indentation)
- (if (equal com ?r)
+ (if (viper= com ?r)
(viper-loop val (viper-yank-last-insertion))
(viper-change-state-to-insert))))
@@ -2090,7 +2100,7 @@ problems."
(com (viper-getcom arg)))
(viper-set-destructive-command (list 'viper-open-line val ?r nil nil nil))
(let ((col (current-indentation)))
- (if (equal com ?r)
+ (if (viper= com ?r)
(viper-loop val
(end-of-line)
(newline 1)
@@ -2120,7 +2130,7 @@ problems."
(com (viper-getcom arg)))
(viper-set-destructive-command (list 'viper-Open-line val ?r nil nil nil))
(let ((col (current-indentation)))
- (if (equal com ?r)
+ (if (viper= com ?r)
(viper-loop val
(beginning-of-line)
(open-line 1)
@@ -2151,7 +2161,7 @@ problems."
(com (viper-getcom arg)))
(viper-set-destructive-command
(list 'viper-open-line-at-point val ?r nil nil nil))
- (if (equal com ?r)
+ (if (viper= com ?r)
(viper-loop val
(open-line 1)
(viper-yank-last-insertion))
@@ -2165,7 +2175,7 @@ problems."
(com (viper-getcom arg)))
(push-mark nil t)
(forward-char val)
- (if (equal com ?r)
+ (if (viper= com ?r)
(viper-change-subr (mark t) (point))
(viper-change (mark t) (point)))
(viper-set-destructive-command (list 'viper-substitute val ?r nil nil nil))
@@ -2459,11 +2469,12 @@ These keys are ESC, RET, and LineFeed"
(defun viper-replace-char-subr (com arg)
(let (char)
- (setq char (if (equal com ?r)
+ (setq char (if (viper= com ?r)
viper-d-char
(read-char)))
(let (inhibit-quit) ; preserve consistency of undo-list and iso-accents
- (if (and viper-automatic-iso-accents (memq char '(?' ?\" ?^ ?~)))
+ (if (and viper-automatic-iso-accents
+ (viper-memq-char char '(?' ?\" ?^ ?~)))
;; get European characters
(progn
(viper-set-iso-accents-mode t)
@@ -2635,12 +2646,12 @@ On reaching beginning of line, stop and signal error."
(let ((prev-char (viper-char-at-pos 'backward))
(saved-point (point)))
;; skip non-newline separators backward
- (while (and (not (memq prev-char '(nil \n)))
+ (while (and (not (viper-memq-char prev-char '(nil \n)))
(< lim (point))
;; must be non-newline separator
(if (eq viper-syntax-preference 'strict-vi)
- (memq prev-char '(?\ ?\t))
- (memq (char-syntax prev-char) '(?\ ?-))))
+ (viper-memq-char prev-char '(?\ ?\t))
+ (viper-memq-char (char-syntax prev-char) '(?\ ?-))))
(viper-backward-char-carefully)
(setq prev-char (viper-char-at-pos 'backward)))
@@ -2654,12 +2665,12 @@ On reaching beginning of line, stop and signal error."
;; skip again, but make sure we don't overshoot the limit
(if twice
- (while (and (not (memq prev-char '(nil \n)))
+ (while (and (not (viper-memq-char prev-char '(nil \n)))
(< lim (point))
;; must be non-newline separator
(if (eq viper-syntax-preference 'strict-vi)
- (memq prev-char '(?\ ?\t))
- (memq (char-syntax prev-char) '(?\ ?-))))
+ (viper-memq-char prev-char '(?\ ?\t))
+ (viper-memq-char (char-syntax prev-char) '(?\ ?-))))
(viper-backward-char-carefully)
(setq prev-char (viper-char-at-pos 'backward))))
@@ -2677,10 +2688,10 @@ On reaching beginning of line, stop and signal error."
(if com (viper-move-marker-locally 'viper-com-point (point)))
(viper-forward-word-kernel val)
(if com (progn
- (cond ((memq com (list ?c (- ?c)))
+ (cond ((viper-memq-char com (list ?c (- ?c)))
(viper-separator-skipback-special 'twice viper-com-point))
;; Yank words including the whitespace, but not newline
- ((memq com (list ?y (- ?y)))
+ ((viper-memq-char com (list ?y (- ?y)))
(viper-separator-skipback-special nil viper-com-point))
((viper-dotable-command-p com)
(viper-separator-skipback-special nil viper-com-point)))
@@ -2698,10 +2709,10 @@ On reaching beginning of line, stop and signal error."
(viper-skip-nonseparators 'forward)
(viper-skip-separators t))
(if com (progn
- (cond ((memq com (list ?c (- ?c)))
+ (cond ((viper-memq-char com (list ?c (- ?c)))
(viper-separator-skipback-special 'twice viper-com-point))
;; Yank words including the whitespace, but not newline
- ((memq com (list ?y (- ?y)))
+ ((viper-memq-char com (list ?y (- ?y)))
(viper-separator-skipback-special nil viper-com-point))
((viper-dotable-command-p com)
(viper-separator-skipback-special nil viper-com-point)))
@@ -4217,12 +4228,12 @@ and regexp replace."
(let ((char (read-char)))
(cond ((and (<= ?a char) (<= char ?z))
(point-to-register (1+ (- char ?a))))
- ((= char ?<) (viper-mark-beginning-of-buffer))
- ((= char ?>) (viper-mark-end-of-buffer))
- ((= char ?.) (viper-set-mark-if-necessary))
- ((= char ?,) (viper-cycle-through-mark-ring))
- ((= char ?^) (push-mark viper-saved-mark t t))
- ((= char ?D) (mark-defun))
+ ((viper= char ?<) (viper-mark-beginning-of-buffer))
+ ((viper= char ?>) (viper-mark-end-of-buffer))
+ ((viper= char ?.) (viper-set-mark-if-necessary))
+ ((viper= char ?,) (viper-cycle-through-mark-ring))
+ ((viper= char ?^) (push-mark viper-saved-mark t t))
+ ((viper= char ?D) (mark-defun))
(t (error ""))
)))
@@ -4323,7 +4334,7 @@ One can use `` and '' to temporarily jump 1 step back."
(goto-char viper-com-point)
(viper-change-state-to-vi)
(error "")))))
- ((and (not skip-white) (= char ?`))
+ ((and (not skip-white) (viper= char ?`))
(if com (viper-move-marker-locally 'viper-com-point (point)))
(if (and (viper-same-line (point) viper-last-jump)
(= (point) viper-last-jump-ignore))
@@ -4334,7 +4345,7 @@ One can use `` and '' to temporarily jump 1 step back."
(setq viper-last-jump (point-marker)
viper-last-jump-ignore 0)
(if com (viper-execute-com 'viper-goto-mark nil com)))
- ((and skip-white (= char ?'))
+ ((and skip-white (viper= char ?'))
(if com (viper-move-marker-locally 'viper-com-point (point)))
(if (and (viper-same-line (point) viper-last-jump)
(= (point) viper-last-jump-ignore))
@@ -4437,7 +4448,7 @@ One can use `` and '' to temporarily jump 1 step back."
(princ (format "Register %c contains the string:\n" reg))
(princ text))
))
- ((= ?\] reg)
+ ((viper= ?\] reg)
(viper-next-heading arg))
(t (error
viper-InvalidRegister reg)))))
@@ -4446,9 +4457,9 @@ One can use `` and '' to temporarily jump 1 step back."
"Function called by \[, the brac. View textmarkers and call \[\["
(interactive "P")
(let ((reg (read-char)))
- (cond ((= ?\[ reg)
+ (cond ((viper= ?\[ reg)
(viper-prev-heading arg))
- ((= ?\] reg)
+ ((viper= ?\] reg)
(viper-heading-end arg))
((viper-valid-register reg '(letter))
(let* ((val (get-register (1+ (- reg ?a))))
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el
index 8d7a749d15..393dc4d527 100644
--- a/lisp/emulation/viper-util.el
+++ b/lisp/emulation/viper-util.el
@@ -102,6 +102,25 @@
(symbol-function
(if viper-xemacs-p 'characterp 'integerp)))
+; CHAR is supposed to be a char or an integer; LIST is a list of chars, nil,
+; and negative numbers
+; Check if CHAR is a member by trying to convert into integers, if necessary.
+; Introduced for compatibility with XEmacs, where integers are not the same as
+; chars.
+(defun viper-memq-char (char list)
+ (cond (viper-emacs-p (memq char list))
+ ((null char) (memq char list))
+ ((characterp char) (memq char list))
+ ((integerp char) (memq (int-to-char char) list))
+ (t nil)))
+
+;; Like =, but accommodates null and also is t for eq-objects
+(defun viper= (char char1)
+ (cond ((eq char char1) t)
+ ((and (viper-characterp char) (viper-characterp char1))
+ (= char char1))
+ (t nil)))
+
(defsubst viper-color-display-p ()
(if viper-emacs-p
(x-display-color-p)
@@ -124,8 +143,12 @@
(if (and (viper-window-display-p) (viper-color-display-p)
(stringp new-color) (viper-color-defined-p new-color)
(not (string= new-color (viper-get-cursor-color))))
- (modify-frame-parameters
- (selected-frame) (list (cons 'cursor-color new-color)))))
+ (if viper-emacs-p
+ (modify-frame-parameters
+ (selected-frame) (list (cons 'cursor-color new-color)))
+ (set-frame-property
+ (selected-frame) 'cursor-color (make-color-instance new-color)))
+ ))
;; By default, saves current frame cursor color in the
;; viper-saved-cursor-color-in-replace-mode property of viper-replace-overlay
@@ -701,7 +724,7 @@
(if (not (viper-overlay-p viper-search-overlay))
(progn
(setq viper-search-overlay
- (viper-make-overlay beg end (current-buffer)))
+ (viper-make-overlay (point-min) (point-min) (current-buffer)))
(viper-overlay-put
viper-search-overlay 'priority viper-search-overlay-priority)))
(viper-overlay-put viper-search-overlay 'face nil))
@@ -954,7 +977,7 @@
)))
(if (viper-characterp basis)
(setq basis
- (if (= basis ?\C-?)
+ (if (viper= basis ?\C-?)
(list 'control '\?) ; taking care of an emacs bug
(intern (char-to-string basis)))))
(if mod
@@ -1199,23 +1222,24 @@ This option is appropriate if you like Emacs-style words."
(looking-at (concat "[" viper-strict-ALPHA-chars addl-chars "]"))
(or
;; or one of the additional chars being asked to include
- (memq char (viper-string-to-list addl-chars))
+ (viper-memq-char char (viper-string-to-list addl-chars))
(and
- ;; not one of the excluded word chars
- (not (memq char viper-non-word-characters))
+ ;; not one of the excluded word chars (note:
+ ;; viper-non-word-characters is a list)
+ (not (viper-memq-char char viper-non-word-characters))
;; char of the Viper-word syntax class
- (memq (char-syntax char)
- (viper-string-to-list viper-ALPHA-char-class))))))
+ (viper-memq-char (char-syntax char)
+ (viper-string-to-list viper-ALPHA-char-class))))))
))
(defun viper-looking-at-separator ()
(let ((char (char-after (point))))
(if char
(if (eq viper-syntax-preference 'strict-vi)
- (memq char (viper-string-to-list viper-strict-SEP-chars))
+ (viper-memq-char char (viper-string-to-list viper-strict-SEP-chars))
(or (eq char ?\n) ; RET is always a separator in Vi
- (memq (char-syntax char)
- (viper-string-to-list viper-SEP-char-class)))))
+ (viper-memq-char (char-syntax char)
+ (viper-string-to-list viper-SEP-char-class)))))
))
(defsubst viper-looking-at-alphasep (&optional addl-chars)
@@ -1340,7 +1364,8 @@ This option is appropriate if you like Emacs-style words."
;; of the excluded characters
(if (and (eq syntax-of-char-looked-at ?w)
(not negated-syntax))
- (not (memq char-looked-at viper-non-word-characters))
+ (not (viper-memq-char
+ char-looked-at viper-non-word-characters))
t))
(funcall skip-syntax-func 1)
0)
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index 644bff6705..4d8c74118b 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -8,7 +8,7 @@
;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
-(defconst viper-version "3.08 of October 31, 1999"
+(defconst viper-version "3.09 of October 29, 2000"
"The current version of Viper")
;; This file is part of GNU Emacs.
@@ -443,7 +443,10 @@ unless it is coming up in a wrong Viper state."
:group 'viper-misc)
(defcustom viper-insert-state-mode-list
- '(internal-ange-ftp-mode comint-mode shell-mode)
+ '(internal-ange-ftp-mode
+ comint-mode
+ eshell-mode
+ shell-mode)
"*A list of major modes that should come up in Vi Insert state."
:type '(repeat symbol)
:group 'viper-misc)
diff --git a/man/ediff.texi b/man/ediff.texi
index d655534f05..f0e339b6be 100644
--- a/man/ediff.texi
+++ b/man/ediff.texi
@@ -14,7 +14,7 @@
@synindex fn cp
@synindex pg cp
-@dircategory Emacs
+@dircategory Editors
@direntry
* Ediff: (ediff). A visual interface for comparing and merging programs.
@end direntry
@@ -55,7 +55,7 @@ paragraph not being relevant to the printed manual).
@vskip 0pt plus 1filll
@noindent
-Copyright @copyright{} 1995, 1996, 1997 Free Software Foundation, Inc.
+Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -1077,6 +1077,11 @@ The bulk of customization can be done via the following hooks:
@vindex ediff-load-hook
This hook can be used to change defaults after Ediff is loaded.
+@item ediff-before-setup-hook
+@vindex ediff-before-setup-hook
+Hook that is run just before Ediff rearranges windows to its liking.
+Can be used to save windows configuration.
+
@item ediff-keymap-setup-hook
@vindex ediff-keymap-setup-hook
@vindex ediff-mode-map
@@ -1092,8 +1097,9 @@ of Ediff.
@vindex ediff-before-setup-windows-hook
@vindex ediff-after-setup-windows-hook
These two hooks are called before and after Ediff sets up its window
-configuration. Can be used to save the configuration that existed
-before Ediff starts or for whatever other purposes.
+configuration. These hooks are run each time Ediff rearranges windows to
+its liking. This happens whenever it detects that the user changed the
+windows setup.
@item ediff-suspend-hook
@itemx ediff-quit-hook
@@ -1186,8 +1192,13 @@ set local variables that alter the look of the display.
@vindex ediff-registry-setup-hook
Hooks run after setting up the registry for all active Ediff session.
@xref{Session Groups}, for details.
-@item ediff-session-group-setup-hook
-@vindex ediff-session-group-setup-hook
+@item ediff-before-session-group-setup-hook
+@vindex ediff-before-session-group-setup-hook
+Hooks run before setting up a control panel for a group of related Ediff
+sessions. Can be used, for example, to save window configuration to restore
+later.
+@item ediff-after-session-group-setup-hook
+@vindex ediff-after-session-group-setup-hook
Hooks run after setting up a control panel for a group of related Ediff
sessions. @xref{Session Groups}, for details.
@item ediff-quit-session-group-hook
@@ -2009,10 +2020,9 @@ have to tell Ediff which version control package you are using, e.g.,
@end example
Apart from the standard @file{vc.el}, Ediff supports three other interfaces
-to version control:
-@file{rcs.el}, @file{pcl-cvs.el}, and @file{generic-sc.el}.
-The package @file{rcs.el} is written by Sebastian Kremer
-<sk@@thp.Uni-Koeln.DE> and is available as
+to version control: @file{rcs.el}, @file{pcl-cvs.el} (recently renamed
+pcvs.el), and @file{generic-sc.el}. The package @file{rcs.el} is written
+by Sebastian Kremer <sk@@thp.Uni-Koeln.DE> and is available as
@example
@file{ftp.cs.buffalo.edu:pub/Emacs/rcs.tar.Z}
@file{ftp.uni-koeln.de:/pub/gnu/emacs/rcs.tar.Z}
@@ -2293,6 +2303,7 @@ Mike Long (mike.long@@analog.com),
Martin Maechler (maechler@@stat.math.ethz.ch),
Simon Marshall (simon@@gnu.org),
Richard Mlynarik (mly@@adoc.xerox.com),
+Stefan Monnier (monnier@@cs.yale.edu),
Chris Murphy (murphycm@@sun.aston.ac.uk),
Erik Naggum (erik@@naggum.no),
Eyvind Ness (Eyvind.Ness@@hrp.no),
@@ -2323,6 +2334,7 @@ Jan Vroonhof (vroonhof@@math.ethz.ch),
Philippe Waroquiers (philippe.waroquiers@@eurocontrol.be),
Klaus Weber (gizmo@@zork.north.de),
Ben Wing (ben@@xemacs.org),
+Tom Wurgler (twurgler@@goodyear.com),
Ilya Zakharevich (ilya@@math.ohio-state.edu),
Eli Zaretskii (eliz@@is.elta.co.il)
@end example
diff --git a/man/viper.texi b/man/viper.texi
index a443d552c9..d231e3fcbd 100644
--- a/man/viper.texi
+++ b/man/viper.texi
@@ -6,7 +6,7 @@
@comment @setfilename viper.info
@setfilename ../info/viper
-@dircategory Emacs
+@dircategory Editors
@direntry
* VIPER: (viper). The newest Emacs VI-emulation mode.
(also, A VI Plan for Emacs Rescue
@@ -20,7 +20,7 @@
@titlepage
@title Viper Is a Package for Emacs Rebels
@subtitle a Vi emulator for Emacs
-@subtitle March 1998, Viper Version 3.02 (Polyglot)
+@subtitle October 2000, Viper Version 3.09
@author Michael Kifer (Viper)
@author Aamod Sane (VIP 4.4)
@@ -97,7 +97,7 @@ It is recommended that you read the Overview node. The other nodes may
be visited as needed.
Comments and bug reports are welcome.
-@code{kifer@@cs.emacs.edu} is the current address for Viper bug reports.
+@code{kifer@@cs.sunysb.edu} is the current address for Viper bug reports.
Please use the Ex command @kbd{:submitReport} for this purpose.@refill
@end ifinfo
@@ -4419,6 +4419,7 @@ Many contributors on the net pointed out bugs and suggested a number of
useful features. Here is a (hopefully) complete list of contributors:
@example
+aaronl@@vitelus.com (Aaron Lehmann),
ahg@@panix.com (Al Gelders),
amade@@diagram.fr (Paul-Bernard Amade),
ascott@@fws214.intel.com (Andy Scott),
@@ -4428,6 +4429,7 @@ dave@@hellgate.utah.edu,
dominik@@strw.LeidenUniv.nl (Carsten Dominik),
dwallach@@cs.princeton.edu (Dan Wallach),
dwight@@toolucky.llnl.gov (Dwight Shih),
+dxc@@xprt.net (David X. Callaway),
edmonds@@edmonds.home.cs.ubc.ca (Brian Edmonds),
gviswana@@cs.wisc.edu (Guhan Viswanathan),
gvr@@halcyon.com (George V.@: Reilly),