Commit b9fe4732 authored by Michael Kifer's avatar Michael Kifer
Browse files

2001-12-24 Michael Kifer <kifer@cs.sunysb.edu>

	* viper-cmd.el (viper-change-state): Got rid of make-local-hook.
	(viper-special-read-and-insert-char): Make C-m work right in the r
	comand.
	(viper-buffer-search-enable): Fixed format string.

	* viper-ex.el (ex-token-alist): Use ex-set-visited-file-name
	instead of viper-info-on-file.
	(ex-set-visited-file-name): New function.

	* viper.el (viper-emacs-state-mode-list): Added mail-mode.

	* ediff-mult.el (ediff-meta-mark-equal-files): Added optional
	action argument.

	* ediff-init.el: Fixed some doc strings.

	* ediff-util.el (ediff-after-quit-hook-internal): New variable.
	Got rid of make-local-hook.

	* ediff-wind.el (ediff-setup-control-frame): Got rid of
	make-local-hook.
parent ea8d3061
2001-12-24 Michael Kifer <kifer@cs.sunysb.edu>
* viper-cmd.el (viper-change-state): Got rid of make-local-hook.
(viper-special-read-and-insert-char): Make C-m work right in the r
comand.
(viper-buffer-search-enable): Fixed format string.
* viper-ex.el (ex-token-alist): Use ex-set-visited-file-name
instead of viper-info-on-file.
(ex-set-visited-file-name): New function.
* viper.el (viper-emacs-state-mode-list): Added mail-mode.
* ediff-mult.el (ediff-meta-mark-equal-files): Added optional
action argument.
* ediff-init.el: Fixed some doc strings.
* ediff-util.el (ediff-after-quit-hook-internal): New variable.
Got rid of make-local-hook.
* ediff-wind.el (ediff-setup-control-frame): Got rid of
make-local-hook.
2001-12-23 Richard M. Stallman <rms@gnu.org>
 
* term/x-win.el (x-handle-geometry): Put height and width
......
......@@ -590,7 +590,7 @@ highlighted using ASCII flags."
Actually, Ediff restores the scope of visibility that existed at startup.")
(defcustom ediff-keep-variants t
"*nil means that non-modified variant buffers should be removed at the end of the session after some interrogation.
"*nil means prompt to remove unmodified buffers A/B/C at session end.
Supplying a prefix argument to the quit command `q' temporarily reverses the
meaning of this variable."
:type 'boolean
......@@ -1241,7 +1241,7 @@ This property can be toggled interactively."
(defcustom ediff-autostore-merges 'group-jobs-only
"*Save the results of merge jobs automatically.
nil means don't save automatically. t means always save. Anything but nil or t
nil means don't save automatically. t means always save. Anything else
means save automatically only if the merge job is part of a group of jobs, such
as `ediff-merge-directory' or `ediff-merge-directory-revisions'."
:type '(choice (const nil) (const t) (const group-jobs-only))
......
......@@ -2110,10 +2110,17 @@ If this is a session registry buffer then just bury it."
(ediff-update-meta-buffer (current-buffer) 'must-redraw))
(defun ediff-meta-mark-equal-files ()
"Run though the session list and mark identical files.
This is used only for sessions that involve 2 or 3 files at the same time."
;; ACTION is ?h, ?m, ?=: to mark for hiding, mark for operation, or simply
;; indicate which are equal files
(defun ediff-meta-mark-equal-files (&optional action)
"Run through the session list and mark identical files.
This is used only for sessions that involve 2 or 3 files at the same time.
ACTION is an optional argument that can be ?h, ?m, ?=, to mark for hiding, mark
for operation, or simply indicate which are equal files. If it is nil, then
last-command-char is used to decide which action to take."
(interactive)
(if (null action)
(setq action last-command-char))
(let ((list (cdr ediff-meta-list))
marked1 marked2 marked3
fileinfo1 fileinfo2 fileinfo3 elt)
......@@ -2138,9 +2145,9 @@ This is used only for sessions that involve 2 or 3 files at the same time."
(or (ediff-mark-if-equal fileinfo2 fileinfo3)
(setq marked3 nil))))
(if (and marked1 marked2 marked3)
(cond ((eq last-command-char ?h)
(cond ((eq action ?h)
(ediff-mark-session-for-hiding elt 'mark))
((eq last-command-char ?m)
((eq action ?m)
(ediff-mark-session-for-operation elt 'mark))
))
(setq list (cdr list)))
......
......@@ -40,6 +40,8 @@
(defvar mark-active)
(defvar ediff-emacs-p)
(defvar ediff-after-quit-hook-internal nil)
(eval-when-compile
(let ((load-path (cons (expand-file-name ".") load-path)))
(or (featurep 'ediff-init)
......@@ -294,8 +296,6 @@ to invocation.")
(make-local-variable 'ediff-window-setup-function)
(make-local-variable 'ediff-keep-variants)
(make-local-hook 'ediff-after-quit-hook-internal)
;; unwrap set up parameters passed as argument
(while setup-parameters
(set (car (car setup-parameters)) (cdr (car setup-parameters)))
......@@ -317,9 +317,11 @@ to invocation.")
(if (string-match "buffer" (symbol-name ediff-job-name))
(setq ediff-keep-variants t))
(make-local-hook 'pre-command-hook)
(if ediff-xemacs-p
(make-local-hook 'pre-command-hook))
(if (ediff-window-display-p)
(add-hook 'pre-command-hook 'ediff-spy-after-mouse nil t))
(add-hook 'pre-command-hook 'ediff-spy-after-mouse nil 'local))
(setq ediff-mouse-pixel-position (mouse-pixel-position))
;; adjust for merge jobs
......@@ -3845,7 +3847,10 @@ Mail anyway? (y or n) ")
"Toggle profiling Ediff commands."
(interactive)
(ediff-barf-if-not-control-buffer)
(make-local-hook 'post-command-hook)
(if ediff-xemacs-p
(make-local-hook 'post-command-hook))
(let ((pre-hook 'pre-command-hook)
(post-hook 'post-command-hook))
(if (not (equal ediff-command-begin-time '(0 0 0)))
......@@ -3853,8 +3858,8 @@ Mail anyway? (y or n) ")
(remove-hook post-hook 'ediff-calc-command-time)
(setq ediff-command-begin-time '(0 0 0))
(message "Ediff profiling disabled"))
(add-hook pre-hook 'ediff-save-time t t)
(add-hook post-hook 'ediff-calc-command-time nil t)
(add-hook pre-hook 'ediff-save-time t 'local)
(add-hook post-hook 'ediff-calc-command-time nil 'local)
(message "Ediff profiling enabled"))))
(defun ediff-print-diff-vector (diff-vector-var)
......
......@@ -1018,8 +1018,10 @@ into icons, regardless of the window manager."
(if ediff-xemacs-p
(ediff-with-current-buffer ctl-buffer
(make-local-hook 'select-frame-hook)
(add-hook 'select-frame-hook 'ediff-xemacs-select-frame-hook nil t)
(if ediff-xemacs-p
(make-local-hook 'select-frame-hook))
(add-hook
'select-frame-hook 'ediff-xemacs-select-frame-hook nil 'local)
))
(ediff-with-current-buffer ctl-buffer
......
......@@ -298,10 +298,12 @@
;; desirable that viper-pre-command-sentinel is the last hook and
;; viper-post-command-sentinel is the first hook.
(make-local-hook 'viper-after-change-functions)
(make-local-hook 'viper-before-change-functions)
(make-local-hook 'viper-post-command-hooks)
(make-local-hook 'viper-pre-command-hooks)
(if viper-xemacs-p
(progn
(make-local-hook 'viper-after-change-functions)
(make-local-hook 'viper-before-change-functions)
(make-local-hook 'viper-post-command-hooks)
(make-local-hook 'viper-pre-command-hooks)))
(remove-hook 'post-command-hook 'viper-post-command-sentinel)
(add-hook 'post-command-hook 'viper-post-command-sentinel)
......@@ -786,9 +788,15 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to
;; key translation. (Such left-overs are possible if the user
;; types a regular key.)
(let (unread-command-events)
;; The next 2 cmds are intended to prevent the input method
;; The next cmd and viper-set-unread-command-events
;; are intended to prevent the input method
;; from swallowing ^M, ^Q and other special characters
(setq ch (read-char))
;; replace ^M with the newline
(if (eq ch ?\C-m) (setq ch ?\n))
;; Make sure ^V and ^Q work as quotation chars
(if (memq ch '(?\C-v ?\C-q))
(setq ch (read-char)))
(viper-set-unread-command-events ch)
(quail-input-method nil)
......@@ -806,6 +814,11 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to
;; quail-input-method
(let (unread-command-events)
(setq ch (read-char))
;; replace ^M with the newline
(if (eq ch ?\C-m) (setq ch ?\n))
;; Make sure ^V and ^Q work as quotation chars
(if (memq ch '(?\C-v ?\C-q))
(setq ch (read-char)))
(viper-set-unread-command-events ch)
(quail-start-translation nil)
......@@ -818,9 +831,19 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to
))
((and (boundp 'iso-accents-mode) iso-accents-mode)
(setq ch (aref (read-key-sequence nil) 0))
;; replace ^M with the newline
(if (eq ch ?\C-m) (setq ch ?\n))
;; Make sure ^V and ^Q work as quotation chars
(if (memq ch '(?\C-v ?\C-q))
(setq ch (aref (read-key-sequence nil) 0)))
(insert ch))
(t
(setq ch (read-char))
;; replace ^M with the newline
(if (eq ch ?\C-m) (setq ch ?\n))
;; Make sure ^V and ^Q work as quotation chars
(if (memq ch '(?\C-v ?\C-q))
(setq ch (read-char)))
(insert ch))
)
(setq last-command-event
......@@ -2554,12 +2577,9 @@ These keys are ESC, RET, and LineFeed"
(or (eq viper-intermediate-command 'viper-repeat)
(viper-special-read-and-insert-char))
;; Is this needed?
(if (eq char ?\C-m) (setq char ?\n))
(delete-char 1 t)
(setq char (if com viper-d-char (viper-char-at-pos 'backward)))
(if com (insert char))
(setq viper-d-char char)
......@@ -3836,7 +3856,7 @@ Null string will repeat previous search."
(define-key viper-vi-basic-map
(cond ((viper-characterp viper-buffer-search-char)
(char-to-string viper-buffer-search-char))
(t (error "viper-buffer-search-char: wrong value type, %s"
(t (error "viper-buffer-search-char: wrong value type, %S"
viper-buffer-search-char)))
'viper-command-argument)
(aset viper-exec-array viper-buffer-search-char 'viper-exec-buffer-search)
......
......@@ -115,7 +115,7 @@
("customize" (customize-group "viper"))
("delete" (ex-delete))
("edit" (ex-edit))
("file" (viper-info-on-file))
("file" (ex-set-visited-file-name))
("g" "global")
("global" (ex-global nil) is-mashed)
("goto" (ex-goto))
......@@ -2232,6 +2232,25 @@ Type 'mak ' (including the space) to run make with no args."
(kill-buffer " *viper-info*")))
))
;; Without arguments displays info on file. With an arg, sets the visited file
;; name to that arg
(defun ex-set-visited-file-name ()
(viper-get-ex-file)
(if (string= ex-file "")
(viper-info-on-file)
;; If ex-file is a directory, use the file portion of the buffer
;; file name (like ex-write). Do this even if ex-file is a
;; non-existent directory, since set-visited-file-name signals an
;; error on this condition, too.
(if (and (string= (file-name-nondirectory ex-file) "")
buffer-file-name
(not (file-directory-p buffer-file-name)))
(setq ex-file (concat (file-name-as-directory ex-file)
(file-name-nondirectory buffer-file-name))))
(set-visited-file-name ex-file)))
;; display all variables set through :set
(defun ex-show-vars ()
(with-output-to-temp-buffer " *viper-info*"
......
......@@ -426,6 +426,7 @@ widget."
tar-mode
mh-folder-mode
mail-mode
gnus-group-mode
gnus-summary-mode
......
2001-12-24 Michael Kifer <kifer@cs.sunysb.edu>
* ediff.texi: Typos.
* viper.texi: Typos, acknowledgements, updated the :f command.
2001-12-20 Eli Zaretskii <eliz@is.elta.co.il>
* Makefile.in (EMACSSOURCES): Update the list of Emacs manual
......
......@@ -27,7 +27,7 @@
@comment %**end of header (This is for running Texinfo on a region.)
@ifinfo
This file documents Ediff, a comprehensive visual interface to diff
This file documents Ediff, a comprehensive visual interface to Unix diff
and patch utilities.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
......@@ -123,7 +123,7 @@ Furthermore, Ediff is equipped with directory-level capabilities that
allow the user to conveniently launch browsing or merging sessions on
groups of files in two (or three) different directories.
In addition, Ediff can apply a patch to a file and then let you step though
In addition, Ediff can apply a patch to a file and then let you step through
both files, the patched and the original one, simultaneously,
difference-by-difference. You can even apply a patch right out of a mail
buffer, i.e., patches received by mail don't even have to be saved. Since
......@@ -1071,7 +1071,7 @@ set on a per-buffer basis. Therefore, use @code{setq-default} to change
this variable globally.
@cindex Multi-file patches
A multi-file patch is a concatenated output of several runs of the
A multi-file patch is a concatenated output of several runs of the Unix
@code{diff} command (some versions of @code{diff} let you create a
multi-file patch in just one run). Ediff facilitates creation of
multi-file patches as follows. If you are in a session group buffer
......@@ -1821,8 +1821,8 @@ format yet.
@vindex ediff-coding-system-for-read
This variable specifies the coding system to use when reading the output
that the programs @code{diff3} and @code{diff} send to Emacs. The default
is @code{raw-text}, and this should work fine on GNU, Unix, and in most
cases under Windows NT/95/98/2000. There are @code{diff} programs
is @code{raw-text}, and this should work fine in Unix and in most
cases under Windows NT/95/98/2000. There are @code{diff} programs
for which the default option doesn't work under Windows. In such cases,
@code{raw-text-dos} might work. If not, you will have to experiment with
other coding systems or use GNU diff.
......
......@@ -4012,8 +4012,10 @@ Save and kill buffer.
Preserve the file -- autosave buffers.
@item :rec
Recover file from autosave.
@item :f
Print file name and lines.
@item :f [<file>]
without the argument, prints file name and character/line information afout
the currently visited file. With an argument, sets the currently visited
filename to @file{file}.
@item :cd [<dir>]
Set the working directory to <dir> (default home directory).
@item :pwd
......@@ -4451,6 +4453,7 @@ bronson@@trestle.com (Scott Bronson),
cook@@biostat.wisc.edu (Tom Cook),
csdayton@@midway.uchicago.edu (Soren Dayton),
dave@@hellgate.utah.edu,
dm@@scs.cs.nyu.edu (David Mazieres),
dominik@@strw.LeidenUniv.nl (Carsten Dominik),
dwallach@@cs.princeton.edu (Dan Wallach),
dwight@@toolucky.llnl.gov (Dwight Shih),
......@@ -4486,6 +4489,7 @@ roderick@@argon.org (Roderick Schertler),
rxga@@ulysses.att.com,
sawdey@@lcse.umn.edu (Aaron Sawdey),
simonb@@prl.philips.co.uk (Simon Blanchard),
spadgett1@@nc.rr.com (Samuel Padgett),
stephen@@farrell.org (Stephen Farrell),
sudish@@MindSpring.COM (Sudish Joseph),
schwab@@issan.informatik.uni-dortmund.de (Andreas Schwab)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment