comparison lisp/ediff/ediff-util.el @ 80:1ce6082ce73f r20-0b90

Import from CVS: tag r20-0b90
author cvs
date Mon, 13 Aug 2007 09:06:37 +0200
parents c7528f8e288d
children 6a378aca36af
comparison
equal deleted inserted replaced
79:5b0a5bbffab6 80:1ce6082ce73f
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the 20 ;; along with GNU Emacs; see the file COPYING. If not, write to the
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 ;; Boston, MA 02111-1307, USA. 22 ;; Boston, MA 02111-1307, USA.
23 23
24 ;;; Code: 24 ;;; Code:
25 25
26 ;; Pacify compiler and avoid the need in checking for boundp 26 (provide 'ediff-util)
27 (defvar ediff-patch-diagnostics nil) 27
28 (defvar ediff-patchbufer nil) 28 ;; Compiler pacifier
29 (and noninteractive 29 (defvar ediff-patch-diagnostics)
30 (eval-when-compile 30 (defvar ediff-patchbufer)
31 (let ((load-path (cons (expand-file-name ".") load-path))) 31 (defvar ediff-toolbar)
32 (load-file "ediff-init.el") 32 (defvar mark-active)
33 (load-file "ediff-help.el")))) 33
34 (eval-when-compile
35 (let ((load-path (cons "." load-path)))
36 (or (featurep 'ediff-init)
37 (load "ediff-init.el" nil nil 'nosuffix))
38 (or (featurep 'ediff-help)
39 (load "ediff-help.el" nil nil 'nosuffix))
40 (or (featurep 'ediff-mult)
41 (load "ediff-mult.el" nil nil 'nosuffix))
42 (or (featurep 'ediff-wind)
43 (load "ediff-wind.el" nil nil 'nosuffix))
44 (or (featurep 'ediff-diff)
45 (load "ediff-diff.el" nil nil 'nosuffix))
46 (or (featurep 'ediff-merg)
47 (load "ediff-merg.el" nil nil 'nosuffix))
48 (or (featurep 'ediff)
49 (load "ediff.el" nil nil 'nosuffix))
50 (or (featurep 'ediff-tbar)
51 (load "ediff-tbar.el" 'noerror nil 'nosuffix))
52 ))
34 ;; end pacifier 53 ;; end pacifier
35 54
36 (require 'ediff-init) 55 (require 'ediff-init)
37 (require 'ediff-help) 56 (require 'ediff-help)
38 (require 'ediff-mult) 57 (require 'ediff-mult)
39 58 (require 'ediff-wind)
40 ;;(if ediff-xemacs-p 59 (require 'ediff-diff)
41 ;; (require 'ediff-tbar) 60 (require 'ediff-merg)
42 ;; (defun ediff-use-toolbar-p () nil)) 61
43 ;; 62
44 ;; for the time being 63 ;; be careful with ediff-tbar
45 (defun ediff-use-toolbar-p () nil) 64 (if ediff-xemacs-p
65 (condition-case nil
66 (require 'ediff-tbar)
67 (error
68 (defun ediff-use-toolbar-p () nil)))
69 (defun ediff-use-toolbar-p () nil))
46 70
47 71
48 ;;; Functions 72 ;;; Functions
49 73
50 (defun ediff-mode () 74 (defun ediff-mode ()
81 (setq major-mode 'ediff-mode) 105 (setq major-mode 'ediff-mode)
82 (setq mode-name "Ediff") 106 (setq mode-name "Ediff")
83 (run-hooks 'ediff-mode-hook)) 107 (run-hooks 'ediff-mode-hook))
84 108
85 109
86 (require 'ediff-diff)
87 (require 'ediff-merg)
88
89 110
90 ;;; Build keymaps 111 ;;; Build keymaps
91 112
92 (ediff-defvar-local ediff-mode-map nil 113 (ediff-defvar-local ediff-mode-map nil
93 "Local keymap used in Ediff mode. 114 "Local keymap used in Ediff mode.
215 (fset 'ediff-mode-map ediff-mode-map) 236 (fset 'ediff-mode-map ediff-mode-map)
216 (run-hooks 'ediff-keymap-setup-hook)) 237 (run-hooks 'ediff-keymap-setup-hook))
217 238
218 239
219 ;;; Setup functions 240 ;;; Setup functions
220
221 (require 'ediff-wind)
222 241
223 ;; No longer needed: XEmacs has surrogate minibuffers now. 242 ;; No longer needed: XEmacs has surrogate minibuffers now.
224 ;;(or (boundp 'synchronize-minibuffers) 243 ;;(or (boundp 'synchronize-minibuffers)
225 ;; (defvar synchronize-minibuffers nil)) 244 ;; (defvar synchronize-minibuffers nil))
226 245
499 (if (not (ediff-multiframe-setup-p)) 518 (if (not (ediff-multiframe-setup-p))
500 (ediff-make-bottom-toolbar)) ; checks if toolbar is requested 519 (ediff-make-bottom-toolbar)) ; checks if toolbar is requested
501 (goto-char (point-min)) 520 (goto-char (point-min))
502 (skip-chars-forward ediff-whitespace))) 521 (skip-chars-forward ediff-whitespace)))
503 522
504 523
505 524
506 525
507 ;;; Commands for working with Ediff 526 ;;; Commands for working with Ediff
508 527
509 (defun ediff-update-diffs () 528 (defun ediff-update-diffs ()
981 (not (file-writable-p file))) 1000 (not (file-writable-p file)))
982 (message "Warning: file %s is read-only" 1001 (message "Warning: file %s is read-only"
983 (ediff-abbreviate-file-name file) (beep 1))) 1002 (ediff-abbreviate-file-name file) (beep 1)))
984 )))) 1003 ))))
985 1004
986
987 ;; checkout if visited file is checked in 1005 ;; checkout if visited file is checked in
988 (defun ediff-maybe-checkout (buf) 1006 (defun ediff-maybe-checkout (buf)
989 (let ((file (buffer-file-name buf)) 1007 (let ((file (buffer-file-name buf))
990 (checkout-function (key-binding "\C-x\C-q"))) 1008 (checkout-function (key-binding "\C-x\C-q")))
991 (if (and (ediff-file-checked-in-p file) 1009 (if (and (ediff-file-checked-in-p file)
1158 (funcall ediff-make-wide-display-function) 1176 (funcall ediff-make-wide-display-function)
1159 ;;(sit-for (if ediff-xemacs-p 0.4 0)) 1177 ;;(sit-for (if ediff-xemacs-p 0.4 0))
1160 (ediff-eval-in-buffer ctl-buf 1178 (ediff-eval-in-buffer ctl-buf
1161 (setq ediff-window-B nil) ; force update of window config 1179 (setq ediff-window-B nil) ; force update of window config
1162 (ediff-recenter 'no-rehighlight))))) 1180 (ediff-recenter 'no-rehighlight)))))
1163 1181
1164 ;;;###autoload 1182 ;;;###autoload
1165 (defun ediff-toggle-multiframe () 1183 (defun ediff-toggle-multiframe ()
1166 "Switch from the multiframe display to single-frame display and back. 1184 "Switch from the multiframe display to single-frame display and back.
1167 For a permanent change, set the variable `ediff-window-setup-function', 1185 For a permanent change, set the variable `ediff-window-setup-function',
1168 which see." 1186 which see."
1169 (interactive) 1187 (interactive)
1170 (let (set-func) 1188 (let (set-func window-setup-func)
1171 (or (ediff-window-display-p) 1189 (or (ediff-window-display-p)
1172 (error "%sEmacs is not running as a window application" 1190 (error "%sEmacs is not running as a window application"
1173 (if ediff-emacs-p "" "X"))) 1191 (if ediff-emacs-p "" "X")))
1174 1192
1175 (setq set-func (if (ediff-in-control-buffer-p) 'setq 'setq-default)) 1193 ;;(setq set-func (if (ediff-in-control-buffer-p) 'setq 'setq-default))
1176 1194
1177 (cond ((eq ediff-window-setup-function 'ediff-setup-windows-multiframe) 1195 (cond ((eq ediff-window-setup-function 'ediff-setup-windows-multiframe)
1178 (eval 1196 ;; (eval
1179 (list 1197 ;; (list
1180 set-func 1198 ;; set-func
1181 'ediff-window-setup-function ''ediff-setup-windows-plain))) 1199 ;; 'ediff-window-setup-function ''ediff-setup-windows-plain))
1200 (setq window-setup-func 'ediff-setup-windows-plain)
1201 )
1182 ((eq ediff-window-setup-function 'ediff-setup-windows-plain) 1202 ((eq ediff-window-setup-function 'ediff-setup-windows-plain)
1183 (if (ediff-in-control-buffer-p) 1203 (if (ediff-in-control-buffer-p)
1184 (ediff-kill-bottom-toolbar)) 1204 (ediff-kill-bottom-toolbar))
1185 (eval 1205 ;;(eval
1186 (list 1206 ;; (list
1187 set-func 1207 ;; set-func
1188 'ediff-window-setup-function ''ediff-setup-windows-multiframe)))) 1208 ;; 'ediff-window-setup-function 'ediff-setup-windows-multiframe))
1209 (setq window-setup-func 'ediff-setup-windows-multiframe)
1210 ))
1211
1212 ;; change default
1213 (setq-default ediff-window-setup-function window-setup-func)
1214 ;; change in all active ediff sessions
1215 (mapcar (function (lambda(buf)
1216 (ediff-eval-in-buffer buf
1217 (setq ediff-window-setup-function window-setup-func
1218 ediff-window-B nil))))
1219 ediff-session-registry)
1189 (if (ediff-in-control-buffer-p) 1220 (if (ediff-in-control-buffer-p)
1190 (progn 1221 (ediff-recenter 'no-rehighlight))))
1191 (setq ediff-window-B nil)
1192 (ediff-recenter 'no-rehighlight)))))
1193 1222
1194 ;; if was using toolbar, kill it 1223 ;; if was using toolbar, kill it
1195 (defun ediff-kill-bottom-toolbar () 1224 (defun ediff-kill-bottom-toolbar ()
1196 ;; Using ctl-buffer or ediff-control-window for LOCALE does not 1225 ;; Using ctl-buffer or ediff-control-window for LOCALE does not
1197 ;; work properly in XEmacs 19.14: we have to use 1226 ;; work properly in XEmacs 19.14: we have to use
1265 (ediff-overlay-start overl-A) (ediff-overlay-end overl-A))) 1294 (ediff-overlay-start overl-A) (ediff-overlay-end overl-A)))
1266 (ediff-eval-in-buffer ediff-buffer-B 1295 (ediff-eval-in-buffer ediff-buffer-B
1267 (narrow-to-region 1296 (narrow-to-region
1268 (ediff-overlay-start overl-B) (ediff-overlay-end overl-B))) 1297 (ediff-overlay-start overl-B) (ediff-overlay-end overl-B)))
1269 1298
1270 (if ediff-3way-comparison-job 1299 (if ediff-3way-job
1271 (ediff-eval-in-buffer ediff-buffer-C 1300 (ediff-eval-in-buffer ediff-buffer-C
1272 (narrow-to-region 1301 (narrow-to-region
1273 (ediff-overlay-start overl-C) (ediff-overlay-end overl-C)))) 1302 (ediff-overlay-start overl-C) (ediff-overlay-end overl-C))))
1274 ))) 1303 )))
1275 1304
1515 (if (< ediff-current-difference ediff-number-of-differences) 1544 (if (< ediff-current-difference ediff-number-of-differences)
1516 (let ((n (min ediff-number-of-differences 1545 (let ((n (min ediff-number-of-differences
1517 (+ ediff-current-difference arg))) 1546 (+ ediff-current-difference arg)))
1518 regexp-skip) 1547 regexp-skip)
1519 1548
1549 (ediff-visible-region)
1520 (or (>= n ediff-number-of-differences) 1550 (or (>= n ediff-number-of-differences)
1521 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) 1551 (setq regexp-skip (funcall ediff-skip-diff-region-function n))
1522 (ediff-install-fine-diff-if-necessary n)) 1552 (ediff-install-fine-diff-if-necessary n))
1523 (while (and (< n ediff-number-of-differences) 1553 (while (and (< n ediff-number-of-differences)
1524 (or 1554 (or
1551 (ediff-barf-if-not-control-buffer) 1581 (ediff-barf-if-not-control-buffer)
1552 (if (> ediff-current-difference -1) 1582 (if (> ediff-current-difference -1)
1553 (let ((n (max -1 (- ediff-current-difference arg))) 1583 (let ((n (max -1 (- ediff-current-difference arg)))
1554 regexp-skip) 1584 regexp-skip)
1555 1585
1586 (ediff-visible-region)
1556 (or (< n 0) 1587 (or (< n 0)
1557 (setq regexp-skip (funcall ediff-skip-diff-region-function n)) 1588 (setq regexp-skip (funcall ediff-skip-diff-region-function n))
1558 (ediff-install-fine-diff-if-necessary n)) 1589 (ediff-install-fine-diff-if-necessary n))
1559 (while (and (> n -1) 1590 (while (and (> n -1)
1560 (or 1591 (or
2318 (ediff-kill-buffer-carefully ediff-diff-buffer) 2349 (ediff-kill-buffer-carefully ediff-diff-buffer)
2319 (ediff-kill-buffer-carefully ediff-custom-diff-buffer) 2350 (ediff-kill-buffer-carefully ediff-custom-diff-buffer)
2320 (ediff-kill-buffer-carefully ediff-fine-diff-buffer) 2351 (ediff-kill-buffer-carefully ediff-fine-diff-buffer)
2321 (ediff-kill-buffer-carefully ediff-tmp-buffer) 2352 (ediff-kill-buffer-carefully ediff-tmp-buffer)
2322 (ediff-kill-buffer-carefully ediff-error-buffer) 2353 (ediff-kill-buffer-carefully ediff-error-buffer)
2323 (ediff-kill-buffer-carefully ediff-patch-diagnostics)
2324 (ediff-kill-buffer-carefully ediff-msg-buffer) 2354 (ediff-kill-buffer-carefully ediff-msg-buffer)
2325 (ediff-kill-buffer-carefully ediff-debug-buffer) 2355 (ediff-kill-buffer-carefully ediff-debug-buffer)
2356 (if (boundp 'ediff-patch-diagnostics)
2357 (ediff-kill-buffer-carefully ediff-patch-diagnostics))
2326 2358
2327 (if (and (ediff-window-display-p) (frame-live-p ctl-frame)) 2359 (if (and (ediff-window-display-p) (frame-live-p ctl-frame))
2328 (delete-frame ctl-frame)) 2360 (delete-frame ctl-frame))
2329 ;; Hide bottom toolbar. --marcpa 2361 ;; Hide bottom toolbar. --marcpa
2330 (if (not (ediff-multiframe-setup-p)) 2362 (if (not (ediff-multiframe-setup-p))
2444 (buf-B ediff-buffer-B) 2476 (buf-B ediff-buffer-B)
2445 (buf-C ediff-buffer-C) 2477 (buf-C ediff-buffer-C)
2446 (buf-A-wind (ediff-get-visible-buffer-window buf-A)) 2478 (buf-A-wind (ediff-get-visible-buffer-window buf-A))
2447 (buf-B-wind (ediff-get-visible-buffer-window buf-B)) 2479 (buf-B-wind (ediff-get-visible-buffer-window buf-B))
2448 (buf-C-wind (ediff-get-visible-buffer-window buf-C)) 2480 (buf-C-wind (ediff-get-visible-buffer-window buf-C))
2449 (buf-patch ediff-patchbufer) 2481 (buf-patch (if (boundp 'ediff-patchbufer) ediff-patchbufer nil))
2450 (buf-patch-diag ediff-patch-diagnostics) 2482 (buf-patch-diag (if (boundp 'ediff-patch-diagnostics)
2483 ediff-patch-diagnostics nil))
2451 (buf-err ediff-error-buffer) 2484 (buf-err ediff-error-buffer)
2452 (buf-diff ediff-diff-buffer) 2485 (buf-diff ediff-diff-buffer)
2453 (buf-custom-diff ediff-custom-diff-buffer) 2486 (buf-custom-diff ediff-custom-diff-buffer)
2454 (buf-fine-diff ediff-fine-diff-buffer)) 2487 (buf-fine-diff ediff-fine-diff-buffer))
2455 2488
2466 (if (window-live-p buf-A-wind) 2499 (if (window-live-p buf-A-wind)
2467 (progn 2500 (progn
2468 (select-window buf-A-wind) 2501 (select-window buf-A-wind)
2469 (delete-other-windows) 2502 (delete-other-windows)
2470 (bury-buffer)) 2503 (bury-buffer))
2471 (if (ediff-buffer-live-p buf-A) (bury-buffer buf-A))) 2504 (if (ediff-buffer-live-p buf-A)
2505 (progn
2506 (set-buffer buf-A)
2507 (bury-buffer))))
2472 (if (window-live-p buf-B-wind) 2508 (if (window-live-p buf-B-wind)
2473 (progn 2509 (progn
2474 (select-window buf-B-wind) 2510 (select-window buf-B-wind)
2475 (delete-other-windows) 2511 (delete-other-windows)
2476 (bury-buffer)) 2512 (bury-buffer))
2477 (if (ediff-buffer-live-p buf-B) (bury-buffer buf-B))) 2513 (if (ediff-buffer-live-p buf-B)
2514 (progn
2515 (set-buffer buf-B)
2516 (bury-buffer))))
2478 (if (window-live-p buf-C-wind) 2517 (if (window-live-p buf-C-wind)
2479 (progn 2518 (progn
2480 (select-window buf-C-wind) 2519 (select-window buf-C-wind)
2481 (delete-other-windows) 2520 (delete-other-windows)
2482 (bury-buffer)) 2521 (bury-buffer))
2483 (if (ediff-buffer-live-p buf-C) (bury-buffer buf-C))) 2522 (if (ediff-buffer-live-p buf-C)
2484 2523 (progn
2524 (set-buffer buf-C)
2525 (bury-buffer))))
2485 )) 2526 ))
2486 2527
2487 2528
2488 (defun ediff-suspend () 2529 (defun ediff-suspend ()
2489 "Suspend Ediff. 2530 "Suspend Ediff.
2905 Ediff Control Panel to restore highlighting." 2946 Ediff Control Panel to restore highlighting."
2906 (interactive) 2947 (interactive)
2907 (let ((answer "") 2948 (let ((answer "")
2908 (possibilities (list ?A ?B ?C)) 2949 (possibilities (list ?A ?B ?C))
2909 (zmacs-regions t) 2950 (zmacs-regions t)
2951 (ctl-buf (current-buffer))
2910 quit-now 2952 quit-now
2911 begA begB endA endB bufA bufB) 2953 begA begB endA endB bufA bufB)
2912 2954
2913 (cond ((ediff-merge-job) 2955 (cond ((ediff-merge-job)
2914 (setq bufB ediff-buffer-C) 2956 (setq bufB ediff-buffer-C)
2915 (while (cond ((memq answer '(?A ?a)) 2957 (while (cond ((eq answer ?A)
2916 (setq bufA ediff-buffer-A) 2958 (setq bufA ediff-buffer-A
2959 possibilities '(?B))
2917 nil) 2960 nil)
2918 ((memq answer '(?B ?b)) 2961 ((eq answer ?B)
2919 (setq bufA ediff-buffer-B) 2962 (setq bufA ediff-buffer-B
2963 possibilities '(?A))
2920 nil) 2964 nil)
2921 ((equal answer "")) 2965 ((equal answer ""))
2922 (t (beep 1) 2966 (t (beep 1)
2923 (message "Valid values are A or B") 2967 (message "Valid values are A or B")
2924 (sit-for 2) 2968 (sit-for 2)
2925 t)) 2969 t))
2926 (let ((cursor-in-echo-area t)) 2970 (let ((cursor-in-echo-area t))
2927 (message "Which buffer to compare to the merge buffer (A/B)? ") 2971 (message "Which buffer to compare to the merge buffer (A/B)? ")
2928 (setq answer (read-char-exclusive))))) 2972 (setq answer (capitalize (read-char-exclusive))))))
2929 2973
2930 ((ediff-3way-comparison-job) 2974 ((ediff-3way-comparison-job)
2931 (while (cond ((memq answer possibilities) 2975 (while (cond ((memq answer possibilities)
2932 (setq possibilities (delq answer possibilities)) 2976 (setq possibilities (delq answer possibilities))
2933 (setq bufA 2977 (setq bufA
2963 (message "Enter the 2nd buffer you want to compare (%s): " 3007 (message "Enter the 2nd buffer you want to compare (%s): "
2964 (mapconcat 'char-to-string possibilities "/")) 3008 (mapconcat 'char-to-string possibilities "/"))
2965 (setq answer (capitalize (read-char-exclusive)))))) 3009 (setq answer (capitalize (read-char-exclusive))))))
2966 (t ; 2way comparison 3010 (t ; 2way comparison
2967 (setq bufA ediff-buffer-A 3011 (setq bufA ediff-buffer-A
2968 bufB ediff-buffer-B))) 3012 bufB ediff-buffer-B
3013 possibilities nil)))
2969 3014
2970 (ediff-eval-in-buffer bufA 3015 (ediff-eval-in-buffer bufA
2971 (or (mark t) 3016 (or (mark t)
2972 (error "You forgot to specify a region in buffer %s" (buffer-name))) 3017 (error "You forgot to specify a region in buffer %s" (buffer-name)))
2973 (setq begA (region-beginning) 3018 (setq begA (region-beginning)
3009 (narrow-to-region begB endB) 3054 (narrow-to-region begB endB)
3010 ;; (ediff-activate-mark) 3055 ;; (ediff-activate-mark)
3011 ) 3056 )
3012 ;; (sit-for 0) 3057 ;; (sit-for 0)
3013 3058
3059 ;; At this point, possibilities contains either the window char A/B/C
3060 ;; that was not selected, or it is nil. We delete the window that is not
3061 ;; selected.
3062 (if possibilities
3063 (ediff-eval-in-buffer ctl-buf
3064 (let* ((wind-to-delete (eval
3065 (intern
3066 (format
3067 "ediff-window-%c" (car possibilities)))))
3068 (frame (window-frame wind-to-delete)))
3069 (delete-window wind-to-delete)
3070 (select-frame frame)
3071 (balance-windows))))
3014 (or (y-or-n-p 3072 (or (y-or-n-p
3015 "Please check the selected regions. Continue? ") 3073 "Please check regions selected for comparison. Continue? ")
3016 (setq quit-now t)) 3074 (setq quit-now t))
3017 3075
3018 (ediff-eval-in-buffer bufA 3076 (ediff-eval-in-buffer bufA
3019 (widen)) 3077 (widen))
3020 (ediff-eval-in-buffer bufB 3078 (ediff-eval-in-buffer bufB
3021 (widen)) 3079 (widen))
3022 (if quit-now 3080 (if quit-now
3023 (error "Thank you. Come back another day...")) 3081 (ediff-eval-in-buffer ctl-buf
3082 (ediff-recenter)
3083 (sit-for 0)
3084 (error "All right. Make up your mind and come back...")))
3024 3085
3025 (ediff-regions-internal 3086 (ediff-regions-internal
3026 bufA begA endA bufB begB endB 3087 bufA begA endA bufB begB endB
3027 nil ; startup hook 3088 nil ; startup hook
3028 'ediff-regions-linewise ; job name 3089 'ediff-regions-linewise ; job name
3029 nil) ; no word mode 3090 nil) ; no word mode
3030 )) 3091 ))
3031 3092
3032 3093
3033 3094
3034 (defun ediff-remove-flags-from-buffer (buffer overlay) 3095 (defun ediff-remove-flags-from-buffer (buffer overlay)
3035 (ediff-eval-in-buffer buffer 3096 (ediff-eval-in-buffer buffer
3036 (let ((inhibit-read-only t)) 3097 (let ((inhibit-read-only t))
3037 (if ediff-xemacs-p 3098 (if ediff-xemacs-p
3183 (ediff-overlay-put overl 'start-open nil) 3244 (ediff-overlay-put overl 'start-open nil)
3184 (ediff-overlay-put overl 'end-open nil))) 3245 (ediff-overlay-put overl 'end-open nil)))
3185 (ediff-overlay-put overl 'ediff-diff-num 0) 3246 (ediff-overlay-put overl 'ediff-diff-num 0)
3186 overl)))) 3247 overl))))
3187 3248
3188 (defsubst ediff-overlay-start (overl)
3189 (if (ediff-overlayp overl)
3190 (if ediff-emacs-p
3191 (overlay-start overl)
3192 (extent-start-position overl))))
3193
3194 (defsubst ediff-overlay-end (overl)
3195 (if (ediff-overlayp overl)
3196 (if ediff-emacs-p
3197 (overlay-end overl)
3198 (extent-end-position overl))))
3199
3200 3249
3201 ;; Like other-buffer, but prefers visible buffers and ignores temporary or 3250 ;; Like other-buffer, but prefers visible buffers and ignores temporary or
3202 ;; other insignificant buffers (those beginning with "^[ *]"). 3251 ;; other insignificant buffers (those beginning with "^[ *]").
3203 ;; Gets one arg--buffer name or a list of buffer names (it won't return 3252 ;; Gets one arg--buffer name or a list of buffer names (it won't return
3204 ;; these buffers). 3253 ;; these buffers).
3593 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) 3642 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
3594 ;;; eval: (put 'ediff-eval-in-buffer 'lisp-indent-hook 1) 3643 ;;; eval: (put 'ediff-eval-in-buffer 'lisp-indent-hook 1)
3595 ;;; eval: (put 'ediff-eval-in-buffer 'edebug-form-spec '(form body)) 3644 ;;; eval: (put 'ediff-eval-in-buffer 'edebug-form-spec '(form body))
3596 ;;; End: 3645 ;;; End:
3597 3646
3598 (provide 'ediff-util)
3599
3600 ;;; ediff-util.el ends here 3647 ;;; ediff-util.el ends here