(Glossary): Treat Transient Mark mode as the default.
[bpt/emacs.git] / lisp / diff-mode.el
index 88270b2..e89aa0e 100644 (file)
@@ -229,7 +229,7 @@ when editing big diffs)."
 
 (defface diff-header
   '((((class color) (min-colors 88) (background light))
-     :background "grey85")
+     :background "grey80")
     (((class color) (min-colors 88) (background dark))
      :background "grey45")
     (((class color) (background light))
@@ -672,6 +672,7 @@ data such as \"Index: ...\" and such."
 ;;;;
 
 (defvar diff-remembered-files-alist nil)
+(defvar diff-remembered-defdir nil)
 
 (defun diff-filename-drop-dir (file)
   (when (string-match "/" file) (substring file (match-end 0))))
@@ -745,6 +746,10 @@ Non-nil OLD means that we want the old file.
 Non-nil BATCH means to prefer returning an incorrect answer than to prompt
 the user.
 PREFIX is only used internally: don't use it."
+  (unless (equal diff-remembered-defdir default-directory)
+    ;; Flush diff-remembered-files-alist if the default-directory is changed.
+    (set (make-local-variable 'diff-remembered-defdir) default-directory)
+    (set (make-local-variable 'diff-remembered-files-alist) nil))
   (save-excursion
     (unless (looking-at diff-file-header-re)
       (or (ignore-errors (diff-beginning-of-file))
@@ -1752,9 +1757,9 @@ For use in `add-log-current-defun-function'."
 
 (defface diff-refine-change
   '((((class color) (min-colors 88) (background light))
-     :background "grey90")
+     :background "grey85")
     (((class color) (min-colors 88) (background dark))
-     :background "grey40")
+     :background "grey60")
     (((class color) (background light))
      :background "yellow")
     (((class color) (background dark))