;;; ediff.el --- a comprehensive visual interface to diff & patch
-;; Copyright (C) 1994-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2014 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Created: February 2, 1994
;; filed in the Emacs bug reporting system against this file, a copy
;; of the bug report be sent to the maintainer's email address.
-(defconst ediff-version "2.81.4" "The current version of Ediff")
-(defconst ediff-date "December 7, 2009" "Date of last update")
+(defconst ediff-version "2.81.5" "The current version of Ediff")
+(defconst ediff-date "July 4, 2013" "Date of last update")
;; This file is part of GNU Emacs.
;; Compiler pacifier
(eval-and-compile
- (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r))))
(require 'ediff-util)
;; end pacifier
This command can be used instead of `revert-buffer'. If there is
nothing to revert then this command fails."
(interactive)
- (unless (or revert-buffer-function
- revert-buffer-insert-file-contents-function
+ ;; 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))
(and buffer-file-number
(or (buffer-modified-p)
(not (verify-visited-file-modtime
(format "Ediff %s of %s" ediff-version ediff-date)))
;; info is run first, and will autoload info.el.
-(declare-function Info-goto-node "info" (nodename &optional fork))
+(declare-function Info-goto-node "info" (nodename &optional fork strict-case))
;;;###autoload
(defun ediff-documentation (&optional node)
(if node
(Info-goto-node node)
(message "Type `i' to search for a specific topic"))
- (raise-frame (selected-frame)))
+ (raise-frame))
(error (beep 1)
(with-output-to-temp-buffer ediff-msg-buffer
(ediff-with-current-buffer standard-output
(add-to-list 'debug-ignored-errors mess))
+\f
+;;; Command line interface
+
+;;;###autoload
+(defun ediff-files-command ()
+ (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 ()
+ (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 ()
+ (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 ()
+ (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 ()
+ (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 ()
+ (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 ()
+ (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 ()
+ (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)))
+
+
+
(require 'ediff-util)
(run-hooks 'ediff-load-hook)