From 6e31f65f1639b7740cfb85c8320d80110f5eeeab Mon Sep 17 00:00:00 2001 From: Michael Kifer Date: Sun, 18 May 2003 17:18:09 +0000 Subject: [PATCH] 2003-05-18 Michael Kifer * ediff-mult.el (ediff-default-filtering-regexp): new variable. * ediff-util.el (ediff-maybe-save-and-delete-merge): change in a message. * ediff.el (ediff-directories,ediff-directory-revisions, ediff-directories3,ediff-merge-directories, ediff-merge-directories-with-ancestor,ediff-merge-directory-revisions, ediff-merge-directory-revisions-with-ancestor): make use of the new ediff-default-filtering-regexp variable. --- lisp/ChangeLog | 13 ++++++++++++ lisp/ediff-mult.el | 8 +++++++- lisp/ediff-util.el | 2 +- lisp/ediff.el | 51 ++++++++++++++++++++++++++++++++-------------- 4 files changed, 57 insertions(+), 17 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 414947b7129..d5990a9fc9c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2003-05-18 Michael Kifer + + * ediff-mult.el (ediff-default-filtering-regexp): new variable. + + * ediff-util.el (ediff-maybe-save-and-delete-merge): change in a + message. + + * ediff.el (ediff-directories,ediff-directory-revisions, + ediff-directories3,ediff-merge-directories, + ediff-merge-directories-with-ancestor,ediff-merge-directory-revisions, + ediff-merge-directory-revisions-with-ancestor): make use of the new + ediff-default-filtering-regexp variable. + 2003-05-18 Richard M. Stallman * which-func.el (which-func-current, which-func-format): diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el index a96450c9cf4..a89902e8d3d 100644 --- a/lisp/ediff-mult.el +++ b/lisp/ediff-mult.el @@ -167,9 +167,15 @@ directories.") ;; buffer used to collect custom diffs from individual sessions in the group (ediff-defvar-local ediff-meta-diff-buffer nil "") -;; history var to use for filtering groups +;; history var to use for filtering groups of files (defvar ediff-filtering-regexp-history nil "") +(defcustom ediff-default-filtering-regexp nil + "The default regular expression used as a filename filter in multifile comparisons. +Should be a sexp. For instance (car ediff-filtering-regexp-history) or nil." + :type 'sexp + :group 'ediff-mult) + ;; This has the form ((meta-buf regexp dir1 dir2 dir3 merge-auto-store-dir) ;; (ctl-buf session-status (file1 . eq-status) (file2 . eq-status) (file3 ;; . eq-status)) (ctl-buf session-status (file1 . eq-status) (file2 diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index 3dda354be15..b551f056432 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el @@ -2690,7 +2690,7 @@ only if this merge job is part of a group, i.e., was invoked from within ((eq ediff-autostore-merges t) ;; ask for file name (setq merge-store-file - (read-file-name "Save the merge buffer in file: ")) + (read-file-name "Save the result of the merge in file: ")) (ediff-write-merge-buffer-and-maybe-kill ediff-buffer-C merge-store-file nil save-and-continue)) ((and (ediff-buffer-live-p ediff-meta-buffer) diff --git a/lisp/ediff.el b/lisp/ediff.el index 2525a07658e..edc16265b02 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el @@ -7,7 +7,7 @@ ;; Keywords: comparing, merging, patching, tools, unix (defconst ediff-version "2.78" "The current version of Ediff") -(defconst ediff-date "January 25, 2003" "Date of last update") +(defconst ediff-date "May 18, 2003" "Date of last update") ;; This file is part of GNU Emacs. @@ -508,8 +508,11 @@ expression; only file names that match the regexp are considered." ediff-last-dir-B (ediff-strip-last-dir f)) nil) - (read-string "Filter through regular expression: " - nil 'ediff-filtering-regexp-history) + (read-string (format + "Filter through regular expression (default %S): " + (eval ediff-default-filtering-regexp)) + (eval ediff-default-filtering-regexp) + 'ediff-filtering-regexp-history) ))) (ediff-directories-internal dir1 dir2 nil regexp 'ediff-files 'ediff-directories @@ -528,8 +531,11 @@ names. Only the files that are under revision control are taken into account." (let ((dir-A (ediff-get-default-directory-name))) (list (ediff-read-file-name "Directory to compare with revision:" dir-A nil) - (read-string "Filter through regular expression: " - nil 'ediff-filtering-regexp-history) + (read-string (format + "Filter through regular expression (default %S): " + (eval ediff-default-filtering-regexp)) + (eval ediff-default-filtering-regexp) + 'ediff-filtering-regexp-history) ))) (ediff-directory-revisions-internal dir1 regexp 'ediff-revision 'ediff-directory-revisions @@ -559,8 +565,11 @@ regular expression; only file names that match the regexp are considered." ediff-last-dir-C (ediff-strip-last-dir f)) nil) - (read-string "Filter through regular expression: " - nil 'ediff-filtering-regexp-history) + (read-string (format + "Filter through regular expression (default %S): " + (eval ediff-default-filtering-regexp)) + (eval ediff-default-filtering-regexp) + 'ediff-filtering-regexp-history) ))) (ediff-directories-internal dir1 dir2 dir3 regexp 'ediff-files3 'ediff-directories3 @@ -583,8 +592,11 @@ expression; only file names that match the regexp are considered." ediff-last-dir-B (ediff-strip-last-dir f)) nil) - (read-string "Filter through regular expression: " - nil 'ediff-filtering-regexp-history) + (read-string (format + "Filter through regular expression (default %S): " + (eval ediff-default-filtering-regexp)) + (eval ediff-default-filtering-regexp) + 'ediff-filtering-regexp-history) ))) (ediff-directories-internal dir1 dir2 nil regexp 'ediff-merge-files 'ediff-merge-directories @@ -617,8 +629,11 @@ only file names that match the regexp are considered." ediff-last-dir-C (ediff-strip-last-dir f)) nil) - (read-string "Filter through regular expression: " - nil 'ediff-filtering-regexp-history) + (read-string (format + "Filter through regular expression (default %S): " + (eval ediff-default-filtering-regexp)) + (eval ediff-default-filtering-regexp) + 'ediff-filtering-regexp-history) ))) (ediff-directories-internal dir1 dir2 ancestor-dir regexp @@ -636,8 +651,11 @@ names. Only the files that are under revision control are taken into account." (let ((dir-A (ediff-get-default-directory-name))) (list (ediff-read-file-name "Directory to merge with revisions:" dir-A nil) - (read-string "Filter through regular expression: " - nil 'ediff-filtering-regexp-history) + (read-string (format + "Filter through regular expression (default %S): " + (eval ediff-default-filtering-regexp)) + (eval ediff-default-filtering-regexp) + 'ediff-filtering-regexp-history) ))) (ediff-directory-revisions-internal dir1 regexp 'ediff-merge-revisions 'ediff-merge-directory-revisions @@ -658,8 +676,11 @@ names. Only the files that are under revision control are taken into account." (let ((dir-A (ediff-get-default-directory-name))) (list (ediff-read-file-name "Directory to merge with revisions and ancestors:" dir-A nil) - (read-string "Filter through regular expression: " - nil 'ediff-filtering-regexp-history) + (read-string (format + "Filter through regular expression (default %S): " + (eval ediff-default-filtering-regexp)) + (eval ediff-default-filtering-regexp) + 'ediff-filtering-regexp-history) ))) (ediff-directory-revisions-internal dir1 regexp 'ediff-merge-revisions-with-ancestor -- 2.39.2