Mercurial > emacs
changeset 93190:57ae4f7f7151
(diff-remembered-defdir): New var.
(diff-find-file-name): Use it to flush diff-remembered-files-alist.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 25 Mar 2008 04:01:48 +0000 |
parents | e6f00a8b10d5 |
children | 9785749a1557 |
files | lisp/ChangeLog lisp/diff-mode.el |
diffstat | 2 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Mar 25 03:43:46 2008 +0000 +++ b/lisp/ChangeLog Tue Mar 25 04:01:48 2008 +0000 @@ -1,3 +1,8 @@ +2008-03-25 Stefan Monnier <monnier@iro.umontreal.ca> + + * diff-mode.el (diff-remembered-defdir): New var. + (diff-find-file-name): Use it to flush diff-remembered-files-alist. + 2008-03-25 Glenn Morris <rgm@gnu.org> * calendar/cal-bahai.el (calendar-bahai-read-date): New name for
--- a/lisp/diff-mode.el Tue Mar 25 03:43:46 2008 +0000 +++ b/lisp/diff-mode.el Tue Mar 25 04:01:48 2008 +0000 @@ -672,6 +672,7 @@ ;;;; (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 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))