diff lisp/ediff-ptch.el @ 49588:37645a051842

Trailing whitespace deleted.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 04 Feb 2003 11:26:42 +0000
parents 4079bb42ddae
children 695cf19ef79e d7ddb3e565de
line wrap: on
line diff
--- a/lisp/ediff-ptch.el	Tue Feb 04 10:58:53 2003 +0000
+++ b/lisp/ediff-ptch.el	Tue Feb 04 11:26:42 2003 +0000
@@ -24,7 +24,7 @@
 ;;; Commentary:
 
 ;;; Code:
-	 
+
 (provide 'ediff-ptch)
 
 (defgroup ediff-ptch nil
@@ -76,7 +76,7 @@
 (defconst ediff-default-backup-extension
   (if (memq system-type '(vax-vms axp-vms emx ms-dos))
       "_orig" ".orig"))
-  
+
 
 (defcustom ediff-backup-extension ediff-default-backup-extension
   "Backup extension used by the patch program.
@@ -94,7 +94,7 @@
 	    (t 'traditional))
     (file-error nil)))
 
-(defcustom ediff-backup-specs 
+(defcustom ediff-backup-specs
   (let ((type (ediff-test-patch-utility)))
     (cond ((eq type 'gnu)
 	   ;; GNU `patch' v. >= 2.2
@@ -184,10 +184,10 @@
 	    (setq count (1+ count)))))
       count)))
 
-;; Scan BUF (which is supposed to contain a patch) and make a list of the form 
+;; Scan BUF (which is supposed to contain a patch) and make a list of the form
 ;;    ((nil nil filename-spec1 marker1 marker2)
 ;;          (nil nil filename-spec2 marker1 marker2) ...)
-;; where filename-spec[12] are files to which the `patch' program would 
+;; where filename-spec[12] are files to which the `patch' program would
 ;; have applied the patch.
 ;; nin, nil are placeholders. See ediff-make-new-meta-list-element in
 ;;    ediff-meta.el for the explanations.
@@ -240,7 +240,7 @@
 		(move-marker mark2 (match-beginning 0)))
 
 	    (goto-char mark2-end)
-	    
+
 	    (if filenames
 		(setq patch-map
 		      (cons (ediff-make-new-meta-list-element
@@ -274,7 +274,7 @@
 			;; directory part of filename
 			(file-name-as-directory filename)
 		      (file-name-directory filename)))
-	;; Filename-spec is objA; at this point it is represented as 
+	;; Filename-spec is objA; at this point it is represented as
 	;; (file1 . file2). We get it using ediff-get-session-objA
 	;; directory part of the first file in the patch
 	(base-dir1 (file-name-directory
@@ -349,10 +349,10 @@
 			(setcar (ediff-get-session-objA session-info)
 				(cons user-file user-file))))
 		  (setcar proposed-file-names
-			  (expand-file-name 
+			  (expand-file-name
 			   (concat actual-dir (car proposed-file-names))))
 		  (setcdr proposed-file-names
-			  (expand-file-name 
+			  (expand-file-name
 			   (concat actual-dir (cdr proposed-file-names)))))
 		))
 	    ediff-patch-map)
@@ -418,7 +418,7 @@
 		  (let ((directory t)
 			target)
 		    (while directory
-		      (setq target (read-file-name 
+		      (setq target (read-file-name
 				    "Please enter a patch target: "
 				    actual-dir actual-dir t))
 		      (if (not (file-directory-p target))
@@ -502,7 +502,7 @@
 		   (if (y-or-n-p "Is the patch already in a buffer? ")
 		       (ediff-prompt-for-patch-buffer)
 		     (ediff-prompt-for-patch-file)))))
-    
+
     (ediff-with-current-buffer patch-buf
       (goto-char (point-min))
       (or (ediff-get-visible-buffer-window patch-buf)
@@ -529,7 +529,7 @@
 			"^/dev/null"
 			;; this is the file to patch
 			(ediff-get-session-objA-name (car ediff-patch-map))))
-		  (> (length 
+		  (> (length
 		      (ediff-get-session-objA-name (car ediff-patch-map)))
 		     1))
 	     (ediff-get-session-objA-name (car ediff-patch-map))
@@ -571,11 +571,11 @@
       (set-visited-file-modtime) ; sync buffer and temp file
       (setq default-directory default-dir)
       )
-  
+
     ;; dispatch a patch function
     (setq ctl-buf (ediff-dispatch-file-patching-job
 		   patch-buf file-name startup-hooks))
-    
+
     (ediff-with-current-buffer ctl-buf
       (delete-file (buffer-file-name ediff-buffer-A))
       (delete-file (buffer-file-name ediff-buffer-B))
@@ -588,7 +588,7 @@
 	(setq buffer-auto-save-file-name nil) ; don't create auto-save file
 	(if default-dir (setq default-directory default-dir))
 	(set-visited-file-name nil)
-	(rename-buffer (ediff-unique-buffer-name 
+	(rename-buffer (ediff-unique-buffer-name
 			(concat buf-to-patch-name "_patched") ""))
 	(set-buffer-modified-p t)))
     ))
@@ -607,7 +607,7 @@
 (defun ediff-patch-file-internal (patch-buf source-filename
 					    &optional startup-hooks)
   (setq source-filename (expand-file-name source-filename))
-  
+
   (let* ((shell-file-name ediff-shell)
 	 (patch-diagnostics (get-buffer-create "*ediff patch diagnostics*"))
 	 ;; ediff-find-file may use a temp file to do the patch
@@ -618,15 +618,15 @@
 	 (target-filename source-filename)
 	 ;; this ensures that the patch process gets patch buffer in the
 	 ;; encoding that Emacs thinks is right for that type of text
-	 (coding-system-for-write 
+	 (coding-system-for-write
 	  (if (boundp 'buffer-file-coding-system) buffer-file-coding-system))
-	 target-buf buf-to-patch file-name-magic-p 
+	 target-buf buf-to-patch file-name-magic-p
 	 patch-return-code ctl-buf backup-style aux-wind)
-	  
+
     (if (string-match "V" ediff-patch-options)
 	(error
 	 "Ediff doesn't take the -V option in `ediff-patch-options'--sorry"))
-					
+
     ;; Make a temp file, if source-filename has a magic file handler (or if
     ;; it is handled via auto-mode-alist and similar magic).
     ;; Check if there is a buffer visiting source-filename and if they are in
@@ -640,8 +640,8 @@
     ;; temporary file where we put the after-product of the file handler.
     (setq file-name-magic-p (not (equal (file-truename true-source-filename)
 					(file-truename source-filename))))
-    
-    ;; Checkout orig file, if necessary, so that the patched file 
+
+    ;; Checkout orig file, if necessary, so that the patched file
     ;; could be checked back in.
     (ediff-maybe-checkout buf-to-patch)
 
@@ -674,7 +674,7 @@
 
     (switch-to-buffer patch-diagnostics)
     (sit-for 0) ; synchronize - let the user see diagnostics
-    
+
     (or (and (ediff-patch-return-code-ok patch-return-code)
 	     (file-exists-p
 	      (concat true-source-filename ediff-backup-extension)))
@@ -682,7 +682,7 @@
 	  (with-output-to-temp-buffer ediff-msg-buffer
 	    (ediff-with-current-buffer standard-output
 	      (fundamental-mode))
-	    (princ (format 
+	    (princ (format
 		    "Patch program has failed due to a bad patch file,
 it couldn't apply all hunks, OR
 it couldn't create the backup for the file being patched.
@@ -695,7 +695,7 @@
     ediff-backup-extension = %S             ediff-backup-specs     = %S
 
 See Ediff on-line manual for more details on these variables.
-In particular, check the documentation for `ediff-backup-specs'. 
+In particular, check the documentation for `ediff-backup-specs'.
 
 In any of the above cases, Ediff doesn't compare files automatically.
 However, if the patch was applied partially and the backup file was created,
@@ -713,7 +713,7 @@
 		(goto-char (point-max))))
 	  (switch-to-buffer-other-window patch-diagnostics)
 	  (error "Patch appears to have failed")))
-    
+
     ;; If black magic is involved, apply patch to a temp copy of the
     ;; file.  Otherwise, apply patch to the orig copy.  If patch is applied
     ;; to temp copy, we name the result old-name_patched for local files
@@ -727,7 +727,7 @@
 	  (set-visited-file-name
 	   (concat source-filename ediff-backup-extension))
 	  (set-buffer-modified-p nil))
-      
+
       ;; Black magic in effect.
       ;; If orig file was remote, put the patched file in the temp directory.
       ;; If orig file is local, put the patched file in the directory of
@@ -738,20 +738,20 @@
 		 true-source-filename
 	       source-filename)
 	     "_patched"))
-      
+
       (rename-file true-source-filename target-filename t)
-      
+
       ;; arrange that the temp copy of orig will be deleted
       (rename-file (concat true-source-filename ediff-backup-extension)
 		   true-source-filename t))
-    
+
     ;; make orig buffer read-only
     (setq startup-hooks
 	  (cons 'ediff-set-read-only-in-buf-A startup-hooks))
-    
+
     ;; set up a buf for the patched file
     (setq target-buf (find-file-noselect target-filename))
-    
+
     (setq ctl-buf
 	  (ediff-buffers-internal
 	   buf-to-patch target-buf nil
@@ -759,7 +759,7 @@
     (ediff-with-current-buffer ctl-buf
       (setq ediff-patchbufer patch-buf
 	    ediff-patch-diagnostics patch-diagnostics))
-  
+
     (bury-buffer patch-diagnostics)
     (message "Type `P', if you need to see patch diagnostics")
     ctl-buf))
@@ -775,7 +775,7 @@
 			 'ediff-patch-file-form-meta
 			 ediff-meta-patchbufer patch-buf) )
 		startup-hooks))
-    (setq meta-buf (ediff-prepare-meta-buffer 
+    (setq meta-buf (ediff-prepare-meta-buffer
 		    'ediff-filegroup-action
 		    (ediff-with-current-buffer patch-buf
 		      (cons (ediff-make-new-meta-list-header
@@ -793,8 +793,8 @@
     (ediff-show-meta-buffer meta-buf)
     ))
 
-  
-      
+
+
 
 ;;; Local Variables:
 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)