comparison lisp/ediff/ediff-hook.el @ 14:9ee227acff29 r19-15b90

Import from CVS: tag r19-15b90
author cvs
date Mon, 13 Aug 2007 08:48:42 +0200
parents bcdc7deadc19
children 0293115a14e9
comparison
equal deleted inserted replaced
13:13c6d0aaafe5 14:9ee227acff29
36 (defvar ediff-menu) 36 (defvar ediff-menu)
37 (defvar ediff-merge-menu) 37 (defvar ediff-merge-menu)
38 (defvar epatch-menu) 38 (defvar epatch-menu)
39 ;; end pacifier 39 ;; end pacifier
40 40
41 ;; allow menus to be set up without ediff-wind.el being loaded
42 (defvar ediff-window-setup-function)
43
41 44
42 (defun ediff-xemacs-init-menus () 45 (defun ediff-xemacs-init-menus ()
46 (setq ediff-window-setup-function
47 (if (console-on-window-system-p)
48 'ediff-setup-windows-multiframe
49 'ediff-setup-windows-plain))
43 (if (featurep 'menubar) 50 (if (featurep 'menubar)
44 (progn 51 (progn
45 ;; (add-menu-button 52 (add-menu-button
46 ;; '("Tools") 53 '("Tools")
47 ;; ["Use separate frame for Ediff control buffer" 54 ["Use separate frame for Ediff control buffer"
48 ;; ediff-toggle-multiframe 55 ediff-toggle-multiframe
49 ;; :style toggle 56 :style toggle
50 ;; :selected (eq ediff-window-setup-function 'ediff-setup-windows-multiframe)] 57 :selected (eq ediff-window-setup-function 'ediff-setup-windows-multiframe)]
51 ;; "00-Browser...") 58 "00-Browser...")
52 ;; (add-menu-button 59 ;;(add-menu-button
53 ;; '("Tools") 60 ;; '("Tools")
54 ;; ["Use a toolbar with Ediff control buffer" 61 ;; ["Use a toolbar with Ediff control buffer"
55 ;; ediff-menu-toggle-use-toolbar 62 ;; ediff-toggle-use-toolbar
56 ;; :style toggle 63 ;; :style toggle
57 ;; :selected (ediff-use-toolbar-p)] 64 ;; :selected (ediff-use-toolbar-p)]
58 ;; "00-Browser...") 65 ;; "00-Browser...")
59 (add-submenu 66 (add-submenu
60 '("Tools") ediff-menu "OO-Browser...") 67 '("Tools") ediff-menu "OO-Browser...")
61 (add-submenu 68 (add-submenu
62 '("Tools") ediff-merge-menu "OO-Browser...") 69 '("Tools") ediff-merge-menu "OO-Browser...")
63 (add-submenu 70 (add-submenu
142 149
143 ;; define ediff-menu 150 ;; define ediff-menu
144 (define-key menu-bar-ediff-menu [ediff-doc] 151 (define-key menu-bar-ediff-menu [ediff-doc]
145 '("Ediff Manual..." . ediff-documentation)) 152 '("Ediff Manual..." . ediff-documentation))
146 (define-key menu-bar-ediff-menu [emultiframe] 153 (define-key menu-bar-ediff-menu [emultiframe]
147 '("Toggle separate control buffer frame..." 154 '("Toggle separate control buffer frame..."
148 . ediff-toggle-multiframe)) 155 . ediff-toggle-multiframe))
149 (define-key menu-bar-ediff-menu [eregistry] 156 (define-key menu-bar-ediff-menu [eregistry]
150 '("List Ediff Sessions..." . ediff-show-registry)) 157 '("List Ediff Sessions..." . ediff-show-registry))
151 (define-key menu-bar-ediff-menu [separator-ediff-manual] '("--")) 158 (define-key menu-bar-ediff-menu [separator-ediff-manual] '("--"))
152 (define-key menu-bar-ediff-menu [window] 159 (define-key menu-bar-ediff-menu [window]
153 '("This Window and Next Window" . compare-windows)) 160 '("This Window and Next Window" . compare-windows))
182 189
183 ;; define merge menu 190 ;; define merge menu
184 (define-key menu-bar-ediff-merge-menu [ediff-doc2] 191 (define-key menu-bar-ediff-merge-menu [ediff-doc2]
185 '("Ediff Manual..." . ediff-documentation)) 192 '("Ediff Manual..." . ediff-documentation))
186 (define-key menu-bar-ediff-merge-menu [emultiframe2] 193 (define-key menu-bar-ediff-merge-menu [emultiframe2]
187 '("Toggle separate control buffer frame..." 194 '("Toggle separate control buffer frame..."
188 . ediff-toggle-multiframe)) 195 . ediff-toggle-multiframe))
189 (define-key menu-bar-ediff-merge-menu [eregistry2] 196 (define-key menu-bar-ediff-merge-menu [eregistry2]
190 '("List Ediff Sessions..." . ediff-show-registry)) 197 '("List Ediff Sessions..." . ediff-show-registry))
191 (define-key 198 (define-key
192 menu-bar-ediff-merge-menu [separator-ediff-merge-manual] '("--")) 199 menu-bar-ediff-merge-menu [separator-ediff-merge-manual] '("--"))
193 (define-key 200 (define-key
224 231
225 ;; define epatch menu 232 ;; define epatch menu
226 (define-key menu-bar-epatch-menu [ediff-doc3] 233 (define-key menu-bar-epatch-menu [ediff-doc3]
227 '("Ediff Manual..." . ediff-documentation)) 234 '("Ediff Manual..." . ediff-documentation))
228 (define-key menu-bar-epatch-menu [emultiframe3] 235 (define-key menu-bar-epatch-menu [emultiframe3]
229 '("Toggle separate control buffer frame..." 236 '("Toggle separate control buffer frame..."
230 . ediff-toggle-multiframe)) 237 . ediff-toggle-multiframe))
231 (define-key menu-bar-epatch-menu [eregistry3] 238 (define-key menu-bar-epatch-menu [eregistry3]
232 '("List Ediff Sessions..." . ediff-show-registry)) 239 '("List Ediff Sessions..." . ediff-show-registry))
233 (define-key menu-bar-epatch-menu [separator-epatch] '("--")) 240 (define-key menu-bar-epatch-menu [separator-epatch] '("--"))
234 (define-key menu-bar-epatch-menu [ediff-patch-buffer] 241 (define-key menu-bar-epatch-menu [ediff-patch-buffer]
235 '("To a Buffer..." . ediff-patch-buffer)) 242 '("To a Buffer..." . ediff-patch-buffer))
236 (define-key menu-bar-epatch-menu [ediff-patch-file] 243 (define-key menu-bar-epatch-menu [ediff-patch-file]
237 '("To a File..." . ediff-patch-file))) 244 '("To a File..." . ediff-patch-file)))
336 t) 343 t)
337 (autoload 'ediff-toggle-multiframe 344 (autoload 'ediff-toggle-multiframe
338 "ediff-util" 345 "ediff-util"
339 "Toggle the use of separate frame for Ediff control buffer." 346 "Toggle the use of separate frame for Ediff control buffer."
340 t) 347 t)
341 ;;(if (string-match "XEmacs" emacs-version) 348 (condition-case nil
342 ;; (autoload 'ediff-toggle-use-toolbar 349 (if (string-match "XEmacs" emacs-version)
343 ;; "ediff-tbar" 350 (autoload 'ediff-toggle-use-toolbar
344 ;; "Toggle the use of Ediff toolbar." 351 "ediff-tbar"
345 ;; t)) 352 "Toggle the use of Ediff toolbar."
353 t))
354 (error))
346 ) ; if purify-flag 355 ) ; if purify-flag
347 356
348 357
349 (provide 'ediff-hook) 358 (provide 'ediff-hook)
350 359