2019-06-21 05:16:54 +00:00
|
|
|
|
;;; ediff.el --- a comprehensive visual interface to diff & patch -*- lexical-binding:t -*-
|
1996-01-14 07:34:30 +00:00
|
|
|
|
|
2022-01-01 07:45:51 +00:00
|
|
|
|
;; Copyright (C) 1994-2022 Free Software Foundation, Inc.
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
|
1994-05-02 05:16:59 +00:00
|
|
|
|
;; Created: February 2, 1994
|
* lisp/finder.el (finder-known-keywords): Add keyword "vc"
for version control.
* add-log.el, cvs-status.el, diff.el, diff-mode.el, ediff.el,
* emerge.el, log-edit.el, log-view.el, pcvs.el, smerge-mode.el,
* vc-annotate.el, vc-bzr.el, vc-dir.el, vc-dispatcher.el, vc-git.el,
* vc-hg.el, vc-mtn.el, vc.el: Add keyword "vc".
2010-06-11 19:09:57 +00:00
|
|
|
|
;; Keywords: comparing, merging, patching, vc, tools, unix
|
2019-05-09 12:47:26 +00:00
|
|
|
|
;; Version: 2.81.6
|
2021-09-14 05:55:56 +00:00
|
|
|
|
(defconst ediff-version "2.81.6" "The current version of Ediff.")
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
2008-04-16 14:10:34 +00:00
|
|
|
|
;; Yoni Rabkin <yoni@rabkins.net> contacted the maintainer of this
|
|
|
|
|
;; file on 20/3/2008, and the maintainer agreed that when a bug is
|
|
|
|
|
;; filed in the Emacs bug reporting system against this file, a copy
|
|
|
|
|
;; of the bug report be sent to the maintainer's email address.
|
|
|
|
|
|
1994-05-02 05:16:59 +00:00
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
2008-05-06 08:06:51 +00:00
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
1994-05-02 05:16:59 +00:00
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 08:06:51 +00:00
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2017-09-13 22:52:52 +00:00
|
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;; Never read that diff output again!
|
1996-06-22 01:54:34 +00:00
|
|
|
|
;; Apply patch interactively!
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;; Merge with ease!
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
1994-07-20 20:04:47 +00:00
|
|
|
|
;; This package provides a convenient way of simultaneous browsing through
|
1995-06-05 23:41:43 +00:00
|
|
|
|
;; the differences between a pair (or a triple) of files or buffers. The
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;; files being compared, file-A, file-B, and file-C (if applicable) are
|
|
|
|
|
;; shown in separate windows (side by side, one above the another, or in
|
|
|
|
|
;; separate frames), and the differences are highlighted as you step
|
|
|
|
|
;; through them. You can also copy difference regions from one buffer to
|
|
|
|
|
;; another (and recover old differences if you change your mind).
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
1995-10-06 01:01:08 +00:00
|
|
|
|
;; Ediff also supports merging operations on files and buffers, including
|
1999-11-01 07:16:15 +00:00
|
|
|
|
;; merging using ancestor versions. Both comparison and merging operations can
|
1995-10-06 01:01:08 +00:00
|
|
|
|
;; be performed on directories, i.e., by pairwise comparison of files in those
|
|
|
|
|
;; directories.
|
|
|
|
|
|
1994-05-02 05:16:59 +00:00
|
|
|
|
;; In addition, Ediff can apply a patch to a file and then let you step
|
1994-07-20 20:04:47 +00:00
|
|
|
|
;; though both files, the patched and the original one, simultaneously,
|
1994-05-02 05:16:59 +00:00
|
|
|
|
;; 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 Ediff lets you copy differences between buffers, you can, in
|
|
|
|
|
;; effect, apply patches selectively (i.e., you can copy a difference
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;; region from file_orig to file, thereby undoing any particular patch that
|
1994-05-02 05:16:59 +00:00
|
|
|
|
;; you don't like).
|
|
|
|
|
|
1995-06-05 23:41:43 +00:00
|
|
|
|
;; Ediff is aware of version control, which lets the user compare
|
1999-11-01 07:16:15 +00:00
|
|
|
|
;; files with their older versions. Ediff can also work with remote and
|
|
|
|
|
;; compressed files. Details are given below.
|
1995-06-05 23:41:43 +00:00
|
|
|
|
|
1996-06-22 01:54:34 +00:00
|
|
|
|
;; Finally, Ediff supports directory-level comparison, merging and patching.
|
2014-06-29 02:33:50 +00:00
|
|
|
|
;; See the Ediff manual for details.
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
1995-10-06 01:01:08 +00:00
|
|
|
|
;; This package builds upon the ideas borrowed from emerge.el and several
|
1999-11-01 07:16:15 +00:00
|
|
|
|
;; Ediff's functions are adaptations from emerge.el. Much of the functionality
|
1995-10-06 01:01:08 +00:00
|
|
|
|
;; Ediff provides is also influenced by emerge.el.
|
|
|
|
|
|
1999-11-01 07:16:15 +00:00
|
|
|
|
;; The present version of Ediff supersedes Emerge. It provides a superior user
|
|
|
|
|
;; interface and has numerous major features not found in Emerge. In
|
1995-10-06 01:01:08 +00:00
|
|
|
|
;; particular, it can do patching, and 2-way and 3-way file comparison,
|
|
|
|
|
;; merging, and directory operations.
|
1994-07-20 20:04:47 +00:00
|
|
|
|
|
1996-02-16 06:36:35 +00:00
|
|
|
|
|
|
|
|
|
|
1994-05-02 05:16:59 +00:00
|
|
|
|
;;; Bugs:
|
|
|
|
|
|
1999-11-01 07:16:15 +00:00
|
|
|
|
;; 1. The undo command doesn't restore deleted regions well. That is, if
|
1994-05-02 05:16:59 +00:00
|
|
|
|
;; you delete all characters in a difference region and then invoke
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;; `undo', the reinstated text will most likely be inserted outside of
|
2019-10-28 14:55:10 +00:00
|
|
|
|
;; what Ediff thinks is the current difference region.
|
1994-05-10 00:48:00 +00:00
|
|
|
|
;;
|
|
|
|
|
;; If at any point you feel that difference regions are no longer correct,
|
|
|
|
|
;; you can hit '!' to recompute the differences.
|
|
|
|
|
|
1995-06-05 23:41:43 +00:00
|
|
|
|
;; 2. On a monochrome display, the repertoire of faces with which to
|
1999-11-01 07:16:15 +00:00
|
|
|
|
;; highlight fine differences is limited. By default, Ediff is using
|
|
|
|
|
;; underlining. However, if the region is already underlined by some other
|
1994-05-10 00:48:00 +00:00
|
|
|
|
;; overlays, there is no simple way to temporarily remove that residual
|
1999-11-01 07:16:15 +00:00
|
|
|
|
;; underlining. This problem occurs when a buffer is highlighted with
|
2022-08-16 14:38:33 +00:00
|
|
|
|
;; font-lock.el. If this residual highlighting gets in the way, you
|
|
|
|
|
;; can use the font-lock.el commands for unhighlighting buffers.
|
|
|
|
|
;; Either place these commands in `ediff-prepare-buffer-hook' (which will
|
|
|
|
|
;; unhighlight every buffer used by Ediff) or execute them
|
|
|
|
|
;; interactively, which you can do at any time and in any buffer.
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
1996-02-16 06:36:35 +00:00
|
|
|
|
|
2012-07-25 05:48:19 +00:00
|
|
|
|
;;; Acknowledgments:
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
1995-10-06 01:01:08 +00:00
|
|
|
|
;; Ediff was inspired by Dale R. Worley's <drw@math.mit.edu> emerge.el.
|
|
|
|
|
;; Ediff would not have been possible without the help and encouragement of
|
1999-11-01 07:16:15 +00:00
|
|
|
|
;; its many users. See Ediff on-line Info for the full list of those who
|
|
|
|
|
;; helped. Improved defaults in Ediff file-name reading commands.
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
2013-05-23 07:10:05 +00:00
|
|
|
|
(require 'ediff-util)
|
1997-05-31 01:10:39 +00:00
|
|
|
|
(require 'ediff-init)
|
|
|
|
|
(require 'ediff-mult) ; required because of the registry stuff
|
|
|
|
|
|
|
|
|
|
(defgroup ediff nil
|
2012-04-22 13:58:00 +00:00
|
|
|
|
"Comprehensive visual interface to `diff' and `patch'."
|
1997-08-22 03:15:57 +00:00
|
|
|
|
:tag "Ediff"
|
1997-05-31 01:10:39 +00:00
|
|
|
|
:group 'tools)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defcustom ediff-use-last-dir nil
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"If t, Ediff will use previous directory as default when reading file name."
|
2019-06-21 05:16:54 +00:00
|
|
|
|
:type 'boolean)
|
1996-06-22 01:54:34 +00:00
|
|
|
|
|
1997-07-17 19:37:07 +00:00
|
|
|
|
;; Last directory used by an Ediff command for file-A.
|
|
|
|
|
(defvar ediff-last-dir-A nil)
|
|
|
|
|
;; Last directory used by an Ediff command for file-B.
|
|
|
|
|
(defvar ediff-last-dir-B nil)
|
|
|
|
|
;; Last directory used by an Ediff command for file-C.
|
|
|
|
|
(defvar ediff-last-dir-C nil)
|
|
|
|
|
;; Last directory used by an Ediff command for the ancestor file.
|
|
|
|
|
(defvar ediff-last-dir-ancestor nil)
|
|
|
|
|
;; Last directory used by an Ediff command as the output directory for merge.
|
2002-03-05 05:34:19 +00:00
|
|
|
|
(defvar ediff-last-merge-autostore-dir nil)
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
1995-10-06 01:01:08 +00:00
|
|
|
|
|
1996-02-16 06:36:35 +00:00
|
|
|
|
;; Used as a startup hook to set `_orig' patch file read-only.
|
1995-06-05 23:41:43 +00:00
|
|
|
|
(defun ediff-set-read-only-in-buf-A ()
|
1997-07-31 04:04:23 +00:00
|
|
|
|
(ediff-with-current-buffer ediff-buffer-A
|
2012-07-13 07:06:09 +00:00
|
|
|
|
(setq buffer-read-only t)))
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
2013-05-23 07:10:05 +00:00
|
|
|
|
(declare-function dired-get-filename "dired"
|
|
|
|
|
(&optional localp no-error-if-not-filep))
|
|
|
|
|
(declare-function dired-get-marked-files "dired"
|
2018-02-26 18:35:30 +00:00
|
|
|
|
(&optional localp arg filter distinguish-one-marked error))
|
2013-05-23 07:10:05 +00:00
|
|
|
|
|
1995-10-06 01:01:08 +00:00
|
|
|
|
;; Return a plausible default for ediff's first file:
|
2000-10-29 04:56:45 +00:00
|
|
|
|
;; 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)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(cond ((eq major-mode 'dired-mode)
|
2000-10-29 04:56:45 +00:00
|
|
|
|
(let ((current (dired-get-filename nil 'no-error))
|
|
|
|
|
(marked (condition-case nil
|
|
|
|
|
(dired-get-marked-files 'no-dir)
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
(error nil)))
|
2000-10-29 04:56:45 +00:00
|
|
|
|
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)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
((buffer-file-name (current-buffer))
|
|
|
|
|
(file-name-nondirectory (buffer-file-name (current-buffer))))
|
|
|
|
|
))
|
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;;; Compare files/buffers
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-files (file-A file-B &optional startup-hooks)
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Run Ediff on a pair of files, FILE-A and FILE-B.
|
|
|
|
|
STARTUP-HOOKS is a list of functions that Emacs calls without
|
|
|
|
|
arguments after setting up the Ediff buffers."
|
1994-05-02 05:16:59 +00:00
|
|
|
|
(interactive
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(let ((dir-A (if ediff-use-last-dir
|
|
|
|
|
ediff-last-dir-A
|
|
|
|
|
default-directory))
|
|
|
|
|
dir-B f)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(list (setq f (ediff-read-file-name
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
"File A to compare"
|
2003-02-04 11:26:42 +00:00
|
|
|
|
dir-A
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
(ediff-get-default-file-name)
|
|
|
|
|
'no-dirs))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(ediff-read-file-name "File B to compare"
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(setq dir-B
|
|
|
|
|
(if ediff-use-last-dir
|
2003-02-04 11:26:42 +00:00
|
|
|
|
ediff-last-dir-B
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(file-name-directory f)))
|
|
|
|
|
(progn
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(add-to-history
|
2006-09-18 19:22:31 +00:00
|
|
|
|
'file-name-history
|
|
|
|
|
(ediff-abbreviate-file-name
|
|
|
|
|
(expand-file-name
|
|
|
|
|
(file-name-nondirectory f)
|
|
|
|
|
dir-B)))
|
2000-10-29 04:56:45 +00:00
|
|
|
|
(ediff-get-default-file-name f 1)))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
)))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(ediff-files-internal file-A
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(if (file-directory-p file-B)
|
|
|
|
|
(expand-file-name
|
|
|
|
|
(file-name-nondirectory file-A) file-B)
|
|
|
|
|
file-B)
|
|
|
|
|
nil ; file-C
|
|
|
|
|
startup-hooks
|
|
|
|
|
'ediff-files))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-files3 (file-A file-B file-C &optional startup-hooks)
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Run Ediff on three files, FILE-A, FILE-B, and FILE-C.
|
|
|
|
|
STARTUP-HOOKS is a list of functions that Emacs calls without
|
|
|
|
|
arguments after setting up the Ediff buffers."
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(interactive
|
|
|
|
|
(let ((dir-A (if ediff-use-last-dir
|
|
|
|
|
ediff-last-dir-A
|
|
|
|
|
default-directory))
|
|
|
|
|
dir-B dir-C f ff)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(list (setq f (ediff-read-file-name
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
"File A to compare"
|
|
|
|
|
dir-A
|
|
|
|
|
(ediff-get-default-file-name)
|
|
|
|
|
'no-dirs))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(setq ff (ediff-read-file-name "File B to compare"
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(setq dir-B
|
|
|
|
|
(if ediff-use-last-dir
|
|
|
|
|
ediff-last-dir-B
|
|
|
|
|
(file-name-directory f)))
|
|
|
|
|
(progn
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(add-to-history
|
2006-09-18 19:22:31 +00:00
|
|
|
|
'file-name-history
|
|
|
|
|
(ediff-abbreviate-file-name
|
|
|
|
|
(expand-file-name
|
|
|
|
|
(file-name-nondirectory f)
|
|
|
|
|
dir-B)))
|
2000-10-29 04:56:45 +00:00
|
|
|
|
(ediff-get-default-file-name f 1))))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(ediff-read-file-name "File C to compare"
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(setq dir-C (if ediff-use-last-dir
|
|
|
|
|
ediff-last-dir-C
|
|
|
|
|
(file-name-directory ff)))
|
|
|
|
|
(progn
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(add-to-history
|
2006-09-18 19:22:31 +00:00
|
|
|
|
'file-name-history
|
|
|
|
|
(ediff-abbreviate-file-name
|
|
|
|
|
(expand-file-name
|
|
|
|
|
(file-name-nondirectory ff)
|
|
|
|
|
dir-C)))
|
2000-10-29 04:56:45 +00:00
|
|
|
|
(ediff-get-default-file-name ff 2)))
|
1994-05-02 05:16:59 +00:00
|
|
|
|
)))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(ediff-files-internal file-A
|
1994-05-10 00:48:00 +00:00
|
|
|
|
(if (file-directory-p file-B)
|
|
|
|
|
(expand-file-name
|
|
|
|
|
(file-name-nondirectory file-A) file-B)
|
|
|
|
|
file-B)
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(if (file-directory-p file-C)
|
|
|
|
|
(expand-file-name
|
|
|
|
|
(file-name-nondirectory file-A) file-C)
|
|
|
|
|
file-C)
|
|
|
|
|
startup-hooks
|
|
|
|
|
'ediff-files3))
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;;;###autoload
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(defalias 'ediff3 #'ediff-files3)
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(defvar-local ediff--magic-file-name nil
|
|
|
|
|
"Name of file where buffer's content was saved.
|
|
|
|
|
Only non-nil in \"magic\" buffers such as those of remote files.")
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(defvar ediff--startup-hook nil)
|
|
|
|
|
|
|
|
|
|
(defun ediff-find-file (file &optional last-dir)
|
2009-01-31 22:10:22 +00:00
|
|
|
|
"Visit FILE and arrange its buffer to Ediff's liking.
|
2019-06-21 05:16:54 +00:00
|
|
|
|
FILE is the file name.
|
2009-01-31 22:10:22 +00:00
|
|
|
|
LAST-DIR is the directory variable symbol where FILE's
|
2019-06-21 05:16:54 +00:00
|
|
|
|
directory name should be returned. May push to `ediff--startup-hook'
|
|
|
|
|
functions to be executed after `ediff-startup' is finished.
|
2009-01-31 22:10:22 +00:00
|
|
|
|
`ediff-find-file' arranges that the temp files it might create will be
|
2019-06-21 05:16:54 +00:00
|
|
|
|
deleted.
|
|
|
|
|
Returns the buffer into which the file is visited.
|
|
|
|
|
Also sets `ediff--magic-file-name' to indicate where the file's content
|
|
|
|
|
has been saved (if not in `buffer-file-name')."
|
2022-08-07 17:21:09 +00:00
|
|
|
|
(let* ((file-magic (or (ediff-file-compressed-p file)
|
|
|
|
|
(file-remote-p file)))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(temp-file-name-prefix (file-name-nondirectory file)))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(cond ((not (file-readable-p file))
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "File `%s' does not exist or is not readable" file))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
((file-directory-p file)
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "File `%s' is a directory" file)))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1996-02-16 06:36:35 +00:00
|
|
|
|
;; some of the commands, below, require full file name
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(setq file (expand-file-name file))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;; Record the directory of the file
|
|
|
|
|
(if last-dir
|
|
|
|
|
(set last-dir (expand-file-name (file-name-directory file))))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;; Setup the buffer
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(with-current-buffer (find-file-noselect file)
|
|
|
|
|
(widen) ; Make sure the entire file is seen
|
|
|
|
|
(setq ediff--magic-file-name nil)
|
|
|
|
|
(cond (file-magic ; File has a handler, such as jka-compr-handler or
|
|
|
|
|
; ange-ftp-hook-function--arrange for temp file
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(ediff-verify-file-buffer 'magic)
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(let ((file
|
|
|
|
|
(ediff-make-temp-file
|
|
|
|
|
(current-buffer) temp-file-name-prefix)))
|
|
|
|
|
(add-hook 'ediff--startup-hook (lambda () (delete-file file)))
|
|
|
|
|
(setq ediff--magic-file-name file)))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;; file processed via auto-mode-alist, a la uncompress.el
|
|
|
|
|
((not (equal (file-truename file)
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(file-truename buffer-file-name)))
|
|
|
|
|
(let ((file
|
|
|
|
|
(ediff-make-temp-file
|
|
|
|
|
(current-buffer) temp-file-name-prefix)))
|
|
|
|
|
(add-hook 'ediff--startup-hook (lambda () (delete-file file)))
|
|
|
|
|
(setq ediff--magic-file-name file)))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(t ;; plain file---just check that the file matches the buffer
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(ediff-verify-file-buffer)))
|
|
|
|
|
(current-buffer))))
|
|
|
|
|
|
|
|
|
|
(defun ediff--buffer-file-name (buf)
|
|
|
|
|
(when buf
|
|
|
|
|
(with-current-buffer buf (or ediff--magic-file-name buffer-file-name))))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
1997-11-01 01:46:51 +00:00
|
|
|
|
;; MERGE-BUFFER-FILE is the file to be associated with the merge buffer
|
|
|
|
|
(defun ediff-files-internal (file-A file-B file-C startup-hooks job-name
|
|
|
|
|
&optional merge-buffer-file)
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(if (string= file-A file-B)
|
|
|
|
|
(error "Files A and B are the same"))
|
|
|
|
|
(if (stringp file-C)
|
|
|
|
|
(or (and (string= file-A file-C) (error "Files A and C are the same"))
|
|
|
|
|
(and (string= file-B file-C) (error "Files B and C are the same"))))
|
|
|
|
|
(let ((ediff--startup-hook startup-hooks)
|
|
|
|
|
buf-A buf-B buf-C)
|
|
|
|
|
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(message "Reading file %s ... " file-A)
|
|
|
|
|
;;(sit-for 0)
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(setq buf-A (ediff-find-file file-A 'ediff-last-dir-A))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(message "Reading file %s ... " file-B)
|
|
|
|
|
;;(sit-for 0)
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(setq buf-B (ediff-find-file file-B 'ediff-last-dir-B))
|
|
|
|
|
(when (stringp file-C)
|
|
|
|
|
(message "Reading file %s ... " file-C)
|
|
|
|
|
;;(sit-for 0)
|
|
|
|
|
(setq buf-C (ediff-find-file
|
|
|
|
|
file-C
|
|
|
|
|
(if (eq job-name 'ediff-merge-files-with-ancestor)
|
|
|
|
|
'ediff-last-dir-ancestor 'ediff-last-dir-C))))
|
|
|
|
|
(ediff-setup buf-A (ediff--buffer-file-name buf-A)
|
|
|
|
|
buf-B (ediff--buffer-file-name buf-B)
|
|
|
|
|
buf-C (ediff--buffer-file-name buf-C)
|
|
|
|
|
ediff--startup-hook
|
1997-11-01 01:46:51 +00:00
|
|
|
|
(list (cons 'ediff-job-name job-name))
|
|
|
|
|
merge-buffer-file)))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
2008-01-10 06:54:12 +00:00
|
|
|
|
(declare-function diff-latest-backup-file "diff" (fn))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(defalias 'ediff #'ediff-files)
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
2009-08-15 05:57:08 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-current-file ()
|
|
|
|
|
"Start ediff between current buffer and its file on disk.
|
|
|
|
|
This command can be used instead of `revert-buffer'. If there is
|
|
|
|
|
nothing to revert then this command fails."
|
|
|
|
|
(interactive)
|
2014-04-02 07:07:11 +00:00
|
|
|
|
;; This duplicates code from menu-bar.el.
|
|
|
|
|
(unless (or (not (eq revert-buffer-function 'revert-buffer--default))
|
|
|
|
|
(not (eq revert-buffer-insert-file-contents-function
|
|
|
|
|
'revert-buffer-insert-file-contents--default-function))
|
2009-08-15 05:57:08 +00:00
|
|
|
|
(and buffer-file-number
|
|
|
|
|
(or (buffer-modified-p)
|
|
|
|
|
(not (verify-visited-file-modtime
|
|
|
|
|
(current-buffer))))))
|
|
|
|
|
(error "Nothing to revert"))
|
|
|
|
|
(let* ((auto-save-p (and (recent-auto-save-p)
|
|
|
|
|
buffer-auto-save-file-name
|
|
|
|
|
(file-readable-p buffer-auto-save-file-name)
|
|
|
|
|
(y-or-n-p
|
|
|
|
|
"Buffer has been auto-saved recently. Compare with auto-save file? ")))
|
|
|
|
|
(file-name (if auto-save-p
|
|
|
|
|
buffer-auto-save-file-name
|
|
|
|
|
buffer-file-name))
|
|
|
|
|
(revert-buf-name (concat "FILE=" file-name))
|
|
|
|
|
(revert-buf (get-buffer revert-buf-name))
|
|
|
|
|
(current-major major-mode))
|
|
|
|
|
(unless file-name
|
|
|
|
|
(error "Buffer does not seem to be associated with any file"))
|
|
|
|
|
(when revert-buf
|
|
|
|
|
(kill-buffer revert-buf)
|
|
|
|
|
(setq revert-buf nil))
|
|
|
|
|
(setq revert-buf (get-buffer-create revert-buf-name))
|
|
|
|
|
(with-current-buffer revert-buf
|
|
|
|
|
(insert-file-contents file-name)
|
|
|
|
|
;; Assume same modes:
|
|
|
|
|
(funcall current-major))
|
|
|
|
|
(ediff-buffers revert-buf (current-buffer))))
|
|
|
|
|
|
|
|
|
|
|
2002-07-31 22:29:36 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-backup (file)
|
|
|
|
|
"Run Ediff on FILE and its backup file.
|
|
|
|
|
Uses the latest backup, if there are several numerical backups.
|
|
|
|
|
If this file is a backup, `ediff' it with its original."
|
|
|
|
|
(interactive (list (read-file-name "Ediff (file with backup): ")))
|
|
|
|
|
;; The code is taken from `diff-backup'.
|
|
|
|
|
(require 'diff)
|
|
|
|
|
(let (bak ori)
|
|
|
|
|
(if (backup-file-name-p file)
|
|
|
|
|
(setq bak file
|
|
|
|
|
ori (file-name-sans-versions file))
|
|
|
|
|
(setq bak (or (diff-latest-backup-file file)
|
|
|
|
|
(error "No backup found for %s" file))
|
|
|
|
|
ori file))
|
|
|
|
|
(ediff-files bak ori)))
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(defun ediff-buffers (buffer-A buffer-B &optional startup-hooks job-name)
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Run Ediff on a pair of buffers, BUFFER-A and BUFFER-B.
|
|
|
|
|
STARTUP-HOOKS is a list of functions that Emacs calls without
|
|
|
|
|
arguments after setting up the Ediff buffers. JOB-NAME is a
|
|
|
|
|
symbol describing the Ediff job type; it defaults to
|
|
|
|
|
`ediff-buffers', but can also be one of
|
|
|
|
|
`ediff-merge-files-with-ancestor', `ediff-last-dir-ancestor',
|
|
|
|
|
`ediff-last-dir-C', `ediff-buffers3', `ediff-merge-buffers', or
|
|
|
|
|
`ediff-merge-buffers-with-ancestor'."
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(interactive
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(let (bf)
|
|
|
|
|
(list (setq bf (read-buffer "Buffer A to compare: "
|
|
|
|
|
(ediff-other-buffer "") t))
|
|
|
|
|
(read-buffer "Buffer B to compare: "
|
|
|
|
|
(progn
|
|
|
|
|
;; realign buffers so that two visible bufs will be
|
|
|
|
|
;; at the top
|
|
|
|
|
(save-window-excursion (other-window 1))
|
|
|
|
|
(ediff-other-buffer bf))
|
|
|
|
|
t))))
|
|
|
|
|
(or job-name (setq job-name 'ediff-buffers))
|
|
|
|
|
(ediff-buffers-internal buffer-A buffer-B nil startup-hooks job-name))
|
1996-06-22 01:54:34 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(defalias 'ebuffers #'ediff-buffers)
|
1996-06-22 01:54:34 +00:00
|
|
|
|
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-buffers3 (buffer-A buffer-B buffer-C
|
|
|
|
|
&optional startup-hooks job-name)
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Run Ediff on three buffers, BUFFER-A, BUFFER-B, and BUFFER-C.
|
|
|
|
|
STARTUP-HOOKS is a list of functions that Emacs calls without
|
|
|
|
|
arguments after setting up the Ediff buffers. JOB-NAME is a
|
|
|
|
|
symbol describing the Ediff job type; it defaults to
|
|
|
|
|
`ediff-buffers3', but can also be one of
|
|
|
|
|
`ediff-merge-files-with-ancestor', `ediff-last-dir-ancestor',
|
|
|
|
|
`ediff-last-dir-C', `ediff-buffers', `ediff-merge-buffers', or
|
|
|
|
|
`ediff-merge-buffers-with-ancestor'."
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(interactive
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(let (bf bff)
|
|
|
|
|
(list (setq bf (read-buffer "Buffer A to compare: "
|
|
|
|
|
(ediff-other-buffer "") t))
|
|
|
|
|
(setq bff (read-buffer "Buffer B to compare: "
|
|
|
|
|
(progn
|
|
|
|
|
;; realign buffers so that two visible
|
|
|
|
|
;; bufs will be at the top
|
|
|
|
|
(save-window-excursion (other-window 1))
|
|
|
|
|
(ediff-other-buffer bf))
|
|
|
|
|
t))
|
|
|
|
|
(read-buffer "Buffer C to compare: "
|
|
|
|
|
(progn
|
|
|
|
|
;; realign buffers so that three visible
|
|
|
|
|
;; bufs will be at the top
|
|
|
|
|
(save-window-excursion (other-window 1))
|
|
|
|
|
(ediff-other-buffer (list bf bff)))
|
|
|
|
|
t)
|
|
|
|
|
)))
|
|
|
|
|
(or job-name (setq job-name 'ediff-buffers3))
|
|
|
|
|
(ediff-buffers-internal buffer-A buffer-B buffer-C startup-hooks job-name))
|
1996-06-22 01:54:34 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(defalias 'ebuffers3 #'ediff-buffers3)
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
|
|
|
|
|
1997-11-01 01:46:51 +00:00
|
|
|
|
;; MERGE-BUFFER-FILE is the file to be associated with the merge buffer
|
|
|
|
|
(defun ediff-buffers-internal (buf-A buf-B buf-C startup-hooks job-name
|
|
|
|
|
&optional merge-buffer-file)
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(let* ((buf-A-file-name (buffer-file-name (get-buffer buf-A)))
|
|
|
|
|
(buf-B-file-name (buffer-file-name (get-buffer buf-B)))
|
|
|
|
|
(buf-C-is-alive (ediff-buffer-live-p buf-C))
|
|
|
|
|
(buf-C-file-name (if buf-C-is-alive
|
|
|
|
|
(buffer-file-name (get-buffer buf-B))))
|
|
|
|
|
file-A file-B file-C)
|
2009-12-07 06:56:40 +00:00
|
|
|
|
(unwind-protect
|
|
|
|
|
(progn
|
|
|
|
|
(if (not (ediff-buffer-live-p buf-A))
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Buffer %S doesn't exist" buf-A))
|
2009-12-07 06:56:40 +00:00
|
|
|
|
(if (not (ediff-buffer-live-p buf-B))
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Buffer %S doesn't exist" buf-B))
|
2009-12-07 06:56:40 +00:00
|
|
|
|
(let ((ediff-job-name job-name))
|
|
|
|
|
(if (and ediff-3way-comparison-job
|
|
|
|
|
(not buf-C-is-alive))
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Buffer %S doesn't exist" buf-C)))
|
2009-12-07 06:56:40 +00:00
|
|
|
|
(if (stringp buf-A-file-name)
|
|
|
|
|
(setq buf-A-file-name (file-name-nondirectory buf-A-file-name)))
|
|
|
|
|
(if (stringp buf-B-file-name)
|
|
|
|
|
(setq buf-B-file-name (file-name-nondirectory buf-B-file-name)))
|
|
|
|
|
(if (stringp buf-C-file-name)
|
|
|
|
|
(setq buf-C-file-name (file-name-nondirectory buf-C-file-name)))
|
2012-07-16 10:19:56 +00:00
|
|
|
|
|
2009-12-07 06:56:40 +00:00
|
|
|
|
(setq file-A (ediff-make-temp-file buf-A buf-A-file-name)
|
|
|
|
|
file-B (ediff-make-temp-file buf-B buf-B-file-name))
|
|
|
|
|
(if buf-C-is-alive
|
|
|
|
|
(setq file-C (ediff-make-temp-file buf-C buf-C-file-name)))
|
2012-07-16 10:19:56 +00:00
|
|
|
|
|
2009-12-07 06:56:40 +00:00
|
|
|
|
(ediff-setup (get-buffer buf-A) file-A
|
|
|
|
|
(get-buffer buf-B) file-B
|
|
|
|
|
(if buf-C-is-alive (get-buffer buf-C))
|
|
|
|
|
file-C
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(cons (lambda ()
|
|
|
|
|
(delete-file file-A)
|
|
|
|
|
(delete-file file-B)
|
|
|
|
|
(if (stringp file-C) (delete-file file-C)))
|
2009-12-07 06:56:40 +00:00
|
|
|
|
startup-hooks)
|
|
|
|
|
(list (cons 'ediff-job-name job-name))
|
|
|
|
|
merge-buffer-file))
|
|
|
|
|
(if (and (stringp file-A) (file-exists-p file-A))
|
|
|
|
|
(delete-file file-A))
|
|
|
|
|
(if (and (stringp file-B) (file-exists-p file-B))
|
|
|
|
|
(delete-file file-B))
|
|
|
|
|
(if (and (stringp file-C) (file-exists-p file-C))
|
|
|
|
|
(delete-file file-C)))))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Directory and file group operations
|
|
|
|
|
|
|
|
|
|
;; Get appropriate default name for directory:
|
|
|
|
|
;; If ediff-use-last-dir, use ediff-last-dir-A.
|
|
|
|
|
;; In dired mode, use the directory that is under the point (if any);
|
|
|
|
|
;; otherwise, use default-directory
|
|
|
|
|
(defun ediff-get-default-directory-name ()
|
|
|
|
|
(cond (ediff-use-last-dir ediff-last-dir-A)
|
|
|
|
|
((eq major-mode 'dired-mode)
|
|
|
|
|
(let ((f (dired-get-filename nil 'noerror)))
|
|
|
|
|
(if (and (stringp f) (file-directory-p f))
|
|
|
|
|
f
|
|
|
|
|
default-directory)))
|
|
|
|
|
(t default-directory)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-directories (dir1 dir2 regexp)
|
2021-09-18 07:13:37 +00:00
|
|
|
|
"Run Ediff on directories DIR1 and DIR2, comparing files.
|
|
|
|
|
Consider only files that have the same name in both directories.
|
|
|
|
|
|
|
|
|
|
REGEXP is nil or a regular expression; only file names that match
|
|
|
|
|
the regexp are considered."
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(interactive
|
|
|
|
|
(let ((dir-A (ediff-get-default-directory-name))
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(default-regexp (eval ediff-default-filtering-regexp t))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
f)
|
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-cmd.el (viper-special-read-and-insert-char): use
read-key-sequence.
(viper-after-change-undo-hook): enhancements.
(viper-after-change-undo-hook): new hook.
(viper-undo): use viper-after-change-undo-hook.
(viper-add-newline-at-eob-if-necessary): widen before making changes.
(viper-next-line-at-bol): If point is on a widget or a button, simulate
clicking on that widget/button.
* viper.el (viper-mode): allow for a separate cursor color in Emacs
state.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
(ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
2006-06-18 17:08:24 +00:00
|
|
|
|
(list (setq f (read-directory-name
|
2012-07-16 10:19:56 +00:00
|
|
|
|
"Directory A to compare: " dir-A nil 'must-match))
|
|
|
|
|
(read-directory-name "Directory B to compare: "
|
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-cmd.el (viper-special-read-and-insert-char): use
read-key-sequence.
(viper-after-change-undo-hook): enhancements.
(viper-after-change-undo-hook): new hook.
(viper-undo): use viper-after-change-undo-hook.
(viper-add-newline-at-eob-if-necessary): widen before making changes.
(viper-next-line-at-bol): If point is on a widget or a button, simulate
clicking on that widget/button.
* viper.el (viper-mode): allow for a separate cursor color in Emacs
state.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
(ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
2006-06-18 17:08:24 +00:00
|
|
|
|
(if ediff-use-last-dir
|
|
|
|
|
ediff-last-dir-B
|
|
|
|
|
(ediff-strip-last-dir f))
|
|
|
|
|
nil 'must-match)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
(read-string
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(format-prompt "Filter filenames through regular expression"
|
|
|
|
|
default-regexp)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
nil
|
|
|
|
|
'ediff-filtering-regexp-history
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(eval ediff-default-filtering-regexp t))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
)))
|
|
|
|
|
(ediff-directories-internal
|
2019-06-21 05:16:54 +00:00
|
|
|
|
dir1 dir2 nil regexp #'ediff-files 'ediff-directories
|
1995-10-06 01:01:08 +00:00
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(defalias 'edirs #'ediff-directories)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-directory-revisions (dir1 regexp)
|
|
|
|
|
"Run Ediff on a directory, DIR1, comparing its files with their revisions.
|
|
|
|
|
The second argument, REGEXP, is a regular expression that filters the file
|
1999-11-01 07:16:15 +00:00
|
|
|
|
names. Only the files that are under revision control are taken into account."
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(interactive
|
2003-10-13 01:28:49 +00:00
|
|
|
|
(let ((dir-A (ediff-get-default-directory-name))
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(default-regexp (eval ediff-default-filtering-regexp t))
|
2003-10-13 01:28:49 +00:00
|
|
|
|
)
|
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-cmd.el (viper-special-read-and-insert-char): use
read-key-sequence.
(viper-after-change-undo-hook): enhancements.
(viper-after-change-undo-hook): new hook.
(viper-undo): use viper-after-change-undo-hook.
(viper-add-newline-at-eob-if-necessary): widen before making changes.
(viper-next-line-at-bol): If point is on a widget or a button, simulate
clicking on that widget/button.
* viper.el (viper-mode): allow for a separate cursor color in Emacs
state.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
(ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
2006-06-18 17:08:24 +00:00
|
|
|
|
(list (read-directory-name
|
|
|
|
|
"Directory to compare with revision:" dir-A nil 'must-match)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
(read-string
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(format-prompt
|
|
|
|
|
"Filter filenames through regular expression" default-regexp)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
nil
|
|
|
|
|
'ediff-filtering-regexp-history
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(eval ediff-default-filtering-regexp t))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
)))
|
|
|
|
|
(ediff-directory-revisions-internal
|
2021-02-26 21:51:15 +00:00
|
|
|
|
dir1 regexp #'ediff-revision 'ediff-directory-revisions
|
1995-10-06 01:01:08 +00:00
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(defalias 'edir-revisions #'ediff-directory-revisions)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-directories3 (dir1 dir2 dir3 regexp)
|
2021-09-18 07:13:37 +00:00
|
|
|
|
"Run Ediff on directories DIR1, DIR2, and DIR3, comparing files.
|
|
|
|
|
Consider only files that have the same name in all three directories.
|
2002-11-17 22:26:48 +00:00
|
|
|
|
|
2021-09-18 07:13:37 +00:00
|
|
|
|
REGEXP is nil or a regular expression; only file names that match
|
|
|
|
|
the regexp are considered."
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(interactive
|
|
|
|
|
(let ((dir-A (ediff-get-default-directory-name))
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(default-regexp (eval ediff-default-filtering-regexp t))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
f)
|
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-cmd.el (viper-special-read-and-insert-char): use
read-key-sequence.
(viper-after-change-undo-hook): enhancements.
(viper-after-change-undo-hook): new hook.
(viper-undo): use viper-after-change-undo-hook.
(viper-add-newline-at-eob-if-necessary): widen before making changes.
(viper-next-line-at-bol): If point is on a widget or a button, simulate
clicking on that widget/button.
* viper.el (viper-mode): allow for a separate cursor color in Emacs
state.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
(ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
2006-06-18 17:08:24 +00:00
|
|
|
|
(list (setq f (read-directory-name "Directory A to compare:" dir-A nil))
|
|
|
|
|
(setq f (read-directory-name "Directory B to compare:"
|
|
|
|
|
(if ediff-use-last-dir
|
|
|
|
|
ediff-last-dir-B
|
|
|
|
|
(ediff-strip-last-dir f))
|
|
|
|
|
nil 'must-match))
|
|
|
|
|
(read-directory-name "Directory C to compare:"
|
|
|
|
|
(if ediff-use-last-dir
|
|
|
|
|
ediff-last-dir-C
|
|
|
|
|
(ediff-strip-last-dir f))
|
|
|
|
|
nil 'must-match)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
(read-string
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(format-prompt "Filter filenames through regular expression"
|
|
|
|
|
default-regexp)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
nil
|
|
|
|
|
'ediff-filtering-regexp-history
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(eval ediff-default-filtering-regexp t))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
)))
|
|
|
|
|
(ediff-directories-internal
|
2019-06-21 05:16:54 +00:00
|
|
|
|
dir1 dir2 dir3 regexp #'ediff-files3 'ediff-directories3
|
1995-10-06 01:01:08 +00:00
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(defalias 'edirs3 #'ediff-directories3)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(defun ediff-merge-directories (dir1 dir2 regexp &optional merge-autostore-dir)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
"Run Ediff on a pair of directories, DIR1 and DIR2, merging files that have
|
2002-11-17 22:26:48 +00:00
|
|
|
|
the same name in both. The third argument, REGEXP, is nil or a regular
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
expression; only file names that match the regexp are considered.
|
|
|
|
|
MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(interactive
|
|
|
|
|
(let ((dir-A (ediff-get-default-directory-name))
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(default-regexp (eval ediff-default-filtering-regexp t))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
f)
|
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-cmd.el (viper-special-read-and-insert-char): use
read-key-sequence.
(viper-after-change-undo-hook): enhancements.
(viper-after-change-undo-hook): new hook.
(viper-undo): use viper-after-change-undo-hook.
(viper-add-newline-at-eob-if-necessary): widen before making changes.
(viper-next-line-at-bol): If point is on a widget or a button, simulate
clicking on that widget/button.
* viper.el (viper-mode): allow for a separate cursor color in Emacs
state.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
(ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
2006-06-18 17:08:24 +00:00
|
|
|
|
(list (setq f (read-directory-name "Directory A to merge:"
|
|
|
|
|
dir-A nil 'must-match))
|
|
|
|
|
(read-directory-name "Directory B to merge:"
|
|
|
|
|
(if ediff-use-last-dir
|
|
|
|
|
ediff-last-dir-B
|
|
|
|
|
(ediff-strip-last-dir f))
|
|
|
|
|
nil 'must-match)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
(read-string
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(format-prompt "Filter filenames through regular expression"
|
|
|
|
|
default-regexp)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
nil
|
|
|
|
|
'ediff-filtering-regexp-history
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(eval ediff-default-filtering-regexp t))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
)))
|
|
|
|
|
(ediff-directories-internal
|
2019-06-21 05:16:54 +00:00
|
|
|
|
dir1 dir2 nil regexp #'ediff-merge-files 'ediff-merge-directories
|
1999-11-01 07:16:15 +00:00
|
|
|
|
nil merge-autostore-dir
|
1995-10-06 01:01:08 +00:00
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(defalias 'edirs-merge #'ediff-merge-directories)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(defun ediff-merge-directories-with-ancestor (dir1 dir2 ancestor-dir regexp
|
|
|
|
|
&optional
|
|
|
|
|
merge-autostore-dir)
|
2021-09-24 12:46:56 +00:00
|
|
|
|
"Merge files in DIR1 and DIR2 using files in ANCESTOR-DIR as ancestors.
|
1999-11-01 07:16:15 +00:00
|
|
|
|
Ediff merges files that have identical names in DIR1, DIR2. If a pair of files
|
1996-06-22 01:54:34 +00:00
|
|
|
|
in DIR1 and DIR2 doesn't have an ancestor in ANCESTOR-DIR, Ediff will merge
|
2002-11-17 22:26:48 +00:00
|
|
|
|
without ancestor. The fourth argument, REGEXP, is nil or a regular expression;
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
only file names that match the regexp are considered.
|
|
|
|
|
MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(interactive
|
|
|
|
|
(let ((dir-A (ediff-get-default-directory-name))
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(default-regexp (eval ediff-default-filtering-regexp t))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
f)
|
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-cmd.el (viper-special-read-and-insert-char): use
read-key-sequence.
(viper-after-change-undo-hook): enhancements.
(viper-after-change-undo-hook): new hook.
(viper-undo): use viper-after-change-undo-hook.
(viper-add-newline-at-eob-if-necessary): widen before making changes.
(viper-next-line-at-bol): If point is on a widget or a button, simulate
clicking on that widget/button.
* viper.el (viper-mode): allow for a separate cursor color in Emacs
state.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
(ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
2006-06-18 17:08:24 +00:00
|
|
|
|
(list (setq f (read-directory-name "Directory A to merge:" dir-A nil))
|
|
|
|
|
(setq f (read-directory-name "Directory B to merge:"
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(if ediff-use-last-dir
|
2003-02-04 11:26:42 +00:00
|
|
|
|
ediff-last-dir-B
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(ediff-strip-last-dir f))
|
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-cmd.el (viper-special-read-and-insert-char): use
read-key-sequence.
(viper-after-change-undo-hook): enhancements.
(viper-after-change-undo-hook): new hook.
(viper-undo): use viper-after-change-undo-hook.
(viper-add-newline-at-eob-if-necessary): widen before making changes.
(viper-next-line-at-bol): If point is on a widget or a button, simulate
clicking on that widget/button.
* viper.el (viper-mode): allow for a separate cursor color in Emacs
state.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
(ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
2006-06-18 17:08:24 +00:00
|
|
|
|
nil 'must-match))
|
|
|
|
|
(read-directory-name "Ancestor directory:"
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(if ediff-use-last-dir
|
2003-02-04 11:26:42 +00:00
|
|
|
|
ediff-last-dir-C
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(ediff-strip-last-dir f))
|
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-cmd.el (viper-special-read-and-insert-char): use
read-key-sequence.
(viper-after-change-undo-hook): enhancements.
(viper-after-change-undo-hook): new hook.
(viper-undo): use viper-after-change-undo-hook.
(viper-add-newline-at-eob-if-necessary): widen before making changes.
(viper-next-line-at-bol): If point is on a widget or a button, simulate
clicking on that widget/button.
* viper.el (viper-mode): allow for a separate cursor color in Emacs
state.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
(ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
2006-06-18 17:08:24 +00:00
|
|
|
|
nil 'must-match)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
(read-string
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(format-prompt "Filter filenames through regular expression"
|
|
|
|
|
default-regexp)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
nil
|
|
|
|
|
'ediff-filtering-regexp-history
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(eval ediff-default-filtering-regexp t))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
)))
|
|
|
|
|
(ediff-directories-internal
|
1996-06-22 01:54:34 +00:00
|
|
|
|
dir1 dir2 ancestor-dir regexp
|
2019-06-21 05:16:54 +00:00
|
|
|
|
#'ediff-merge-files-with-ancestor 'ediff-merge-directories-with-ancestor
|
1999-11-01 07:16:15 +00:00
|
|
|
|
nil merge-autostore-dir
|
1995-10-06 01:01:08 +00:00
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(defun ediff-merge-directory-revisions (dir1 regexp
|
|
|
|
|
&optional merge-autostore-dir)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
"Run Ediff on a directory, DIR1, merging its files with their revisions.
|
|
|
|
|
The second argument, REGEXP, is a regular expression that filters the file
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
names. Only the files that are under revision control are taken into account.
|
|
|
|
|
MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(interactive
|
2003-10-13 01:28:49 +00:00
|
|
|
|
(let ((dir-A (ediff-get-default-directory-name))
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(default-regexp (eval ediff-default-filtering-regexp t))
|
2003-10-13 01:28:49 +00:00
|
|
|
|
)
|
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-cmd.el (viper-special-read-and-insert-char): use
read-key-sequence.
(viper-after-change-undo-hook): enhancements.
(viper-after-change-undo-hook): new hook.
(viper-undo): use viper-after-change-undo-hook.
(viper-add-newline-at-eob-if-necessary): widen before making changes.
(viper-next-line-at-bol): If point is on a widget or a button, simulate
clicking on that widget/button.
* viper.el (viper-mode): allow for a separate cursor color in Emacs
state.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
(ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
2006-06-18 17:08:24 +00:00
|
|
|
|
(list (read-directory-name
|
|
|
|
|
"Directory to merge with revisions:" dir-A nil 'must-match)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
(read-string
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(format-prompt "Filter filenames through regular expression"
|
|
|
|
|
default-regexp)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
nil
|
|
|
|
|
'ediff-filtering-regexp-history
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(eval ediff-default-filtering-regexp t))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
)))
|
|
|
|
|
(ediff-directory-revisions-internal
|
2021-02-26 21:51:15 +00:00
|
|
|
|
dir1 regexp #'ediff-merge-revisions 'ediff-merge-directory-revisions
|
1999-11-01 07:16:15 +00:00
|
|
|
|
nil merge-autostore-dir
|
1995-10-06 01:01:08 +00:00
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(defalias 'edir-merge-revisions #'ediff-merge-directory-revisions)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(defun ediff-merge-directory-revisions-with-ancestor (dir1 regexp
|
|
|
|
|
&optional
|
|
|
|
|
merge-autostore-dir)
|
2021-09-24 12:46:56 +00:00
|
|
|
|
"Run Ediff on DIR1 and merge its files with their revisions and ancestors.
|
1995-10-06 01:01:08 +00:00
|
|
|
|
The second argument, REGEXP, is a regular expression that filters the file
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
names. Only the files that are under revision control are taken into account.
|
|
|
|
|
MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(interactive
|
2003-10-13 01:28:49 +00:00
|
|
|
|
(let ((dir-A (ediff-get-default-directory-name))
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(default-regexp (eval ediff-default-filtering-regexp t))
|
2003-10-13 01:28:49 +00:00
|
|
|
|
)
|
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-cmd.el (viper-special-read-and-insert-char): use
read-key-sequence.
(viper-after-change-undo-hook): enhancements.
(viper-after-change-undo-hook): new hook.
(viper-undo): use viper-after-change-undo-hook.
(viper-add-newline-at-eob-if-necessary): widen before making changes.
(viper-next-line-at-bol): If point is on a widget or a button, simulate
clicking on that widget/button.
* viper.el (viper-mode): allow for a separate cursor color in Emacs
state.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
(ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
2006-06-18 17:08:24 +00:00
|
|
|
|
(list (read-directory-name
|
|
|
|
|
"Directory to merge with revisions and ancestors:"
|
|
|
|
|
dir-A nil 'must-match)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
(read-string
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(format-prompt "Filter filenames through regular expression"
|
|
|
|
|
default-regexp)
|
2003-10-13 01:28:49 +00:00
|
|
|
|
nil
|
|
|
|
|
'ediff-filtering-regexp-history
|
2021-02-26 21:51:15 +00:00
|
|
|
|
(eval ediff-default-filtering-regexp t))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
)))
|
|
|
|
|
(ediff-directory-revisions-internal
|
2021-02-26 21:51:15 +00:00
|
|
|
|
dir1 regexp #'ediff-merge-revisions-with-ancestor
|
1995-10-06 01:01:08 +00:00
|
|
|
|
'ediff-merge-directory-revisions-with-ancestor
|
1999-11-01 07:16:15 +00:00
|
|
|
|
nil merge-autostore-dir
|
1995-10-06 01:01:08 +00:00
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defalias
|
|
|
|
|
'edir-merge-revisions-with-ancestor
|
2003-02-04 11:26:42 +00:00
|
|
|
|
'ediff-merge-directory-revisions-with-ancestor)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defalias 'edirs-merge-with-ancestor 'ediff-merge-directories-with-ancestor)
|
|
|
|
|
|
|
|
|
|
;; Run ediff-action (ediff-files, ediff-merge, ediff-merge-with-ancestors)
|
|
|
|
|
;; on a pair of directories (three directories, in case of ancestor).
|
2002-11-17 22:26:48 +00:00
|
|
|
|
;; The third argument, REGEXP, is nil or a regular expression;
|
|
|
|
|
;; only file names that match the regexp are considered.
|
1995-10-06 01:01:08 +00:00
|
|
|
|
;; JOBNAME is the symbol indicating the meta-job to be performed.
|
1999-11-01 07:16:15 +00:00
|
|
|
|
;; MERGE-AUTOSTORE-DIR is the directory in which to store merged files.
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(defun ediff-directories-internal (dir1 dir2 dir3 regexp action jobname
|
1999-11-01 07:16:15 +00:00
|
|
|
|
&optional startup-hooks
|
|
|
|
|
merge-autostore-dir)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(if (stringp dir3)
|
|
|
|
|
(setq dir3 (if (file-directory-p dir3) dir3 (file-name-directory dir3))))
|
|
|
|
|
|
|
|
|
|
(cond ((string= dir1 dir2)
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Directories A and B are the same: %s" dir1))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
((and (eq jobname 'ediff-directories3)
|
|
|
|
|
(string= dir1 dir3))
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Directories A and C are the same: %s" dir1))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
((and (eq jobname 'ediff-directories3)
|
|
|
|
|
(string= dir2 dir3))
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Directories B and C are the same: %s" dir1)))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(if merge-autostore-dir
|
|
|
|
|
(or (stringp merge-autostore-dir)
|
|
|
|
|
(error "%s: Directory for storing merged files must be a string"
|
|
|
|
|
jobname)))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(let (;; dir-diff-struct is of the form (common-list diff-list)
|
2002-03-05 05:34:19 +00:00
|
|
|
|
;; It is a structure where ediff-intersect-directories returns
|
|
|
|
|
;; commonalities and differences among directories
|
|
|
|
|
dir-diff-struct
|
|
|
|
|
meta-buf)
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(if (and ediff-autostore-merges
|
|
|
|
|
(ediff-merge-metajob jobname)
|
|
|
|
|
(not merge-autostore-dir))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(setq merge-autostore-dir
|
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-cmd.el (viper-special-read-and-insert-char): use
read-key-sequence.
(viper-after-change-undo-hook): enhancements.
(viper-after-change-undo-hook): new hook.
(viper-undo): use viper-after-change-undo-hook.
(viper-add-newline-at-eob-if-necessary): widen before making changes.
(viper-next-line-at-bol): If point is on a widget or a button, simulate
clicking on that widget/button.
* viper.el (viper-mode): allow for a separate cursor color in Emacs
state.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
(ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
2006-06-18 17:08:24 +00:00
|
|
|
|
(read-directory-name "Save merged files in directory: "
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(if ediff-use-last-dir
|
1996-09-20 01:10:05 +00:00
|
|
|
|
ediff-last-merge-autostore-dir
|
|
|
|
|
(ediff-strip-last-dir dir1))
|
1999-11-01 07:16:15 +00:00
|
|
|
|
nil
|
|
|
|
|
'must-match)))
|
1996-09-20 01:10:05 +00:00
|
|
|
|
;; verify we are not merging into an orig directory
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(if merge-autostore-dir
|
1996-09-20 01:10:05 +00:00
|
|
|
|
(cond ((and (stringp dir1) (string= merge-autostore-dir dir1))
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(or (y-or-n-p
|
|
|
|
|
"Directory for saving merged files = Directory A. Sure? ")
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Directory merge aborted")))
|
1996-09-20 01:10:05 +00:00
|
|
|
|
((and (stringp dir2) (string= merge-autostore-dir dir2))
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(or (y-or-n-p
|
|
|
|
|
"Directory for saving merged files = Directory B. Sure? ")
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Directory merge aborted")))
|
1996-09-20 01:10:05 +00:00
|
|
|
|
((and (stringp dir3) (string= merge-autostore-dir dir3))
|
|
|
|
|
(or (y-or-n-p
|
1999-11-01 07:16:15 +00:00
|
|
|
|
"Directory for saving merged files = Ancestor Directory. Sure? ")
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Directory merge aborted")))))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
|
|
|
|
(setq dir-diff-struct (ediff-intersect-directories
|
2002-03-05 05:34:19 +00:00
|
|
|
|
jobname
|
|
|
|
|
regexp dir1 dir2 dir3 merge-autostore-dir))
|
2019-06-21 05:16:54 +00:00
|
|
|
|
;; this sets various vars in the meta buffer inside
|
|
|
|
|
;; ediff-prepare-meta-buffer
|
|
|
|
|
(push (lambda ()
|
|
|
|
|
;; tell what to do if the user clicks on a session record
|
|
|
|
|
(setq ediff-session-action-function action)
|
|
|
|
|
;; set ediff-dir-difference-list
|
|
|
|
|
(setq ediff-dir-difference-list
|
|
|
|
|
(cdr dir-diff-struct)))
|
|
|
|
|
startup-hooks)
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(setq meta-buf (ediff-prepare-meta-buffer
|
2019-06-21 05:16:54 +00:00
|
|
|
|
#'ediff-filegroup-action
|
2002-03-05 05:34:19 +00:00
|
|
|
|
(car dir-diff-struct)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
"*Ediff Session Group Panel"
|
2019-06-21 05:16:54 +00:00
|
|
|
|
#'ediff-redraw-directory-group-buffer
|
1995-10-06 01:01:08 +00:00
|
|
|
|
jobname
|
|
|
|
|
startup-hooks))
|
|
|
|
|
(ediff-show-meta-buffer meta-buf)
|
|
|
|
|
))
|
|
|
|
|
|
1999-11-01 07:16:15 +00:00
|
|
|
|
;; MERGE-AUTOSTORE-DIR can be given to tell ediff where to store the merged
|
|
|
|
|
;; files
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(defun ediff-directory-revisions-internal (dir1 regexp action jobname
|
1999-11-01 07:16:15 +00:00
|
|
|
|
&optional startup-hooks
|
|
|
|
|
merge-autostore-dir)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(setq dir1 (if (file-directory-p dir1) dir1 (file-name-directory dir1)))
|
1996-09-20 01:10:05 +00:00
|
|
|
|
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(if merge-autostore-dir
|
|
|
|
|
(or (stringp merge-autostore-dir)
|
|
|
|
|
(error "%S: Directory for storing merged files must be a string"
|
|
|
|
|
jobname)))
|
|
|
|
|
(let (file-list meta-buf)
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(if (and ediff-autostore-merges
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(ediff-merge-metajob jobname)
|
|
|
|
|
(not merge-autostore-dir))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(setq merge-autostore-dir
|
2006-06-18 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-cmd.el (viper-special-read-and-insert-char): use
read-key-sequence.
(viper-after-change-undo-hook): enhancements.
(viper-after-change-undo-hook): new hook.
(viper-undo): use viper-after-change-undo-hook.
(viper-add-newline-at-eob-if-necessary): widen before making changes.
(viper-next-line-at-bol): If point is on a widget or a button, simulate
clicking on that widget/button.
* viper.el (viper-mode): allow for a separate cursor color in Emacs
state.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
(ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
2006-06-18 17:08:24 +00:00
|
|
|
|
(read-directory-name "Save merged files in directory: "
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(if ediff-use-last-dir
|
|
|
|
|
ediff-last-merge-autostore-dir
|
|
|
|
|
(ediff-strip-last-dir dir1))
|
|
|
|
|
nil
|
|
|
|
|
'must-match)))
|
1996-09-20 01:10:05 +00:00
|
|
|
|
;; verify merge-autostore-dir != dir1
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(if (and merge-autostore-dir
|
1996-09-20 01:10:05 +00:00
|
|
|
|
(stringp dir1)
|
|
|
|
|
(string= merge-autostore-dir dir1))
|
|
|
|
|
(or (y-or-n-p
|
1999-11-01 07:16:15 +00:00
|
|
|
|
"Directory for saving merged file = directory A. Sure? ")
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Merge of directory revisions aborted")))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(setq file-list
|
1996-09-20 01:10:05 +00:00
|
|
|
|
(ediff-get-directory-files-under-revision
|
|
|
|
|
jobname regexp dir1 merge-autostore-dir))
|
2019-06-21 05:16:54 +00:00
|
|
|
|
;; this sets various vars in the meta buffer inside
|
|
|
|
|
;; ediff-prepare-meta-buffer
|
|
|
|
|
(push (lambda ()
|
|
|
|
|
;; tell what to do if the user clicks on a session record
|
|
|
|
|
(setq ediff-session-action-function action))
|
|
|
|
|
startup-hooks)
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(setq meta-buf (ediff-prepare-meta-buffer
|
2019-06-21 05:16:54 +00:00
|
|
|
|
#'ediff-filegroup-action
|
1995-10-06 01:01:08 +00:00
|
|
|
|
file-list
|
|
|
|
|
"*Ediff Session Group Panel"
|
2019-06-21 05:16:54 +00:00
|
|
|
|
#'ediff-redraw-directory-group-buffer
|
1995-10-06 01:01:08 +00:00
|
|
|
|
jobname
|
|
|
|
|
startup-hooks))
|
|
|
|
|
(ediff-show-meta-buffer meta-buf)
|
|
|
|
|
))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Compare regions and windows
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
1995-06-05 23:41:43 +00:00
|
|
|
|
(defun ediff-windows-wordwise (dumb-mode &optional wind-A wind-B startup-hooks)
|
|
|
|
|
"Compare WIND-A and WIND-B, which are selected by clicking, wordwise.
|
2018-11-27 08:09:55 +00:00
|
|
|
|
This compares the portions of text visible in each of the two windows.
|
1995-03-16 22:31:54 +00:00
|
|
|
|
With prefix argument, DUMB-MODE, or on a non-windowing display, works as
|
|
|
|
|
follows:
|
|
|
|
|
If WIND-A is nil, use selected window.
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
If WIND-B is nil, use window next to WIND-A.
|
|
|
|
|
STARTUP-HOOKS is a list of functions that Emacs calls without
|
|
|
|
|
arguments after setting up the Ediff buffers."
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(interactive "P")
|
1995-06-05 23:41:43 +00:00
|
|
|
|
(ediff-windows dumb-mode wind-A wind-B
|
|
|
|
|
startup-hooks 'ediff-windows-wordwise 'word-mode))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-06-05 23:41:43 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-windows-linewise (dumb-mode &optional wind-A wind-B startup-hooks)
|
|
|
|
|
"Compare WIND-A and WIND-B, which are selected by clicking, linewise.
|
2018-11-27 08:09:55 +00:00
|
|
|
|
This compares the portions of text visible in each of the two windows.
|
1995-06-05 23:41:43 +00:00
|
|
|
|
With prefix argument, DUMB-MODE, or on a non-windowing display, works as
|
|
|
|
|
follows:
|
|
|
|
|
If WIND-A is nil, use selected window.
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
If WIND-B is nil, use window next to WIND-A.
|
|
|
|
|
STARTUP-HOOKS is a list of functions that Emacs calls without
|
|
|
|
|
arguments after setting up the Ediff buffers."
|
1995-06-05 23:41:43 +00:00
|
|
|
|
(interactive "P")
|
|
|
|
|
(ediff-windows dumb-mode wind-A wind-B
|
|
|
|
|
startup-hooks 'ediff-windows-linewise nil))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
2018-11-27 08:09:55 +00:00
|
|
|
|
;; Compare visible portions of text in WIND-A and WIND-B, which are
|
|
|
|
|
;; selected by clicking.
|
1995-06-05 23:41:43 +00:00
|
|
|
|
;; With prefix argument, DUMB-MODE, or on a non-windowing display,
|
|
|
|
|
;; works as follows:
|
|
|
|
|
;; If WIND-A is nil, use selected window.
|
|
|
|
|
;; If WIND-B is nil, use window next to WIND-A.
|
|
|
|
|
(defun ediff-windows (dumb-mode wind-A wind-B startup-hooks job-name word-mode)
|
2021-01-02 22:10:17 +00:00
|
|
|
|
(if (or dumb-mode (not (display-mouse-p)))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(setq wind-A (ediff-get-next-window wind-A nil)
|
|
|
|
|
wind-B (ediff-get-next-window wind-B wind-A))
|
|
|
|
|
(setq wind-A (ediff-get-window-by-clicking wind-A nil 1)
|
|
|
|
|
wind-B (ediff-get-window-by-clicking wind-B wind-A 2)))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(let ((buffer-A (window-buffer wind-A))
|
|
|
|
|
(buffer-B (window-buffer wind-B))
|
|
|
|
|
beg-A end-A beg-B end-B)
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(save-window-excursion
|
1996-01-05 22:21:28 +00:00
|
|
|
|
(sit-for 0) ; sync before using window-start/end -- a precaution
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(select-window wind-A)
|
|
|
|
|
(setq beg-A (window-start)
|
|
|
|
|
end-A (window-end))
|
|
|
|
|
(select-window wind-B)
|
|
|
|
|
(setq beg-B (window-start)
|
|
|
|
|
end-B (window-end))))
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
(setq buffer-A
|
|
|
|
|
(ediff-clone-buffer-for-window-comparison
|
2002-03-05 05:34:19 +00:00
|
|
|
|
buffer-A wind-A "-Window.A-")
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
buffer-B
|
|
|
|
|
(ediff-clone-buffer-for-window-comparison
|
2002-03-05 05:34:19 +00:00
|
|
|
|
buffer-B wind-B "-Window.B-"))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(ediff-regions-internal
|
|
|
|
|
buffer-A beg-A end-A buffer-B beg-B end-B
|
1997-05-31 01:10:39 +00:00
|
|
|
|
startup-hooks job-name word-mode nil)))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;;;###autoload
|
1995-06-05 23:41:43 +00:00
|
|
|
|
(defun ediff-regions-wordwise (buffer-A buffer-B &optional startup-hooks)
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
"Run Ediff on a pair of regions in specified buffers.
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
BUFFER-A and BUFFER-B are the buffers to be compared.
|
2015-09-17 23:08:20 +00:00
|
|
|
|
Regions (i.e., point and mark) can be set in advance or marked interactively.
|
2018-11-27 08:09:55 +00:00
|
|
|
|
This function might be slow for large regions. If you find it slow,
|
|
|
|
|
use `ediff-regions-linewise' instead.
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
STARTUP-HOOKS is a list of functions that Emacs calls without
|
|
|
|
|
arguments after setting up the Ediff buffers."
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(interactive
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(let (bf)
|
2021-11-09 12:51:48 +00:00
|
|
|
|
(list (setq bf (read-buffer "Region A's buffer: "
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(ediff-other-buffer "") t))
|
2021-11-09 12:51:48 +00:00
|
|
|
|
(read-buffer "Region B's buffer: "
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(progn
|
|
|
|
|
;; realign buffers so that two visible bufs will be
|
|
|
|
|
;; at the top
|
|
|
|
|
(save-window-excursion (other-window 1))
|
|
|
|
|
(ediff-other-buffer bf))
|
|
|
|
|
t))))
|
|
|
|
|
(if (not (ediff-buffer-live-p buffer-A))
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Buffer %S doesn't exist" buffer-A))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(if (not (ediff-buffer-live-p buffer-B))
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Buffer %S doesn't exist" buffer-B))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
|
|
|
|
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
(let ((buffer-A
|
2002-03-05 05:34:19 +00:00
|
|
|
|
(ediff-clone-buffer-for-region-comparison buffer-A "-Region.A-"))
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
(buffer-B
|
2002-03-05 05:34:19 +00:00
|
|
|
|
(ediff-clone-buffer-for-region-comparison buffer-B "-Region.B-"))
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
reg-A-beg reg-A-end reg-B-beg reg-B-end)
|
* x-dnd.el (x-dnd-maybe-call-test-function):
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
2009-11-13 22:19:45 +00:00
|
|
|
|
(with-current-buffer buffer-A
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(setq reg-A-beg (region-beginning)
|
|
|
|
|
reg-A-end (region-end))
|
|
|
|
|
(set-buffer buffer-B)
|
|
|
|
|
(setq reg-B-beg (region-beginning)
|
|
|
|
|
reg-B-end (region-end)))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(ediff-regions-internal
|
|
|
|
|
(get-buffer buffer-A) reg-A-beg reg-A-end
|
|
|
|
|
(get-buffer buffer-B) reg-B-beg reg-B-end
|
1997-05-31 01:10:39 +00:00
|
|
|
|
startup-hooks 'ediff-regions-wordwise 'word-mode nil)))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;;;###autoload
|
1995-06-05 23:41:43 +00:00
|
|
|
|
(defun ediff-regions-linewise (buffer-A buffer-B &optional startup-hooks)
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
"Run Ediff on a pair of regions in specified buffers.
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
BUFFER-A and BUFFER-B are the buffers to be compared.
|
2015-09-17 23:08:20 +00:00
|
|
|
|
Regions (i.e., point and mark) can be set in advance or marked interactively.
|
1995-03-16 22:31:54 +00:00
|
|
|
|
Each region is enlarged to contain full lines.
|
|
|
|
|
This function is effective for large regions, over 100-200
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
lines. For small regions, use `ediff-regions-wordwise'.
|
|
|
|
|
STARTUP-HOOKS is a list of functions that Emacs calls without
|
|
|
|
|
arguments after setting up the Ediff buffers."
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(interactive
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(let (bf)
|
|
|
|
|
(list (setq bf (read-buffer "Region A's buffer: "
|
|
|
|
|
(ediff-other-buffer "") t))
|
|
|
|
|
(read-buffer "Region B's buffer: "
|
|
|
|
|
(progn
|
|
|
|
|
;; realign buffers so that two visible bufs will be
|
|
|
|
|
;; at the top
|
|
|
|
|
(save-window-excursion (other-window 1))
|
|
|
|
|
(ediff-other-buffer bf))
|
|
|
|
|
t))))
|
1994-07-20 20:04:47 +00:00
|
|
|
|
(if (not (ediff-buffer-live-p buffer-A))
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Buffer %S doesn't exist" buffer-A))
|
1994-07-20 20:04:47 +00:00
|
|
|
|
(if (not (ediff-buffer-live-p buffer-B))
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Buffer %S doesn't exist" buffer-B))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
(let ((buffer-A
|
2002-03-05 05:34:19 +00:00
|
|
|
|
(ediff-clone-buffer-for-region-comparison buffer-A "-Region.A-"))
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
(buffer-B
|
2002-03-05 05:34:19 +00:00
|
|
|
|
(ediff-clone-buffer-for-region-comparison buffer-B "-Region.B-"))
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
reg-A-beg reg-A-end reg-B-beg reg-B-end)
|
* x-dnd.el (x-dnd-maybe-call-test-function):
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
2009-11-13 22:19:45 +00:00
|
|
|
|
(with-current-buffer buffer-A
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(setq reg-A-beg (region-beginning)
|
|
|
|
|
reg-A-end (region-end))
|
|
|
|
|
;; enlarge the region to hold full lines
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(goto-char reg-A-beg)
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(setq reg-A-beg (point))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(goto-char reg-A-end)
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(end-of-line)
|
|
|
|
|
(or (eobp) (forward-char)) ; include the newline char
|
|
|
|
|
(setq reg-A-end (point))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(set-buffer buffer-B)
|
|
|
|
|
(setq reg-B-beg (region-beginning)
|
|
|
|
|
reg-B-end (region-end))
|
|
|
|
|
;; enlarge the region to hold full lines
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(goto-char reg-B-beg)
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(setq reg-B-beg (point))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(goto-char reg-B-end)
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(end-of-line)
|
|
|
|
|
(or (eobp) (forward-char)) ; include the newline char
|
|
|
|
|
(setq reg-B-end (point))
|
|
|
|
|
) ; save excursion
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(ediff-regions-internal
|
|
|
|
|
(get-buffer buffer-A) reg-A-beg reg-A-end
|
|
|
|
|
(get-buffer buffer-B) reg-B-beg reg-B-end
|
1997-07-17 19:37:07 +00:00
|
|
|
|
startup-hooks 'ediff-regions-linewise nil nil))) ; no word mode
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;; compare region beg-A to end-A of buffer-A
|
2003-02-04 11:26:42 +00:00
|
|
|
|
;; to regions beg-B -- end-B in buffer-B.
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(defun ediff-regions-internal (buffer-A beg-A end-A buffer-B beg-B end-B
|
1997-05-31 01:10:39 +00:00
|
|
|
|
startup-hooks job-name word-mode
|
|
|
|
|
setup-parameters)
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(let ((tmp-buffer (get-buffer-create ediff-tmp-buffer))
|
|
|
|
|
overl-A overl-B
|
|
|
|
|
file-A file-B)
|
2009-12-07 06:56:40 +00:00
|
|
|
|
(unwind-protect
|
|
|
|
|
(progn
|
|
|
|
|
;; in case beg/end-A/B aren't markers--make them into markers
|
|
|
|
|
(ediff-with-current-buffer buffer-A
|
|
|
|
|
(setq beg-A (move-marker (make-marker) beg-A)
|
|
|
|
|
end-A (move-marker (make-marker) end-A)))
|
|
|
|
|
(ediff-with-current-buffer buffer-B
|
|
|
|
|
(setq beg-B (move-marker (make-marker) beg-B)
|
|
|
|
|
end-B (move-marker (make-marker) end-B)))
|
2012-07-16 10:19:56 +00:00
|
|
|
|
|
2009-12-07 06:56:40 +00:00
|
|
|
|
;; make file-A
|
|
|
|
|
(if word-mode
|
|
|
|
|
(ediff-wordify beg-A end-A buffer-A tmp-buffer)
|
|
|
|
|
(ediff-copy-to-buffer beg-A end-A buffer-A tmp-buffer))
|
|
|
|
|
(setq file-A (ediff-make-temp-file tmp-buffer "regA"))
|
|
|
|
|
|
|
|
|
|
;; make file-B
|
|
|
|
|
(if word-mode
|
|
|
|
|
(ediff-wordify beg-B end-B buffer-B tmp-buffer)
|
|
|
|
|
(ediff-copy-to-buffer beg-B end-B buffer-B tmp-buffer))
|
|
|
|
|
(setq file-B (ediff-make-temp-file tmp-buffer "regB"))
|
2012-07-16 10:19:56 +00:00
|
|
|
|
|
2009-12-07 06:56:40 +00:00
|
|
|
|
(setq overl-A (ediff-make-bullet-proof-overlay beg-A end-A buffer-A))
|
|
|
|
|
(setq overl-B (ediff-make-bullet-proof-overlay beg-B end-B buffer-B))
|
|
|
|
|
(ediff-setup buffer-A file-A
|
|
|
|
|
buffer-B file-B
|
|
|
|
|
nil nil ; buffer & file C
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(cons (lambda ()
|
|
|
|
|
(delete-file file-A)
|
|
|
|
|
(delete-file file-B))
|
2009-12-07 06:56:40 +00:00
|
|
|
|
startup-hooks)
|
|
|
|
|
(append
|
|
|
|
|
(list (cons 'ediff-word-mode word-mode)
|
|
|
|
|
(cons 'ediff-narrow-bounds (list overl-A overl-B))
|
|
|
|
|
(cons 'ediff-job-name job-name))
|
|
|
|
|
setup-parameters)))
|
|
|
|
|
(if (and (stringp file-A) (file-exists-p file-A))
|
|
|
|
|
(delete-file file-A))
|
|
|
|
|
(if (and (stringp file-B) (file-exists-p file-B))
|
|
|
|
|
(delete-file file-B)))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;;; Merge files and buffers
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defalias 'ediff-merge 'ediff-merge-files)
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(defsubst ediff-merge-on-startup ()
|
|
|
|
|
(ediff-do-merge 0)
|
2005-02-19 04:46:24 +00:00
|
|
|
|
;; Can't remember why this is here, but it may cause the automatically merged
|
|
|
|
|
;; buffer to be lost. So, keep the buffer modified.
|
|
|
|
|
;;(ediff-with-current-buffer ediff-buffer-C
|
|
|
|
|
;; (set-buffer-modified-p nil))
|
|
|
|
|
)
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
1997-11-01 01:46:51 +00:00
|
|
|
|
(defun ediff-merge-files (file-A file-B
|
|
|
|
|
;; MERGE-BUFFER-FILE is the file to be
|
2003-02-04 11:26:42 +00:00
|
|
|
|
;; associated with the merge buffer
|
1997-11-01 01:46:51 +00:00
|
|
|
|
&optional startup-hooks merge-buffer-file)
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Merge two files without ancestor.
|
|
|
|
|
FILE-A and FILE-B are the names of the files to be merged.
|
|
|
|
|
STARTUP-HOOKS is a list of functions that Emacs calls without
|
|
|
|
|
arguments after setting up the Ediff buffers. MERGE-BUFFER-FILE
|
|
|
|
|
is the name of the file to be associated with the merge buffer.."
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(interactive
|
|
|
|
|
(let ((dir-A (if ediff-use-last-dir
|
|
|
|
|
ediff-last-dir-A
|
|
|
|
|
default-directory))
|
|
|
|
|
dir-B f)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(list (setq f (ediff-read-file-name
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
"File A to merge"
|
|
|
|
|
dir-A
|
|
|
|
|
(ediff-get-default-file-name)
|
|
|
|
|
'no-dirs))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(ediff-read-file-name "File B to merge"
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(setq dir-B
|
|
|
|
|
(if ediff-use-last-dir
|
2003-02-04 11:26:42 +00:00
|
|
|
|
ediff-last-dir-B
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(file-name-directory f)))
|
|
|
|
|
(progn
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(add-to-history
|
2006-09-18 19:22:31 +00:00
|
|
|
|
'file-name-history
|
|
|
|
|
(ediff-abbreviate-file-name
|
|
|
|
|
(expand-file-name
|
|
|
|
|
(file-name-nondirectory f)
|
|
|
|
|
dir-B)))
|
2000-10-29 04:56:45 +00:00
|
|
|
|
(ediff-get-default-file-name f 1)))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
)))
|
|
|
|
|
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(ediff-files-internal file-A
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(if (file-directory-p file-B)
|
|
|
|
|
(expand-file-name
|
|
|
|
|
(file-name-nondirectory file-A) file-B)
|
|
|
|
|
file-B)
|
|
|
|
|
nil ; file-C
|
|
|
|
|
startup-hooks
|
1997-11-01 01:46:51 +00:00
|
|
|
|
'ediff-merge-files
|
|
|
|
|
merge-buffer-file))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-merge-files-with-ancestor (file-A file-B file-ancestor
|
1997-11-01 01:46:51 +00:00
|
|
|
|
&optional
|
|
|
|
|
startup-hooks
|
|
|
|
|
;; MERGE-BUFFER-FILE is the file
|
|
|
|
|
;; to be associated with the
|
|
|
|
|
;; merge buffer
|
|
|
|
|
merge-buffer-file)
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Merge two files with ancestor.
|
|
|
|
|
FILE-A and FILE-B are the names of the files to be merged, and
|
|
|
|
|
FILE-ANCESTOR is the name of the ancestor file. STARTUP-HOOKS is
|
|
|
|
|
a list of functions that Emacs calls without arguments after
|
|
|
|
|
setting up the Ediff buffers. MERGE-BUFFER-FILE is the name of
|
|
|
|
|
the file to be associated with the merge buffer."
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(interactive
|
|
|
|
|
(let ((dir-A (if ediff-use-last-dir
|
|
|
|
|
ediff-last-dir-A
|
|
|
|
|
default-directory))
|
|
|
|
|
dir-B dir-ancestor f ff)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(list (setq f (ediff-read-file-name
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
"File A to merge"
|
|
|
|
|
dir-A
|
|
|
|
|
(ediff-get-default-file-name)
|
|
|
|
|
'no-dirs))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(setq ff (ediff-read-file-name "File B to merge"
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(setq dir-B
|
|
|
|
|
(if ediff-use-last-dir
|
2003-02-04 11:26:42 +00:00
|
|
|
|
ediff-last-dir-B
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(file-name-directory f)))
|
|
|
|
|
(progn
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(add-to-history
|
2006-09-18 19:22:31 +00:00
|
|
|
|
'file-name-history
|
|
|
|
|
(ediff-abbreviate-file-name
|
|
|
|
|
(expand-file-name
|
|
|
|
|
(file-name-nondirectory f)
|
|
|
|
|
dir-B)))
|
2000-10-29 04:56:45 +00:00
|
|
|
|
(ediff-get-default-file-name f 1))))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(ediff-read-file-name "Ancestor file"
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(setq dir-ancestor
|
|
|
|
|
(if ediff-use-last-dir
|
|
|
|
|
ediff-last-dir-ancestor
|
|
|
|
|
(file-name-directory ff)))
|
|
|
|
|
(progn
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(add-to-history
|
2006-09-18 19:22:31 +00:00
|
|
|
|
'file-name-history
|
|
|
|
|
(ediff-abbreviate-file-name
|
|
|
|
|
(expand-file-name
|
|
|
|
|
(file-name-nondirectory ff)
|
|
|
|
|
dir-ancestor)))
|
2000-10-29 04:56:45 +00:00
|
|
|
|
(ediff-get-default-file-name ff 2)))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
)))
|
|
|
|
|
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(ediff-files-internal file-A
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(if (file-directory-p file-B)
|
|
|
|
|
(expand-file-name
|
|
|
|
|
(file-name-nondirectory file-A) file-B)
|
|
|
|
|
file-B)
|
|
|
|
|
file-ancestor
|
|
|
|
|
startup-hooks
|
1997-11-01 01:46:51 +00:00
|
|
|
|
'ediff-merge-files-with-ancestor
|
|
|
|
|
merge-buffer-file))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defalias 'ediff-merge-with-ancestor 'ediff-merge-files-with-ancestor)
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;;;###autoload
|
1997-11-01 01:46:51 +00:00
|
|
|
|
(defun ediff-merge-buffers (buffer-A buffer-B
|
|
|
|
|
&optional
|
|
|
|
|
;; MERGE-BUFFER-FILE is the file to be
|
|
|
|
|
;; associated with the merge buffer
|
|
|
|
|
startup-hooks job-name merge-buffer-file)
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Merge buffers without ancestor.
|
|
|
|
|
BUFFER-A and BUFFER-B are the buffers to be merged.
|
|
|
|
|
STARTUP-HOOKS is a list of functions that Emacs calls without
|
|
|
|
|
arguments after setting up the Ediff buffers. JOB-NAME is a
|
|
|
|
|
symbol describing the Ediff job type; it defaults to
|
|
|
|
|
`ediff-merge-buffers', but can also be one of
|
|
|
|
|
`ediff-merge-files-with-ancestor', `ediff-last-dir-ancestor',
|
|
|
|
|
`ediff-last-dir-C', `ediff-buffers', `ediff-buffers3', or
|
|
|
|
|
`ediff-merge-buffers-with-ancestor'. MERGE-BUFFER-FILE is the
|
|
|
|
|
name of the file to be associated with the merge buffer."
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(interactive
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(let (bf)
|
|
|
|
|
(list (setq bf (read-buffer "Buffer A to merge: "
|
|
|
|
|
(ediff-other-buffer "") t))
|
|
|
|
|
(read-buffer "Buffer B to merge: "
|
|
|
|
|
(progn
|
|
|
|
|
;; realign buffers so that two visible bufs will be
|
|
|
|
|
;; at the top
|
|
|
|
|
(save-window-excursion (other-window 1))
|
|
|
|
|
(ediff-other-buffer bf))
|
|
|
|
|
t))))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
|
|
|
|
|
(or job-name (setq job-name 'ediff-merge-buffers))
|
|
|
|
|
(ediff-buffers-internal
|
1997-11-01 01:46:51 +00:00
|
|
|
|
buffer-A buffer-B nil startup-hooks job-name merge-buffer-file))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;;;###autoload
|
1997-11-01 01:46:51 +00:00
|
|
|
|
(defun ediff-merge-buffers-with-ancestor (buffer-A buffer-B buffer-ancestor
|
|
|
|
|
&optional
|
|
|
|
|
startup-hooks
|
|
|
|
|
job-name
|
|
|
|
|
;; MERGE-BUFFER-FILE is the
|
|
|
|
|
;; file to be associated
|
|
|
|
|
;; with the merge buffer
|
|
|
|
|
merge-buffer-file)
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Merge buffers with ancestor.
|
|
|
|
|
BUFFER-A and BUFFER-B are the buffers to be merged, and
|
|
|
|
|
BUFFER-ANCESTOR is their ancestor. STARTUP-HOOKS is a list of
|
|
|
|
|
functions that Emacs calls without arguments after setting up the
|
|
|
|
|
Ediff buffers. JOB-NAME is a symbol describing the Ediff job
|
|
|
|
|
type; it defaults to `ediff-merge-buffers-with-ancestor', but can
|
|
|
|
|
also be one of `ediff-merge-files-with-ancestor',
|
|
|
|
|
`ediff-last-dir-ancestor', `ediff-last-dir-C', `ediff-buffers',
|
|
|
|
|
`ediff-buffers3', or `ediff-merge-buffers'. MERGE-BUFFER-FILE is
|
|
|
|
|
the name of the file to be associated with the merge buffer."
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(interactive
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(let (bf bff)
|
|
|
|
|
(list (setq bf (read-buffer "Buffer A to merge: "
|
|
|
|
|
(ediff-other-buffer "") t))
|
|
|
|
|
(setq bff (read-buffer "Buffer B to merge: "
|
|
|
|
|
(progn
|
|
|
|
|
;; realign buffers so that two visible
|
|
|
|
|
;; bufs will be at the top
|
|
|
|
|
(save-window-excursion (other-window 1))
|
|
|
|
|
(ediff-other-buffer bf))
|
|
|
|
|
t))
|
|
|
|
|
(read-buffer "Ancestor buffer: "
|
|
|
|
|
(progn
|
|
|
|
|
;; realign buffers so that three visible
|
|
|
|
|
;; bufs will be at the top
|
|
|
|
|
(save-window-excursion (other-window 1))
|
|
|
|
|
(ediff-other-buffer (list bf bff)))
|
|
|
|
|
t)
|
|
|
|
|
)))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
|
|
|
|
|
(or job-name (setq job-name 'ediff-merge-buffers-with-ancestor))
|
|
|
|
|
(ediff-buffers-internal
|
1997-11-01 01:46:51 +00:00
|
|
|
|
buffer-A buffer-B buffer-ancestor startup-hooks job-name merge-buffer-file))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
1997-11-01 01:46:51 +00:00
|
|
|
|
(defun ediff-merge-revisions (&optional file startup-hooks merge-buffer-file)
|
|
|
|
|
;; MERGE-BUFFER-FILE is the file to be associated with the merge buffer
|
1995-03-16 22:31:54 +00:00
|
|
|
|
"Run Ediff by merging two revisions of a file.
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
The file is the optional FILE argument or the file visited by the
|
|
|
|
|
current buffer. STARTUP-HOOKS is a list of functions that Emacs
|
|
|
|
|
calls without arguments after setting up the Ediff buffers.
|
|
|
|
|
MERGE-BUFFER-FILE is the name of the file to be associated with
|
|
|
|
|
the merge buffer."
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(interactive)
|
|
|
|
|
(if (stringp file) (find-file file))
|
1996-02-16 06:36:35 +00:00
|
|
|
|
(let (rev1 rev2)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(setq rev1
|
|
|
|
|
(read-string
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(format-prompt "Version 1 to merge"
|
|
|
|
|
(concat
|
|
|
|
|
(if (stringp file)
|
|
|
|
|
(file-name-nondirectory file)
|
|
|
|
|
"current buffer")
|
|
|
|
|
"'s working version")))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
rev2
|
|
|
|
|
(read-string
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(format-prompt "Version 2 to merge"
|
|
|
|
|
(if (stringp file)
|
|
|
|
|
(file-name-nondirectory file)
|
|
|
|
|
"current buffer"))))
|
1996-02-16 06:36:35 +00:00
|
|
|
|
(ediff-load-version-control)
|
|
|
|
|
;; ancestor-revision=nil
|
|
|
|
|
(funcall
|
1996-09-20 01:10:05 +00:00
|
|
|
|
(intern (format "ediff-%S-merge-internal" ediff-version-control-package))
|
1997-11-01 01:46:51 +00:00
|
|
|
|
rev1 rev2 nil startup-hooks merge-buffer-file)))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
1997-11-01 01:46:51 +00:00
|
|
|
|
(defun ediff-merge-revisions-with-ancestor (&optional
|
|
|
|
|
file startup-hooks
|
|
|
|
|
;; MERGE-BUFFER-FILE is the file to
|
|
|
|
|
;; be associated with the merge
|
|
|
|
|
;; buffer
|
|
|
|
|
merge-buffer-file)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
"Run Ediff by merging two revisions of a file with a common ancestor.
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
The file is the optional FILE argument or the file visited by the
|
|
|
|
|
current buffer. STARTUP-HOOKS is a list of functions that Emacs
|
|
|
|
|
calls without arguments after setting up the Ediff buffers.
|
|
|
|
|
MERGE-BUFFER-FILE is the name of the file to be associated with
|
|
|
|
|
the merge buffer."
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(interactive)
|
|
|
|
|
(if (stringp file) (find-file file))
|
1996-02-16 06:36:35 +00:00
|
|
|
|
(let (rev1 rev2 ancestor-rev)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(setq rev1
|
|
|
|
|
(read-string
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(format-prompt "Version 1 to merge"
|
|
|
|
|
(concat
|
|
|
|
|
(if (stringp file)
|
|
|
|
|
(file-name-nondirectory file)
|
|
|
|
|
"current buffer")
|
|
|
|
|
"'s working version")))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
rev2
|
|
|
|
|
(read-string
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(format-prompt "Version 2 to merge"
|
|
|
|
|
(if (stringp file)
|
|
|
|
|
(file-name-nondirectory file)
|
|
|
|
|
"current buffer")))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
ancestor-rev
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(read-string (format-prompt
|
|
|
|
|
"Ancestor version"
|
|
|
|
|
(concat
|
|
|
|
|
(if (stringp file)
|
|
|
|
|
(file-name-nondirectory file)
|
|
|
|
|
"current buffer")
|
|
|
|
|
"'s base revision"))))
|
1996-02-16 06:36:35 +00:00
|
|
|
|
(ediff-load-version-control)
|
|
|
|
|
(funcall
|
1996-09-20 01:10:05 +00:00
|
|
|
|
(intern (format "ediff-%S-merge-internal" ediff-version-control-package))
|
1997-11-01 01:46:51 +00:00
|
|
|
|
rev1 rev2 ancestor-rev startup-hooks merge-buffer-file)))
|
1996-02-16 06:36:35 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;;; Apply patch
|
2013-05-23 07:10:05 +00:00
|
|
|
|
(defvar ediff-last-dir-patch)
|
|
|
|
|
(defvar ediff-patch-default-directory)
|
|
|
|
|
(declare-function ediff-get-patch-buffer "ediff-ptch"
|
|
|
|
|
(&optional arg patch-buf))
|
|
|
|
|
(declare-function ediff-dispatch-file-patching-job "ediff-ptch"
|
|
|
|
|
(patch-buf filename &optional startup-hooks))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
1996-06-22 01:54:34 +00:00
|
|
|
|
;;;###autoload
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(defun ediff-patch-file (&optional arg patch-buf)
|
2011-07-11 15:03:24 +00:00
|
|
|
|
"Query for a file name, and then run Ediff by patching that file.
|
1999-11-01 07:16:15 +00:00
|
|
|
|
If optional PATCH-BUF is given, use the patch in that buffer
|
|
|
|
|
and don't ask the user.
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
If prefix argument ARG, then: if even argument, assume that the
|
|
|
|
|
patch is in a buffer. If odd -- assume it is in a file."
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(interactive "P")
|
|
|
|
|
(let (source-dir source-file)
|
1996-06-22 01:54:34 +00:00
|
|
|
|
(require 'ediff-ptch)
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(setq patch-buf
|
|
|
|
|
(ediff-get-patch-buffer
|
2016-03-20 11:12:27 +00:00
|
|
|
|
(and arg (prefix-numeric-value arg))
|
|
|
|
|
(and patch-buf (get-buffer patch-buf))))
|
1996-06-22 01:54:34 +00:00
|
|
|
|
(setq source-dir (cond (ediff-use-last-dir ediff-last-dir-patch)
|
|
|
|
|
((and (not ediff-patch-default-directory)
|
|
|
|
|
(buffer-file-name patch-buf))
|
|
|
|
|
(file-name-directory
|
|
|
|
|
(expand-file-name
|
|
|
|
|
(buffer-file-name patch-buf))))
|
|
|
|
|
(t default-directory)))
|
|
|
|
|
(setq source-file
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(read-file-name
|
1999-11-01 07:16:15 +00:00
|
|
|
|
"File to patch (directory, if multifile patch): "
|
2001-01-19 07:13:03 +00:00
|
|
|
|
;; use an explicit initial file
|
|
|
|
|
source-dir nil nil (ediff-get-default-file-name)))
|
1996-06-22 01:54:34 +00:00
|
|
|
|
(ediff-dispatch-file-patching-job patch-buf source-file)))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
2013-05-23 07:10:05 +00:00
|
|
|
|
(declare-function ediff-patch-buffer-internal "ediff-ptch"
|
|
|
|
|
(patch-buf buf-to-patch-name &optional startup-hooks))
|
|
|
|
|
|
1996-06-22 01:54:34 +00:00
|
|
|
|
;;;###autoload
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(defun ediff-patch-buffer (&optional arg patch-buf)
|
2005-07-19 05:01:20 +00:00
|
|
|
|
"Run Ediff by patching the buffer specified at prompt.
|
|
|
|
|
Without the optional prefix ARG, asks if the patch is in some buffer and
|
|
|
|
|
prompts for the buffer or a file, depending on the answer.
|
|
|
|
|
With ARG=1, assumes the patch is in a file and prompts for the file.
|
|
|
|
|
With ARG=2, assumes the patch is in a buffer and prompts for the buffer.
|
|
|
|
|
PATCH-BUF is an optional argument, which specifies the buffer that contains the
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
patch. If not given, the user is prompted according to the prefix argument."
|
1999-11-01 07:16:15 +00:00
|
|
|
|
(interactive "P")
|
|
|
|
|
(require 'ediff-ptch)
|
|
|
|
|
(setq patch-buf
|
|
|
|
|
(ediff-get-patch-buffer
|
|
|
|
|
(if arg (prefix-numeric-value arg)) patch-buf))
|
|
|
|
|
(ediff-patch-buffer-internal
|
|
|
|
|
patch-buf
|
2016-02-23 05:04:06 +00:00
|
|
|
|
(read-buffer "Which buffer to patch? " (ediff-other-buffer patch-buf)
|
|
|
|
|
'require-match)))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
1999-11-01 07:16:15 +00:00
|
|
|
|
|
1996-06-22 01:54:34 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defalias 'epatch 'ediff-patch-file)
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defalias 'epatch-buffer 'ediff-patch-buffer)
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
|
|
|
|
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
|
2003-02-04 11:26:42 +00:00
|
|
|
|
;;; Versions Control functions
|
|
|
|
|
|
1994-05-02 05:16:59 +00:00
|
|
|
|
;;;###autoload
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(defun ediff-revision (&optional file startup-hooks)
|
|
|
|
|
"Run Ediff by comparing versions of a file.
|
2000-12-25 07:57:37 +00:00
|
|
|
|
The file is an optional FILE argument or the file entered at the prompt.
|
|
|
|
|
Default: the file visited by the current buffer.
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'.
|
|
|
|
|
STARTUP-HOOKS is a list of functions that Emacs calls without
|
|
|
|
|
arguments after setting up the Ediff buffers."
|
1995-10-06 01:01:08 +00:00
|
|
|
|
;; if buffer is non-nil, use that buffer instead of the current buffer
|
1995-06-05 23:41:43 +00:00
|
|
|
|
(interactive "P")
|
2000-12-25 07:57:37 +00:00
|
|
|
|
(if (not (stringp file))
|
|
|
|
|
(setq file
|
|
|
|
|
(ediff-read-file-name "Compare revisions for file"
|
|
|
|
|
(if ediff-use-last-dir
|
|
|
|
|
ediff-last-dir-A
|
|
|
|
|
default-directory)
|
2002-01-07 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-init.el (viper-cond-compile-for-xemacs-or-emacs):
new macro that replaces viper-emacs-p and viper-xemacs-p in many
cases. Used to reduce the number of warnings.
* viper-cmd.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-standard-value): moved here from viper.el.
(viper-set-unread-command-events): moved to viper-util.el
(viper-check-minibuffer-overlay): make sure
viper-minibuffer-overlay is moved to cover the entire input field.
* viper-util.el: use viper-cond-compile-for-xemacs-or-emacs.
(viper-read-key-sequence, viper-set-unread-command-events,
viper-char-symbol-sequence-p, viper-char-array-p): moved here.
* viper-ex.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-keym.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-mous.el: use viper-cond-compile-for-xemacs-or-emacs.
* viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p,
viper-event-vector-p): moved to viper-util.el
* viper.el (viper-standard-value): moved to viper-cmd.el.
Use viper-cond-compile-for-xemacs-or-emacs.
* ediff-help.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-hook.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): new
macro designed to be used in many places where ediff-emacs-p or
ediff-xemacs-p was previously used. Reduces the number of
warnings.
Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieue
of ediff-xemacs-p.
(ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer,
ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p,
ediff-whitespace-diff-region-p, ediff-get-region-contents):
moved to ediff-util.el.
(ediff-event-key): moved here.
* ediff-merge.el: got rid of unreferenced variables.
* ediff-mult.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff-util.el: use ediff-cond-compile-for-xemacs-or-emacs.
(ediff-cleanup-mess): improved the way windows are set up after
quitting ediff.
(ediff-janitor): use ediff-dispose-of-variant-according-to-user.
(ediff-dispose-of-variant-according-to-user): new function
designed to be smarter and also understands indirect buffers.
(ediff-highlight-diff-in-one-buffer,
ediff-unhighlight-diff-in-one-buffer,
ediff-unhighlight-diffs-totally-in-one-buffer,
ediff-highlight-diff, ediff-highlight-diff,
ediff-unhighlight-diff, ediff-unhighlight-diffs-totally,
ediff-empty-diff-region-p, ediff-whitespace-diff-region-p,
ediff-get-region-contents, ediff-make-current-diff-overlay):
moved here.
(ediff-format-bindings-of): new function by Hannu Koivisto
<azure@iki.fi>.
(ediff-setup): make sure the merge buffer is always widened and
modifiable.
(ediff-write-merge-buffer-and-maybe-kill): refuse to write the
result of a merge into a file visited by another buffer.
(ediff-arrange-autosave-in-merge-jobs): check if the merge file
is visited by another buffer and ask to save/delete that buffer.
(ediff-verify-file-merge-buffer): new function to do the above.
* ediff-vers.el: load ediff-init.el at compile time.
* ediff-wind.el: use ediff-cond-compile-for-xemacs-or-emacs.
* ediff.el (ediff-windows, ediff-regions-wordwise,
ediff-regions-linewise): use indirect buffers to improve
robustness and make it possible to compare regions of the same
buffer (even overlapping regions).
(ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): new functions.
(ediff-files-internal): refuse to compare identical files.
(ediff-regions-internal): get rid of the warning about comparing
regions of the same buffer.
* ediff-diff.el (ediff-convert-fine-diffs-to-overlays): moved here.
Plus the following fixes courtesy of Dave Love:
Doc fixes.
(ediff-word-1): Use word class and move - to the
front per regexp documentation.
(ediff-wordify): Bind forward-word-function outside loop.
(ediff-copy-to-buffer): Use insert-buffer-substring rather than
consing buffer contents.
(ediff-goto-word): Move syntax table setting outside loop.
2002-01-08 04:36:01 +00:00
|
|
|
|
(ediff-get-default-file-name)
|
2003-02-04 11:26:42 +00:00
|
|
|
|
'no-dirs)))
|
2000-12-25 07:57:37 +00:00
|
|
|
|
(find-file file)
|
|
|
|
|
(if (and (buffer-modified-p)
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
(y-or-n-p (format "Buffer %s is modified. Save buffer? "
|
2006-11-13 10:23:44 +00:00
|
|
|
|
(buffer-name))))
|
2000-12-25 07:57:37 +00:00
|
|
|
|
(save-buffer (current-buffer)))
|
1995-06-05 23:41:43 +00:00
|
|
|
|
(let (rev1 rev2)
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(setq rev1
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(read-string (format-prompt "Revision 1 to compare"
|
|
|
|
|
(concat (file-name-nondirectory file)
|
|
|
|
|
"'s latest revision")))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
rev2
|
2003-02-04 11:26:42 +00:00
|
|
|
|
(read-string
|
Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 14:56:44 +00:00
|
|
|
|
(format-prompt "Revision 2 to compare"
|
|
|
|
|
(concat (file-name-nondirectory file)
|
|
|
|
|
"'s current state"))))
|
1995-06-05 23:41:43 +00:00
|
|
|
|
(ediff-load-version-control)
|
|
|
|
|
(funcall
|
1996-09-20 01:10:05 +00:00
|
|
|
|
(intern (format "ediff-%S-internal" ediff-version-control-package))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
rev1 rev2 startup-hooks)
|
1995-06-05 23:41:43 +00:00
|
|
|
|
))
|
1997-07-17 19:37:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defalias 'erevision 'ediff-revision)
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
|
|
|
|
|
1995-03-16 22:31:54 +00:00
|
|
|
|
;; Test if version control package is loaded and load if not
|
|
|
|
|
;; Is SILENT is non-nil, don't report error if package is not found.
|
|
|
|
|
(defun ediff-load-version-control (&optional silent)
|
1996-02-16 06:36:35 +00:00
|
|
|
|
(require 'ediff-vers)
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(or (featurep ediff-version-control-package)
|
|
|
|
|
(if (locate-library (symbol-name ediff-version-control-package))
|
|
|
|
|
(progn
|
|
|
|
|
(message "") ; kill the message from `locate-library'
|
1995-10-06 01:01:08 +00:00
|
|
|
|
(require ediff-version-control-package))
|
1995-03-16 22:31:54 +00:00
|
|
|
|
(or silent
|
ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-18 00:16:15 +00:00
|
|
|
|
(user-error "Version control package %S.el not found. Use vc.el instead"
|
1995-03-16 22:31:54 +00:00
|
|
|
|
ediff-version-control-package)))))
|
1995-10-06 01:01:08 +00:00
|
|
|
|
|
1994-05-10 00:48:00 +00:00
|
|
|
|
|
1995-10-14 03:14:39 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-version ()
|
|
|
|
|
"Return string describing the version of Ediff.
|
|
|
|
|
When called interactively, displays the version."
|
|
|
|
|
(interactive)
|
Remove most of the XEmacs compat code from ediff*.el
* lisp/vc/ediff-diff.el (ediff-word-1): Remove XEmacs compat code
and declare compatibility functions for obsolete. Adjust all callers.
* lisp/vc/ediff-help.el (ediff-set-help-overlays):
* lisp/vc/ediff-hook.el:
(menu-bar-ediff-misc-menu, menu-bar-ediff-merge-menu)
(menu-bar-ediff-menu, menu-bar-ediff-merge-menu)
(menu-bar-epatch-menu, menu-bar-ediff-misc-menu):
* lisp/vc/ediff-init.el (ediff-device-type)
(ediff-window-display-p, ediff-has-face-support-p)
(ediff-has-toolbar-support-p, ediff-has-gutter-support-p)
(ediff-BAD-INFO, ediff-coding-system-for-write)
(ediff-read-event, ediff-overlayp, ediff-make-overlay)
(ediff-delete-overlay, ediff-color-display-p)
(ediff-display-pixel-width, ediff-display-pixel-height)
(ediff-region-help-echo, ediff-set-face-pixmap)
(ediff-paint-background-regions-in-one-buffer)
(ediff-clear-fine-diff-vector, ediff-mouse-event-p)
(ediff-key-press-event-p, ediff-event-point, )
(ediff-event-buffer, ediff-event-key, ediff-last-command-char)
(ediff-frame-iconified-p, ediff-frame-char-width)
(ediff-reset-mouse, ediff-frame-char-height)
(ediff-overlay-start, ediff-overlay-end, ediff-overlay-buffer)
(ediff-overlay-get, ediff-move-overlay, ediff-overlay-put)
(ediff-abbreviate-file-name):
* lisp/vc/ediff-mult.el (ediff-next-meta-item)
(ediff-previous-meta-item)
(ediff-replace-session-activity-marker-in-meta-buffer)
(ediff-replace-session-status-in-meta-buffer)
(ediff-redraw-directory-group-buffer)
(ediff-update-markers-in-dir-meta-buffer)
(ediff-update-session-marker-in-dir-meta-buffer)
(ediff-redraw-registry-buffer, ediff-set-meta-overlay)
(ediff-update-meta-buffer, ediff-get-meta-info)
(ediff-get-meta-overlay-at-pos, )
(ediff-get-session-number-at-pos, )
(ediff-next-meta-overlay-start)
(ediff-previous-meta-overlay-start, )
(ediff-meta-mark-equal-files):
* lisp/vc/ediff-util.el:
(ediff-setup, ediff-setup-control-buffer, ediff-recenter)
(ediff-recenter-one-window, ediff-toggle-read-only)
(ediff-file-checked-out-p, ediff-file-checked-in-p)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-kill-bottom-toolbar)
(ediff-visible-region, ediff-scroll-vertically)
(ediff-scroll-horizontally, ediff-jump-to-difference-at-point)
(ediff-diff-to-diff, ediff-restore-diff)
(ediff-toggle-regexp-match, ediff-really-quit)
(ediff-cleanup-mess, ediff-highlight-diff-in-one-buffer)
(ediff-unhighlight-diffs-totally-in-one-buffer)
(ediff-save-buffer, ediff-make-cloned-buffer)
(ediff-make-indirect-buffer, ediff-remove-flags-from-buffer)
(ediff-place-flags-in-buffer1, ediff-get-diff-posn)
(ediff-clear-diff-vector, ediff-make-bullet-proof-overlay)
(ediff-submit-report, ediff-deactivate-mark)
(ediff-activate-mark, ediff-profile, ediff-print-diff-vector):
* lisp/vc/ediff-wind.el (ediff-control-frame-parameters)
(ediff-get-window-by-clicking, ediff-select-lowest-window)
(ediff-setup-windows-plain-merge)
(ediff-setup-windows-plain-compare, ediff-setup-control-frame)
(ediff-destroy-control-frame, ediff-make-frame-position)
(ediff-make-wide-display, ediff-get-visible-buffer-window):
* lisp/vc/ediff.el (ediff-version, ediff-documentation):
2019-10-05 14:48:44 +00:00
|
|
|
|
(if (called-interactively-p 'interactive)
|
2007-12-06 00:17:56 +00:00
|
|
|
|
(message "%s" (ediff-version))
|
2019-05-09 12:47:26 +00:00
|
|
|
|
(format "Ediff %s" ediff-version)))
|
1995-10-14 03:14:39 +00:00
|
|
|
|
|
2007-11-27 04:05:08 +00:00
|
|
|
|
;; info is run first, and will autoload info.el.
|
2013-09-12 05:48:22 +00:00
|
|
|
|
(declare-function Info-goto-node "info" (nodename &optional fork strict-case))
|
1994-05-02 05:16:59 +00:00
|
|
|
|
|
1996-02-16 06:36:35 +00:00
|
|
|
|
;;;###autoload
|
1996-09-20 01:10:05 +00:00
|
|
|
|
(defun ediff-documentation (&optional node)
|
|
|
|
|
"Display Ediff's manual.
|
|
|
|
|
With optional NODE, goes to that node."
|
1996-02-16 06:36:35 +00:00
|
|
|
|
(interactive)
|
|
|
|
|
(let ((ctl-window ediff-control-window)
|
|
|
|
|
(ctl-buf ediff-control-buffer))
|
|
|
|
|
|
|
|
|
|
(ediff-skip-unsuitable-frames)
|
|
|
|
|
(condition-case nil
|
|
|
|
|
(progn
|
|
|
|
|
(pop-to-buffer (get-buffer-create "*info*"))
|
Remove most of the XEmacs compat code from ediff*.el
* lisp/vc/ediff-diff.el (ediff-word-1): Remove XEmacs compat code
and declare compatibility functions for obsolete. Adjust all callers.
* lisp/vc/ediff-help.el (ediff-set-help-overlays):
* lisp/vc/ediff-hook.el:
(menu-bar-ediff-misc-menu, menu-bar-ediff-merge-menu)
(menu-bar-ediff-menu, menu-bar-ediff-merge-menu)
(menu-bar-epatch-menu, menu-bar-ediff-misc-menu):
* lisp/vc/ediff-init.el (ediff-device-type)
(ediff-window-display-p, ediff-has-face-support-p)
(ediff-has-toolbar-support-p, ediff-has-gutter-support-p)
(ediff-BAD-INFO, ediff-coding-system-for-write)
(ediff-read-event, ediff-overlayp, ediff-make-overlay)
(ediff-delete-overlay, ediff-color-display-p)
(ediff-display-pixel-width, ediff-display-pixel-height)
(ediff-region-help-echo, ediff-set-face-pixmap)
(ediff-paint-background-regions-in-one-buffer)
(ediff-clear-fine-diff-vector, ediff-mouse-event-p)
(ediff-key-press-event-p, ediff-event-point, )
(ediff-event-buffer, ediff-event-key, ediff-last-command-char)
(ediff-frame-iconified-p, ediff-frame-char-width)
(ediff-reset-mouse, ediff-frame-char-height)
(ediff-overlay-start, ediff-overlay-end, ediff-overlay-buffer)
(ediff-overlay-get, ediff-move-overlay, ediff-overlay-put)
(ediff-abbreviate-file-name):
* lisp/vc/ediff-mult.el (ediff-next-meta-item)
(ediff-previous-meta-item)
(ediff-replace-session-activity-marker-in-meta-buffer)
(ediff-replace-session-status-in-meta-buffer)
(ediff-redraw-directory-group-buffer)
(ediff-update-markers-in-dir-meta-buffer)
(ediff-update-session-marker-in-dir-meta-buffer)
(ediff-redraw-registry-buffer, ediff-set-meta-overlay)
(ediff-update-meta-buffer, ediff-get-meta-info)
(ediff-get-meta-overlay-at-pos, )
(ediff-get-session-number-at-pos, )
(ediff-next-meta-overlay-start)
(ediff-previous-meta-overlay-start, )
(ediff-meta-mark-equal-files):
* lisp/vc/ediff-util.el:
(ediff-setup, ediff-setup-control-buffer, ediff-recenter)
(ediff-recenter-one-window, ediff-toggle-read-only)
(ediff-file-checked-out-p, ediff-file-checked-in-p)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-kill-bottom-toolbar)
(ediff-visible-region, ediff-scroll-vertically)
(ediff-scroll-horizontally, ediff-jump-to-difference-at-point)
(ediff-diff-to-diff, ediff-restore-diff)
(ediff-toggle-regexp-match, ediff-really-quit)
(ediff-cleanup-mess, ediff-highlight-diff-in-one-buffer)
(ediff-unhighlight-diffs-totally-in-one-buffer)
(ediff-save-buffer, ediff-make-cloned-buffer)
(ediff-make-indirect-buffer, ediff-remove-flags-from-buffer)
(ediff-place-flags-in-buffer1, ediff-get-diff-posn)
(ediff-clear-diff-vector, ediff-make-bullet-proof-overlay)
(ediff-submit-report, ediff-deactivate-mark)
(ediff-activate-mark, ediff-profile, ediff-print-diff-vector):
* lisp/vc/ediff-wind.el (ediff-control-frame-parameters)
(ediff-get-window-by-clicking, ediff-select-lowest-window)
(ediff-setup-windows-plain-merge)
(ediff-setup-windows-plain-compare, ediff-setup-control-frame)
(ediff-destroy-control-frame, ediff-make-frame-position)
(ediff-make-wide-display, ediff-get-visible-buffer-window):
* lisp/vc/ediff.el (ediff-version, ediff-documentation):
2019-10-05 14:48:44 +00:00
|
|
|
|
(info "ediff")
|
1996-09-20 01:10:05 +00:00
|
|
|
|
(if node
|
|
|
|
|
(Info-goto-node node)
|
2021-03-08 09:56:51 +00:00
|
|
|
|
(message (substitute-command-keys
|
|
|
|
|
(concat "Type \\<Info-mode-map>\\[Info-index] to"
|
|
|
|
|
" search for a specific topic"))))
|
2013-08-05 10:35:55 +00:00
|
|
|
|
(raise-frame))
|
1996-02-16 06:36:35 +00:00
|
|
|
|
(error (beep 1)
|
1996-06-22 01:54:34 +00:00
|
|
|
|
(with-output-to-temp-buffer ediff-msg-buffer
|
2000-11-10 22:34:22 +00:00
|
|
|
|
(ediff-with-current-buffer standard-output
|
|
|
|
|
(fundamental-mode))
|
1996-09-20 01:10:05 +00:00
|
|
|
|
(princ ediff-BAD-INFO))
|
1996-02-16 06:36:35 +00:00
|
|
|
|
(if (window-live-p ctl-window)
|
|
|
|
|
(progn
|
|
|
|
|
(select-window ctl-window)
|
|
|
|
|
(set-window-buffer ctl-window ctl-buf)))))))
|
2003-02-04 11:26:42 +00:00
|
|
|
|
|
2013-07-07 19:35:54 +00:00
|
|
|
|
|
|
|
|
|
;;; Command line interface
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-files-command ()
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Call `ediff-files' with the next two command line arguments."
|
2013-07-07 19:35:54 +00:00
|
|
|
|
(let ((file-a (nth 0 command-line-args-left))
|
|
|
|
|
(file-b (nth 1 command-line-args-left)))
|
|
|
|
|
(setq command-line-args-left (nthcdr 2 command-line-args-left))
|
|
|
|
|
(ediff file-a file-b)))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff3-files-command ()
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Call `ediff3-files' with the next three command line arguments."
|
2013-07-07 19:35:54 +00:00
|
|
|
|
(let ((file-a (nth 0 command-line-args-left))
|
|
|
|
|
(file-b (nth 1 command-line-args-left))
|
|
|
|
|
(file-c (nth 2 command-line-args-left)))
|
|
|
|
|
(setq command-line-args-left (nthcdr 3 command-line-args-left))
|
|
|
|
|
(ediff3 file-a file-b file-c)))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-merge-command ()
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Call `ediff-merge-files' with the next two command line arguments."
|
2013-07-07 19:35:54 +00:00
|
|
|
|
(let ((file-a (nth 0 command-line-args-left))
|
|
|
|
|
(file-b (nth 1 command-line-args-left)))
|
|
|
|
|
(setq command-line-args-left (nthcdr 2 command-line-args-left))
|
|
|
|
|
(ediff-merge-files file-a file-b)))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-merge-with-ancestor-command ()
|
2021-09-26 13:50:11 +00:00
|
|
|
|
"Call `ediff-merge-files-with-ancestor' with next three command line arguments."
|
2013-07-07 19:35:54 +00:00
|
|
|
|
(let ((file-a (nth 0 command-line-args-left))
|
|
|
|
|
(file-b (nth 1 command-line-args-left))
|
|
|
|
|
(ancestor (nth 2 command-line-args-left)))
|
|
|
|
|
(setq command-line-args-left (nthcdr 3 command-line-args-left))
|
|
|
|
|
(ediff-merge-files-with-ancestor file-a file-b ancestor)))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-directories-command ()
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Call `ediff-directories' with the next three command line arguments."
|
2013-07-07 19:35:54 +00:00
|
|
|
|
(let ((file-a (nth 0 command-line-args-left))
|
|
|
|
|
(file-b (nth 1 command-line-args-left))
|
|
|
|
|
(regexp (nth 2 command-line-args-left)))
|
|
|
|
|
(setq command-line-args-left (nthcdr 3 command-line-args-left))
|
|
|
|
|
(ediff-directories file-a file-b regexp)))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-directories3-command ()
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Call `ediff-directories3' with the next four command line arguments."
|
2013-07-07 19:35:54 +00:00
|
|
|
|
(let ((file-a (nth 0 command-line-args-left))
|
|
|
|
|
(file-b (nth 1 command-line-args-left))
|
|
|
|
|
(file-c (nth 2 command-line-args-left))
|
|
|
|
|
(regexp (nth 3 command-line-args-left)))
|
|
|
|
|
(setq command-line-args-left (nthcdr 4 command-line-args-left))
|
|
|
|
|
(ediff-directories3 file-a file-b file-c regexp)))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-merge-directories-command ()
|
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
2017-09-23 18:43:44 +00:00
|
|
|
|
"Call `ediff-merge-directories' with the next three command line arguments."
|
2013-07-07 19:35:54 +00:00
|
|
|
|
(let ((file-a (nth 0 command-line-args-left))
|
|
|
|
|
(file-b (nth 1 command-line-args-left))
|
|
|
|
|
(regexp (nth 2 command-line-args-left)))
|
|
|
|
|
(setq command-line-args-left (nthcdr 3 command-line-args-left))
|
|
|
|
|
(ediff-merge-directories file-a file-b regexp)))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ediff-merge-directories-with-ancestor-command ()
|
2021-09-24 12:46:56 +00:00
|
|
|
|
"Call `ediff-merge-directories-with-ancestor' with the next four command line
|
|
|
|
|
arguments."
|
2013-07-07 19:35:54 +00:00
|
|
|
|
(let ((file-a (nth 0 command-line-args-left))
|
|
|
|
|
(file-b (nth 1 command-line-args-left))
|
|
|
|
|
(ancestor (nth 2 command-line-args-left))
|
|
|
|
|
(regexp (nth 3 command-line-args-left)))
|
|
|
|
|
(setq command-line-args-left (nthcdr 4 command-line-args-left))
|
|
|
|
|
(ediff-merge-directories-with-ancestor file-a file-b ancestor regexp)))
|
|
|
|
|
|
2005-07-10 18:46:24 +00:00
|
|
|
|
(run-hooks 'ediff-load-hook)
|
|
|
|
|
|
2019-06-21 05:16:54 +00:00
|
|
|
|
(provide 'ediff)
|
1994-05-02 05:16:59 +00:00
|
|
|
|
;;; ediff.el ends here
|