     (cond
      ((eq type 'dir))
      ((or (eq type 'file)
-	  (eq type 'change))
+          (eq type 'change))
       (ediff-merge (darcsum-original-path (point))
-		   (darcsum-path (point)))))))
+                   (darcsum-path (point)))))))
 
 (defun darcsum-redo (&optional arg)
   "Refresh the status, redoing `darcs whatsnew'."
   (interactive "P")
   (darcsum-check-darcsum-mode)
   (let ((dir default-directory)
-	(look-for-adds (or arg darcsum-look-for-adds))
-	(darcsum-default-expanded t))
+        (look-for-adds (or arg darcsum-look-for-adds))
+        (darcsum-default-expanded t))
     (message "Re-running darcsum-whatsnew")
     (let ((changes (darcsum-whatsnew
-		    dir look-for-adds t darcsum-show-context)))
+                    dir look-for-adds t darcsum-show-context)))
       (setq darcsum-data
-	    (darcsum-merge-changeset darcsum-data changes)))
+            (darcsum-merge-changeset darcsum-data changes)))
     (darcsum-refresh)))
 
 (defun darcsum-quit ()

    (beginning-of-line)
    (let ((type (get-text-property (point) 'darcsum-line-type)))
      (case sort
	('new (and (eq 'file type) (looking-at "  +New")))
	('modified (or (and (eq 'file type) (looking-at "\\s-+Modified"))
		       (eq 'change type)))
	('file (eq 'file type))
	('change (eq 'change type))
	('marked
	 (memq (get-text-property (point) 'face)
	       '(darcsum-marked-face darcsum-need-action-marked-face)))))))

(defun darcsum-next-entity (&optional arg backward)
  "Move to the next file or change.


(defsubst darcsum-remember-window-configuration ()
  (setq darcsum-window-configuration-temp (list (current-window-configuration)
                                           (point-marker))))
(defsubst darcsum-recall-window-configuration ()
  (if darcsum-window-configuration-temp
      (progn
         (set-window-configuration (car darcsum-window-configuration-temp))
         (goto-char (cadr darcsum-window-configuration-temp)))
    (error "No window configuration to restore.")))

(defsubst darcsum-changes-handled ()
  (if (buffer-live-p darcsum-parent-buffer)
      (let ((changeset darcsum-changeset-to-record))
        (with-current-buffer darcsum-parent-buffer
          (setq darcsum-data
                (darcsum-remove-changeset darcsum-data changeset))
          (darcsum-refresh)))))

(defun darcsum-start-process (subcommand args
                                         &optional name value &rest localize)
  "Start darcs process."
    (let*
        ((buf (generate-new-buffer (format " *darcs %s*" subcommand)))
         (process-environment
            ;; Use the environment variables to turn off highlighting.  (You
            ;; could use `show-trailing-whitespace' in the buffer to highlight
            ;; trailing space in the diffs.)
            (append (list "DARCS_DONT_ESCAPE_TRAILING_SPACES=1"
                          "DARCS_DONT_COLOR=1"
                          "DARCS_DONT_ESCAPE_TRAILING_CR=1")
                    process-environment))
         (process-connection-type nil)
         (proc (apply 'start-process "darcs"
                      buf darcsum-program subcommand args)))
      (set-process-sentinel proc 'darcsum-process-sentinel)
      (set-process-filter proc 'darcsum-process-filter)
      (with-current-buffer buf
        (while name
          (set (make-local-variable name) value)
          (setq name (car localize)
                value (cadr localize)
                localize (cddr localize))))
      proc))

(defun darcsum-process-sentinel (proc string)
