;;; ediff-util.el --- the core commands and utilities of ediff
-;; Copyright (C) 1994-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2016 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: ediff
(select-window wind)))
(defun ediff-scroll-vertically (&optional arg)
- "Vertically scroll buffers A, B \(and C if appropriate\).
+ "Vertically scroll buffers A, B (and C if appropriate).
With optional argument ARG, scroll ARG lines; otherwise scroll by nearly
the one half of the height of window-A."
(interactive "P")
(defun ediff-scroll-horizontally (&optional arg)
- "Horizontally scroll buffers A, B \(and C if appropriate\).
+ "Horizontally scroll buffers A, B (and C if appropriate).
If an argument is given, that is how many columns are scrolled, else nearly
the width of the A/B/C windows."
(interactive "P")
(defun ediff-jump-to-difference-at-point (arg)
"Go to difference closest to the point in buffer A, B, or C.
-The buffer depends on last command character \(a, b, or c\) that invoked this
+The buffer depends on last command character \(a, b, or c) that invoked this
command. For instance, if the command was `ga' then the point value in buffer
A is used.
With a prefix argument, synchronize all files around the current point position
;;; Copying diffs.
(defun ediff-diff-to-diff (arg &optional keys)
- "Copy buffer-X'th difference region to buffer Y \(X,Y are A, B, or C\).
+ "Copy buffer-X'th difference region to buffer Y (X,Y are A, B, or C).
If numerical prefix argument, copy the difference specified in the arg.
Otherwise, copy the difference given by `ediff-current-difference'.
This command assumes it is bound to a 2-character key sequence, `ab', `ba',
-;; Copy diff N from FROM-BUF-TYPE \(given as A, B or C\) to TO-BUF-TYPE.
+;; Copy diff N from FROM-BUF-TYPE (given as A, B or C) to TO-BUF-TYPE.
;; If optional DO-NOT-SAVE is non-nil, do not save the old value of the
;; target diff. This is used in merging, when constructing the merged
;; version.
(message "%s" messg))
))
-;; Save Nth diff of buffer BUF-TYPE \(A, B, or C\).
+;; Save Nth diff of buffer BUF-TYPE (A, B, or C).
;; That is to say, the Nth diff on the `ediff-killed-diffs-alist'. REG
;; is the region to save. It is redundant here, but is passed anyway, for
;; convenience.
(if this-buf-n-th-diff-saved
(if (yes-or-no-p
- (format
+ (format-message
"You've previously copied diff region %d to buffer %S. Confirm? "
(1+ n) buf-type))
t
"Finish an Ediff session and exit Ediff.
Unselects the selected difference, if any, restores the read-only and modified
flags of the compared file buffers, kills Ediff buffers for this session
-\(but not buffers A, B, C\).
+\(but not buffers A, B, C).
If `ediff-keep-variants' is nil, the user will be asked whether the buffers
-containing the variants should be removed \(if they haven't been modified\).
+containing the variants should be removed \(if they haven't been modified).
If it is t, they will be preserved unconditionally. A prefix argument,
temporarily reverses the meaning of this variable."
(interactive "P")
(B-line (ediff-with-current-buffer ediff-buffer-B
(1+ (count-lines (point-min) (point)))))
C-line)
- (princ (format "\Buffer A's point is on line %d\n" A-line))
- (princ (format "Buffer B's point is on line %d\n" B-line))
+ (princ (format-message "Buffer A's point is on line %d\n" A-line))
+ (princ (format-message "Buffer B's point is on line %d\n" B-line))
(if ediff-3way-job
(progn
(setq C-line (ediff-with-current-buffer ediff-buffer-C
(1+ (count-lines (point-min) (point)))))
- (princ (format "Buffer C's point is on line %d\n" C-line)))))
+ (princ (format-message
+ "Buffer C's point is on line %d\n" C-line)))))
(princ (format "\nCurrent difference number = %S\n"
(cond ((< ediff-current-difference 0) 'start)
(princ
"\nIgnoring regions that match")
(princ
- (format
+ (format-message
"\n\t regexp `%s' in buffer A %S\n\t regexp `%s' in buffer B\n"
ediff-regexp-hide-A ediff-hide-regexp-connective
ediff-regexp-hide-B)))
(princ
"\nFocusing on regions that match")
(princ
- (format
+ (format-message
"\n\t regexp `%s' in buffer A %S\n\t regexp `%s' in buffer B\n"
ediff-regexp-focus-A ediff-focus-regexp-connective
ediff-regexp-focus-B)))
(t (princ "\nSelective browsing via a user-defined method.\n")))
(princ
- (format "\nBugs/suggestions: type `%s' while in Ediff Control Panel."
- (substitute-command-keys "\\[ediff-submit-report]")))
+ (format-message
+ "\nBugs/suggestions: type `%s' while in Ediff Control Panel."
+ (substitute-command-keys "\\[ediff-submit-report]")))
) ; with output
(if (frame-live-p ediff-control-frame)
(ediff-reset-mouse ediff-control-frame))
With prefix argument, `wd' saves plain diff output.
Without an argument, it saves customized diff argument, if available
-\(and plain output, if customized output was not generated\)."
+\(and plain output, if customized output was not generated)."
(interactive "P")
(ediff-barf-if-not-control-buffer)
(ediff-compute-custom-diffs-maybe)
(setq wind (ediff-get-visible-buffer-window cloned-buff))
(select-window wind)
(delete-other-windows)
+ (or (mark) (push-mark))
(ediff-activate-mark)
(split-window-vertically)
(ediff-select-lowest-window)