;;; ediff-ptch.el --- Ediff's patch support
;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;; 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Code:
+(provide 'ediff-ptch)
+
(defgroup ediff-ptch nil
"Ediff patch support."
:tag "Patch"
:group 'ediff)
;; compiler pacifier
-(defvar ediff-window-A)
-(defvar ediff-window-B)
-(defvar ediff-window-C)
-(defvar ediff-use-last-dir)
-(defvar ediff-shell)
-
(eval-when-compile
- (let ((load-path (cons (expand-file-name ".") load-path)))
- (or (featurep 'ediff-init)
- (load "ediff-init.el" nil nil 'nosuffix))
- (or (featurep 'ediff-mult)
- (load "ediff-mult.el" nil nil 'nosuffix))
- (or (featurep 'ediff)
- (load "ediff.el" nil nil 'nosuffix))
- ))
+ (require 'ediff))
;; end pacifier
(require 'ediff-init)
(defcustom ediff-patch-program "patch"
- "*Name of the program that applies patches.
+ "Name of the program that applies patches.
It is recommended to use GNU-compatible versions."
:type 'string
:group 'ediff-ptch)
(defcustom ediff-patch-options "-f"
- "*Options to pass to ediff-patch-program.
+ "Options to pass to ediff-patch-program.
Note: the `-b' option should be specified in `ediff-backup-specs'.
;; the default backup extension
(defconst ediff-default-backup-extension
- (if (memq system-type '(vax-vms axp-vms emx ms-dos))
+ (if (memq system-type '(emx ms-dos))
"_orig" ".orig"))
(t
;; traditional `patch'
(format "-b %s" ediff-backup-extension))))
- "*Backup directives to pass to the patch program.
+ "Backup directives to pass to the patch program.
Ediff requires that the old version of the file \(before applying the patch\)
be saved in a file named `the-patch-file.extension'. Usually `extension' is
`.orig', but this can be changed by the user and may depend on the system.
(defcustom ediff-patch-default-directory nil
- "*Default directory to look for patches."
+ "Default directory to look for patches."
:type '(choice (const nil) string)
:group 'ediff-ptch)
(defcustom ediff-context-diff-label-regexp
(concat "\\(" ; context diff 2-liner
"^\\*\\*\\* +\\([^ \t]+\\)[^*]+[\t ]*\n--- +\\([^ \t]+\\)"
- "\\|" ; GNU unified format diff 2-liner
- "^--- +\\([^ \t]+\\)[\t ]+.*\n\\+\\+\\+ +\\([^ \t]+\\)"
+ "\\|" ; unified format diff 2-liner
+ "^--- +\\([^ \t]+\\).*\n\\+\\+\\+ +\\([^ \t]+\\)"
"\\)")
- "*Regexp matching filename 2-liners at the start of each context diff.
+ "Regexp matching filename 2-liners at the start of each context diff.
You probably don't want to change that, unless you are using an obscure patch
program."
:type 'regexp
-(provide 'ediff-ptch)
-
-;;; Local Variables:
-;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
-;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
-;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
-;;; End:
+;; Local Variables:
+;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
+;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
+;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
+;; End:
-;;; arch-tag: 2fe2161e-e116-469b-90fa-5cbb44c1bd1b
+;; arch-tag: 2fe2161e-e116-469b-90fa-5cbb44c1bd1b
;;; ediff-ptch.el ends here