Commit c4a6a430 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

Move menu bar defines to top level

and split them among three top-level sexps.
parent 767151e1
......@@ -1451,63 +1451,65 @@ Do not start with `~/' or `~user-name/'.")
(defvar ediff-mode-map nil
"Local keymap used in Ediff mode.")
(if (and window-system ediff-want-default-menus (ediff-frame-has-menubar))
(if (ediff-if-lucid)
(progn ;; Lucid menu bars
(defvar ediff-menu
'(""
["Between Files ..." ediff-files t]
["Between Buffers ..." ediff-buffers t]
["With a Revision via VC ..." vc-ediff t]
["With a Revision via RCS ..." rcs-ediff t]))
(defvar epatch-menu
'(""
["To a File ..." ediff-patch-file t]
["To a Buffer ..." ediff-patch-buffer t]))
(add-menu '("File") "Find Differences"
ediff-menu
"Delete Screen")
(add-menu '("File") "Apply Patch"
epatch-menu
"Delete Screen")
;; Displays as a solid horizontal line
(add-menu-item '("File") "---" nil nil "Delete Screen")
)
;; FSF menu bars
;;; This is split in three parts to avoid
;;; making a line in loaddefs.el that is too long for patch.
;;; Note that autoload.el currently looks for cookies
;;; only at top level in the file.
;;;###autoload
(if (not (ediff-if-lucid))
(progn
(defvar menu-bar-epatch-menu (make-sparse-keymap "menu-bar-epatch-map"))
;;;###autoload
(fset 'menu-bar-epatch-menu (symbol-value 'menu-bar-epatch-menu))
;;;###autoload
(defvar menu-bar-ediff-menu (make-sparse-keymap "menu-bar-ediff-map"))
;;;###autoload
(fset 'menu-bar-ediff-menu (symbol-value 'menu-bar-ediff-menu))
(fset 'menu-bar-ediff-menu (symbol-value 'menu-bar-ediff-menu))))
;;;###autoload
(if (not (ediff-if-lucid))
(progn
(define-key menu-bar-ediff-menu [rcs-ediff]
'("With a Revision via RCS ..." . rcs-ediff))
;;;###autoload
(define-key menu-bar-ediff-menu [vc-ediff]
'("With a Revision via VC ..." . vc-ediff))
;;;###autoload
(define-key menu-bar-ediff-menu [ediff-buffers]
'("Between Buffers ..." . ediff-buffers))
;;;###autoload
(define-key menu-bar-ediff-menu [ediff-files]
'("Between Files ..." . ediff-files))
'("Between Files ..." . ediff-files))))
;;;###autoload
(if (not (ediff-if-lucid))
(progn
(define-key menu-bar-epatch-menu [ediff-patch-buffer]
'("To a Buffer ..." . ediff-patch-buffer))
;;;###autoload
(define-key menu-bar-epatch-menu [ediff-patch-file]
'("To a File ..." . ediff-patch-file))
(define-key menu-bar-file-menu [epatch]
'("Apply Patch" . menu-bar-epatch-menu))
(define-key menu-bar-file-menu [ediff]
'("Find Differences" . menu-bar-ediff-menu))
))
'("Find Differences" . menu-bar-ediff-menu))))
(if (and window-system ediff-want-default-menus (ediff-frame-has-menubar))
(if (ediff-if-lucid)
(progn ;; Lucid menu bars
(defvar ediff-menu
'(""
["Between Files ..." ediff-files t]
["Between Buffers ..." ediff-buffers t]
["With a Revision via VC ..." vc-ediff t]
["With a Revision via RCS ..." rcs-ediff t]))
(defvar epatch-menu
'(""
["To a File ..." ediff-patch-file t]
["To a Buffer ..." ediff-patch-buffer t]))
(add-menu '("File") "Find Differences"
ediff-menu
"Delete Screen")
(add-menu '("File") "Apply Patch"
epatch-menu
"Delete Screen")
;; Displays as a solid horizontal line
(add-menu-item '("File") "---" nil nil "Delete Screen")
)))
(defun ediff-setup-keymap ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment