diff lisp/ediff-mult.el @ 42288:3ce98f3e0608

2001-12-24 Michael Kifer <kifer@cs.sunysb.edu> * viper-cmd.el (viper-change-state): Got rid of make-local-hook. (viper-special-read-and-insert-char): Make C-m work right in the r comand. (viper-buffer-search-enable): Fixed format string. * viper-ex.el (ex-token-alist): Use ex-set-visited-file-name instead of viper-info-on-file. (ex-set-visited-file-name): New function. * viper.el (viper-emacs-state-mode-list): Added mail-mode. * ediff-mult.el (ediff-meta-mark-equal-files): Added optional action argument. * ediff-init.el: Fixed some doc strings. * ediff-util.el (ediff-after-quit-hook-internal): New variable. Got rid of make-local-hook. * ediff-wind.el (ediff-setup-control-frame): Got rid of make-local-hook.
author Michael Kifer <kifer@cs.stonybrook.edu>
date Mon, 24 Dec 2001 05:50:31 +0000
parents 3856a43ac2bb
children 633233bf2bbf
line wrap: on
line diff
--- a/lisp/ediff-mult.el	Mon Dec 24 04:52:54 2001 +0000
+++ b/lisp/ediff-mult.el	Mon Dec 24 05:50:31 2001 +0000
@@ -2110,10 +2110,17 @@
   (ediff-update-meta-buffer (current-buffer) 'must-redraw))
 
 
-(defun ediff-meta-mark-equal-files ()
-  "Run though the session list and mark identical files.
-This is used only for sessions that involve 2 or 3 files at the same time."
+;; ACTION is ?h, ?m, ?=: to mark for hiding, mark for operation, or simply
+;; indicate which are equal files
+(defun ediff-meta-mark-equal-files (&optional action)
+  "Run through the session list and mark identical files.
+This is used only for sessions that involve 2 or 3 files at the same time.
+ACTION is an optional argument that can be ?h, ?m, ?=, to mark for hiding, mark
+for operation, or simply indicate which are equal files. If it is nil, then
+last-command-char is used to decide which action to take."
   (interactive)
+  (if (null action)
+      (setq action last-command-char))
   (let ((list (cdr ediff-meta-list))
 	marked1 marked2 marked3
 	fileinfo1 fileinfo2 fileinfo3 elt)
@@ -2138,9 +2145,9 @@
 	    (or (ediff-mark-if-equal fileinfo2 fileinfo3)
 		(setq marked3 nil))))
       (if (and marked1 marked2 marked3)
-	  (cond ((eq last-command-char ?h)
+	  (cond ((eq action ?h)
 		 (ediff-mark-session-for-hiding elt 'mark))
-		((eq last-command-char ?m)
+		((eq action ?m)
 		 (ediff-mark-session-for-operation elt 'mark))
 		))
       (setq list (cdr list)))