Mercurial > hg > xemacs-beta
comparison lisp/ediff/ediff-ptch.el @ 14:9ee227acff29 r19-15b90
Import from CVS: tag r19-15b90
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:48:42 +0200 |
parents | bcdc7deadc19 |
children | 0293115a14e9 |
comparison
equal
deleted
inserted
replaced
13:13c6d0aaafe5 | 14:9ee227acff29 |
---|---|
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
22 ;; Boston, MA 02111-1307, USA. | 22 ;; Boston, MA 02111-1307, USA. |
23 | 23 |
24 | 24 |
25 ;;; Code: | 25 ;;; Code: |
26 | |
27 (provide 'ediff-ptch) | |
28 | |
29 ;; compiler pacifier | |
30 (defvar ediff-window-A) | |
31 (defvar ediff-window-B) | |
32 (defvar ediff-window-C) | |
33 (defvar ediff-use-last-dir) | |
34 (defvar ediff-shell) | |
35 | |
36 (eval-when-compile | |
37 (let ((load-path (cons "." load-path))) | |
38 (or (featurep 'ediff-init) | |
39 (load "ediff-init.el" nil nil 'nosuffix)) | |
40 (or (featurep 'ediff) | |
41 (load "ediff.el" nil nil 'nosuffix)) | |
42 (or (featurep 'ange-ftp) | |
43 (load "ange-ftp" 'noerror)) | |
44 )) | |
45 ;; end pacifier | |
26 | 46 |
27 (require 'ediff-init) | 47 (require 'ediff-init) |
28 | 48 |
29 (defvar ediff-last-dir-patch nil | 49 (defvar ediff-last-dir-patch nil |
30 "Last directory used by an Ediff command for file to patch.") | 50 "Last directory used by an Ediff command for file to patch.") |
538 (if (setq aux-wind (get-buffer-window patch-diagnostics)) | 558 (if (setq aux-wind (get-buffer-window patch-diagnostics)) |
539 (progn | 559 (progn |
540 (select-window aux-wind) | 560 (select-window aux-wind) |
541 (bury-buffer))) | 561 (bury-buffer))) |
542 (error "Patch appears to have failed"))) | 562 (error "Patch appears to have failed"))) |
543 | 563 |
544 ;; If black magic is involved, apply patch to a temp copy of the | 564 ;; If black magic is involved, apply patch to a temp copy of the |
545 ;; file. Otherwise, apply patch to the orig copy. If patch is applied | 565 ;; file. Otherwise, apply patch to the orig copy. If patch is applied |
546 ;; to temp copy, we name the result old-name_patched for local files | 566 ;; to temp copy, we name the result old-name_patched for local files |
547 ;; and temp-copy_patched for remote files. The orig file name isn't | 567 ;; and temp-copy_patched for remote files. The orig file name isn't |
548 ;; changed, and the temp copy of the original is later deleted. | 568 ;; changed, and the temp copy of the original is later deleted. |
569 (rename-file true-source-filename target-filename t) | 589 (rename-file true-source-filename target-filename t) |
570 | 590 |
571 ;; arrange that the temp copy of orig will be deleted | 591 ;; arrange that the temp copy of orig will be deleted |
572 (rename-file (concat true-source-filename ediff-backup-extension) | 592 (rename-file (concat true-source-filename ediff-backup-extension) |
573 true-source-filename t)) | 593 true-source-filename t)) |
574 | 594 |
575 ;; make orig buffer read-only | 595 ;; make orig buffer read-only |
576 (setq startup-hooks | 596 (setq startup-hooks |
577 (cons 'ediff-set-read-only-in-buf-A startup-hooks)) | 597 (cons 'ediff-set-read-only-in-buf-A startup-hooks)) |
578 | 598 |
579 ;; set up a buf for the patched file | 599 ;; set up a buf for the patched file |
580 (setq target-buf (find-file-noselect target-filename)) | 600 (setq target-buf (find-file-noselect target-filename)) |
581 | 601 |
582 (setq ctl-buf | 602 (setq ctl-buf |
583 (ediff-buffers-internal | 603 (ediff-buffers-internal |
623 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) | 643 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) |
624 ;;; eval: (put 'ediff-eval-in-buffer 'lisp-indent-hook 1) | 644 ;;; eval: (put 'ediff-eval-in-buffer 'lisp-indent-hook 1) |
625 ;;; eval: (put 'ediff-eval-in-buffer 'edebug-form-spec '(form body)) | 645 ;;; eval: (put 'ediff-eval-in-buffer 'edebug-form-spec '(form body)) |
626 ;;; End: | 646 ;;; End: |
627 | 647 |
628 (provide 'ediff-ptch) | |
629 | |
630 ;;; ediff-ptch.el ends here | 648 ;;; ediff-ptch.el ends here |