diff options
author | Michael Kifer <kifer@cs.stonybrook.edu> | 1997-09-06 04:16:05 +0000 |
---|---|---|
committer | Michael Kifer <kifer@cs.stonybrook.edu> | 1997-09-06 04:16:05 +0000 |
commit | bd698e987e71743196eb0b317e8df3d39da228d9 (patch) | |
tree | 384fc23f1f1313eded01883014cac7a05c69ddea /lisp/ediff-util.el | |
parent | a18ed1290d36e933724c5e789328195f4f9c2aff (diff) | |
download | emacs-bd698e987e71743196eb0b317e8df3d39da228d9.tar.gz |
new version
Diffstat (limited to 'lisp/ediff-util.el')
-rw-r--r-- | lisp/ediff-util.el | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index 0d0cf25a903..0d11f7b33cb 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el @@ -145,10 +145,11 @@ to invocation.") (define-key ediff-mode-map "p" 'ediff-previous-difference) (define-key ediff-mode-map "\C-?" 'ediff-previous-difference) - (define-key ediff-mode-map [backspace] 'ediff-previous-difference) (define-key ediff-mode-map [delete] 'ediff-previous-difference) (define-key ediff-mode-map "\C-h" (if ediff-no-emacs-help-in-control-buffer 'ediff-previous-difference nil)) + ;; must come after C-h, or else C-h wipes out backspace's binding in XEmacs + (define-key ediff-mode-map [backspace] 'ediff-previous-difference) (define-key ediff-mode-map "n" 'ediff-next-difference) (define-key ediff-mode-map " " 'ediff-next-difference) (define-key ediff-mode-map "j" 'ediff-jump-to-difference) @@ -687,10 +688,6 @@ if necessary." Reestablish the default three-window display." (interactive) (ediff-barf-if-not-control-buffer) - -;; ;; No longer needed: XEmacs has surrogate minibuffers now. -;; (if ediff-xemacs-p (setq synchronize-minibuffers t)) - (let (buffer-read-only) (if (and (ediff-buffer-live-p ediff-buffer-A) (ediff-buffer-live-p ediff-buffer-B) @@ -2918,6 +2915,15 @@ Hit \\[ediff-recenter] to reset the windows afterward." (error "Buffer out of sync for file %s" buffer-file-name)))) +(defun ediff-file-compressed-p (file) + (require 'jka-compr) + (string-match (jka-compr-build-file-regexp) file)) + +(defun ediff-filename-magic-p (file) + (or (ediff-file-compressed-p file) + (ediff-file-remote-p file))) + + (defun ediff-save-buffer (arg) "Safe way of saving buffers A, B, C, and the diff output. `wa' saves buffer A, `wb' saves buffer B, `wc' saves buffer C, @@ -3314,17 +3320,23 @@ Ediff Control Panel to restore highlighting." ;; other insignificant buffers (those beginning with "^[ *]"). ;; Gets one arg--buffer name or a list of buffer names (it won't return ;; these buffers). -(defun ediff-other-buffer (buff) - (if (not (listp buff)) (setq buff (list buff))) +(defun ediff-other-buffer (buff-lst) + (or (listp buff-lst) (setq buff-lst (list buff-lst))) (let* ((frame-buffers (buffer-list)) + (buff-name-list + (mapcar + (function (lambda (b) + (cond ((stringp b) b) + ((bufferp b) (buffer-name b))))) + buff-lst)) (significant-buffers (mapcar (function (lambda (x) - (cond ((member (buffer-name x) buff) - nil) - ((not (ediff-get-visible-buffer-window x)) - nil) - ((string-match "^ " (buffer-name x)) + (cond ((member (buffer-name x) buff-name-list) nil) + ((not (ediff-get-visible-buffer-window x)) nil) + ((string-match "^[ *]" (buffer-name x)) nil) + ((memq (ediff-with-current-buffer x major-mode) + '(dired-mode)) nil) (t x)))) frame-buffers)) @@ -3338,8 +3350,12 @@ Ediff Control Panel to restore highlighting." (mapcar (function (lambda (x) - (cond ((member (buffer-name x) buff) nil) + (cond ((member (buffer-name x) buff-name-list) nil) ((string-match "^[ *]" (buffer-name x)) nil) + ((memq + (ediff-with-current-buffer x major-mode) + '(dired-mode)) + nil) (t x)))) frame-buffers))) (car less-significant-buffers)) |