[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emerge.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emerge.el |
Date: |
Tue, 04 Feb 2003 06:16:05 -0500 |
Index: emacs/lisp/emerge.el
diff -c emacs/lisp/emerge.el:1.46 emacs/lisp/emerge.el:1.47
*** emacs/lisp/emerge.el:1.46 Sun Jan 12 15:46:08 2003
--- emacs/lisp/emerge.el Tue Feb 4 06:16:05 2003
***************
*** 64,74 ****
,@forms)
(set-buffer StartBuffer))))
! (defmacro emerge-defvar-local (var value doc)
! "Defines SYMBOL as an advertised variable.
Performs a defvar, then executes `make-variable-buffer-local' on
the variable. Also sets the `preserved' property, so that
! `kill-all-local-variables' (called by major-mode setting commands)
won't destroy Emerge control variables."
`(progn
(defvar ,var ,value ,doc)
--- 64,74 ----
,@forms)
(set-buffer StartBuffer))))
! (defmacro emerge-defvar-local (var value doc)
! "Defines SYMBOL as an advertised variable.
Performs a defvar, then executes `make-variable-buffer-local' on
the variable. Also sets the `preserved' property, so that
! `kill-all-local-variables' (called by major-mode setting commands)
won't destroy Emerge control variables."
`(progn
(defvar ,var ,value ,doc)
***************
*** 127,133 ****
;; to be provided (emerge-diff-options). The order in which the file names
;; are given is fixed.
;; The file names are always expanded (see expand-file-name) before being
! ;; passed to diff, thus they need not be invoked under a shell that
;; understands `~'.
;; The code which processes the diff/diff3 output depends on all the
;; finicky details of their output, including the somewhat strange
--- 127,133 ----
;; to be provided (emerge-diff-options). The order in which the file names
;; are given is fixed.
;; The file names are always expanded (see expand-file-name) before being
! ;; passed to diff, thus they need not be invoked under a shell that
;; understands `~'.
;; The code which processes the diff/diff3 output depends on all the
;; finicky details of their output, including the somewhat strange
***************
*** 578,584 ****
(if output-file
(setq emerge-last-dir-output (file-name-directory output-file)))
;; Make sure the entire files are seen, and they reflect what is on disk
! (emerge-eval-in-buffer
buffer-A
(widen)
(let ((temp (file-local-copy file-A)))
--- 578,584 ----
(if output-file
(setq emerge-last-dir-output (file-name-directory output-file)))
;; Make sure the entire files are seen, and they reflect what is on disk
! (emerge-eval-in-buffer
buffer-A
(widen)
(let ((temp (file-local-copy file-A)))
***************
*** 842,848 ****
;; if the A and B files are the same, ignore the difference
(if (not (string-equal agreement "2"))
(setq list
! (cons
(let (group-1 group-3 pos)
(setq pos (point))
(setq group-1 (emerge-get-diff3-group "1"))
--- 842,848 ----
;; if the A and B files are the same, ignore the difference
(if (not (string-equal agreement "2"))
(setq list
! (cons
(let (group-1 group-3 pos)
(setq pos (point))
(setq group-1 (emerge-get-diff3-group "1"))
***************
*** 1022,1028 ****
(emerge-files-with-ancestor-internal
file-a file-b file-anc nil
(list `(lambda () (emerge-command-exit ,file-out))))))
!
(defun emerge-command-exit (file-out)
(emerge-write-and-delete file-out)
(kill-emacs (if emerge-prefix-argument 1 0)))
--- 1022,1028 ----
(emerge-files-with-ancestor-internal
file-a file-b file-anc nil
(list `(lambda () (emerge-command-exit ,file-out))))))
!
(defun emerge-command-exit (file-out)
(emerge-write-and-delete file-out)
(kill-emacs (if emerge-prefix-argument 1 0)))
***************
*** 1270,1276 ****
(emerge-files (not (not file-out)) file-A file-B file-out
nil
;; When done, return to this buffer.
! (list
`(lambda ()
(switch-to-buffer ,(current-buffer))
(message "Merge done.")))))
--- 1270,1276 ----
(emerge-files (not (not file-out)) file-A file-B file-out
nil
;; When done, return to this buffer.
! (list
`(lambda ()
(switch-to-buffer ,(current-buffer))
(message "Merge done.")))))
***************
*** 1294,1300 ****
;;;###autoload
(defun emerge-merge-directories (a-dir b-dir ancestor-dir output-dir)
! (interactive
(list
(read-file-name "A directory: " nil nil 'confirm)
(read-file-name "B directory: " nil nil 'confirm)
--- 1294,1300 ----
;;;###autoload
(defun emerge-merge-directories (a-dir b-dir ancestor-dir output-dir)
! (interactive
(list
(read-file-name "A directory: " nil nil 'confirm)
(read-file-name "B directory: " nil nil 'confirm)
***************
*** 1539,1545 ****
;; fast access
(setq emerge-difference-list (apply 'vector (nreverse marker-list)))))
! ;; If we have an ancestor, select all B variants that we prefer
(defun emerge-select-prefer-Bs ()
(let ((n 0))
(while (< n emerge-number-of-differences)
--- 1539,1545 ----
;; fast access
(setq emerge-difference-list (apply 'vector (nreverse marker-list)))))
! ;; If we have an ancestor, select all B variants that we prefer
(defun emerge-select-prefer-Bs ()
(let ((n 0))
(while (< n emerge-number-of-differences)
***************
*** 1663,1669 ****
`C-u -' alone as argument scrolls half the height of the merge window."
(interactive "P")
(emerge-operate-on-windows
! 'scroll-up
;; calculate argument to scroll-up
;; if there is an explicit argument
(if (and arg (not (equal arg '-)))
--- 1663,1669 ----
`C-u -' alone as argument scrolls half the height of the merge window."
(interactive "P")
(emerge-operate-on-windows
! 'scroll-up
;; calculate argument to scroll-up
;; if there is an explicit argument
(if (and arg (not (equal arg '-)))
***************
*** 1906,1912 ****
(run-hooks 'emerge-quit-hook)))
(defun emerge-select-A (&optional force)
! "Select the A variant of this difference.
Refuses to function if this difference has been edited, i.e., if it
is neither the A nor the B variant.
A prefix argument forces the variant to be selected
--- 1906,1912 ----
(run-hooks 'emerge-quit-hook)))
(defun emerge-select-A (&optional force)
! "Select the A variant of this difference.
Refuses to function if this difference has been edited, i.e., if it
is neither the A nor the B variant.
A prefix argument forces the variant to be selected
***************
*** 2579,2593 ****
(if (= c ?%)
(progn
(setq i (1+ i))
! (setq c
(condition-case nil
(aref template i)
(error ?%)))
(cond ((= c ?a)
(insert-buffer-substring emerge-A-buffer A-begin A-end))
! ((= c ?b)
(insert-buffer-substring emerge-B-buffer B-begin B-end))
! ((= c ?%)
(insert ?%))
(t
(insert c))))
--- 2579,2593 ----
(if (= c ?%)
(progn
(setq i (1+ i))
! (setq c
(condition-case nil
(aref template i)
(error ?%)))
(cond ((= c ?a)
(insert-buffer-substring emerge-A-buffer A-begin A-end))
! ((= c ?b)
(insert-buffer-substring emerge-B-buffer B-begin B-end))
! ((= c ?%)
(insert ?%))
(t
(insert c))))
***************
*** 2848,2854 ****
(while (< x-begin x-end)
;; bite off and compare no more than 1000 characters at a time
(let* ((compare-length (min (- x-end x-begin) 1000))
! (x-string (emerge-eval-in-buffer
buffer-x
(buffer-substring x-begin
(+ x-begin compare-length))))
--- 2848,2854 ----
(while (< x-begin x-end)
;; bite off and compare no more than 1000 characters at a time
(let* ((compare-length (min (- x-end x-begin) 1000))
! (x-string (emerge-eval-in-buffer
buffer-x
(buffer-substring x-begin
(+ x-begin compare-length))))
***************
*** 2863,2869 ****
t)))
;; Construct a unique buffer name.
! ;; The first one tried is prefixsuffix, then prefix<2>suffix,
;; prefix<3>suffix, etc.
(defun emerge-unique-buffer-name (prefix suffix)
(if (null (get-buffer (concat prefix suffix)))
--- 2863,2869 ----
t)))
;; Construct a unique buffer name.
! ;; The first one tried is prefixsuffix, then prefix<2>suffix,
;; prefix<3>suffix, etc.
(defun emerge-unique-buffer-name (prefix suffix)
(if (null (get-buffer (concat prefix suffix)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/emerge.el,
Juanma Barranquero <=