diff options
| author | Richard M. Stallman | 1994-05-14 08:33:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-14 08:33:26 +0000 |
| commit | c4a6a430aad498b301d3aa4f4ed1c81019c5e98f (patch) | |
| tree | 80586f203e8057118c09a1a28ac2669d73068ba7 | |
| parent | 767151e119bcb3b61eeb39edf25534167cb8e151 (diff) | |
| download | emacs-c4a6a430aad498b301d3aa4f4ed1c81019c5e98f.tar.gz emacs-c4a6a430aad498b301d3aa4f4ed1c81019c5e98f.zip | |
Move menu bar defines to top level
and split them among three top-level sexps.
| -rw-r--r-- | lisp/ediff.el | 70 |
1 files changed, 36 insertions, 34 deletions
diff --git a/lisp/ediff.el b/lisp/ediff.el index 871af29acd4..f7d726d14ee 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el | |||
| @@ -1451,63 +1451,65 @@ Do not start with `~/' or `~user-name/'.") | |||
| 1451 | (defvar ediff-mode-map nil | 1451 | (defvar ediff-mode-map nil |
| 1452 | "Local keymap used in Ediff mode.") | 1452 | "Local keymap used in Ediff mode.") |
| 1453 | 1453 | ||
| 1454 | (if (and window-system ediff-want-default-menus (ediff-frame-has-menubar)) | 1454 | ;;; This is split in three parts to avoid |
| 1455 | (if (ediff-if-lucid) | 1455 | ;;; making a line in loaddefs.el that is too long for patch. |
| 1456 | (progn ;; Lucid menu bars | 1456 | ;;; Note that autoload.el currently looks for cookies |
| 1457 | (defvar ediff-menu | 1457 | ;;; only at top level in the file. |
| 1458 | '("" | ||
| 1459 | ["Between Files ..." ediff-files t] | ||
| 1460 | ["Between Buffers ..." ediff-buffers t] | ||
| 1461 | ["With a Revision via VC ..." vc-ediff t] | ||
| 1462 | ["With a Revision via RCS ..." rcs-ediff t])) | ||
| 1463 | (defvar epatch-menu | ||
| 1464 | '("" | ||
| 1465 | ["To a File ..." ediff-patch-file t] | ||
| 1466 | ["To a Buffer ..." ediff-patch-buffer t])) | ||
| 1467 | (add-menu '("File") "Find Differences" | ||
| 1468 | ediff-menu | ||
| 1469 | "Delete Screen") | ||
| 1470 | (add-menu '("File") "Apply Patch" | ||
| 1471 | epatch-menu | ||
| 1472 | "Delete Screen") | ||
| 1473 | ;; Displays as a solid horizontal line | ||
| 1474 | (add-menu-item '("File") "---" nil nil "Delete Screen") | ||
| 1475 | ) | ||
| 1476 | ;; FSF menu bars | ||
| 1477 | ;;;###autoload | 1458 | ;;;###autoload |
| 1459 | (if (not (ediff-if-lucid)) | ||
| 1460 | (progn | ||
| 1478 | (defvar menu-bar-epatch-menu (make-sparse-keymap "menu-bar-epatch-map")) | 1461 | (defvar menu-bar-epatch-menu (make-sparse-keymap "menu-bar-epatch-map")) |
| 1479 | ;;;###autoload | ||
| 1480 | (fset 'menu-bar-epatch-menu (symbol-value 'menu-bar-epatch-menu)) | 1462 | (fset 'menu-bar-epatch-menu (symbol-value 'menu-bar-epatch-menu)) |
| 1481 | ;;;###autoload | ||
| 1482 | (defvar menu-bar-ediff-menu (make-sparse-keymap "menu-bar-ediff-map")) | 1463 | (defvar menu-bar-ediff-menu (make-sparse-keymap "menu-bar-ediff-map")) |
| 1483 | ;;;###autoload | 1464 | (fset 'menu-bar-ediff-menu (symbol-value 'menu-bar-ediff-menu)))) |
| 1484 | (fset 'menu-bar-ediff-menu (symbol-value 'menu-bar-ediff-menu)) | ||
| 1485 | 1465 | ||
| 1486 | ;;;###autoload | 1466 | ;;;###autoload |
| 1467 | (if (not (ediff-if-lucid)) | ||
| 1468 | (progn | ||
| 1487 | (define-key menu-bar-ediff-menu [rcs-ediff] | 1469 | (define-key menu-bar-ediff-menu [rcs-ediff] |
| 1488 | '("With a Revision via RCS ..." . rcs-ediff)) | 1470 | '("With a Revision via RCS ..." . rcs-ediff)) |
| 1489 | ;;;###autoload | ||
| 1490 | (define-key menu-bar-ediff-menu [vc-ediff] | 1471 | (define-key menu-bar-ediff-menu [vc-ediff] |
| 1491 | '("With a Revision via VC ..." . vc-ediff)) | 1472 | '("With a Revision via VC ..." . vc-ediff)) |
| 1492 | ;;;###autoload | ||
| 1493 | (define-key menu-bar-ediff-menu [ediff-buffers] | 1473 | (define-key menu-bar-ediff-menu [ediff-buffers] |
| 1494 | '("Between Buffers ..." . ediff-buffers)) | 1474 | '("Between Buffers ..." . ediff-buffers)) |
| 1495 | ;;;###autoload | ||
| 1496 | (define-key menu-bar-ediff-menu [ediff-files] | 1475 | (define-key menu-bar-ediff-menu [ediff-files] |
| 1497 | '("Between Files ..." . ediff-files)) | 1476 | '("Between Files ..." . ediff-files)))) |
| 1498 | 1477 | ||
| 1499 | ;;;###autoload | 1478 | ;;;###autoload |
| 1479 | (if (not (ediff-if-lucid)) | ||
| 1480 | (progn | ||
| 1500 | (define-key menu-bar-epatch-menu [ediff-patch-buffer] | 1481 | (define-key menu-bar-epatch-menu [ediff-patch-buffer] |
| 1501 | '("To a Buffer ..." . ediff-patch-buffer)) | 1482 | '("To a Buffer ..." . ediff-patch-buffer)) |
| 1502 | ;;;###autoload | ||
| 1503 | (define-key menu-bar-epatch-menu [ediff-patch-file] | 1483 | (define-key menu-bar-epatch-menu [ediff-patch-file] |
| 1504 | '("To a File ..." . ediff-patch-file)) | 1484 | '("To a File ..." . ediff-patch-file)) |
| 1505 | 1485 | ||
| 1506 | (define-key menu-bar-file-menu [epatch] | 1486 | (define-key menu-bar-file-menu [epatch] |
| 1507 | '("Apply Patch" . menu-bar-epatch-menu)) | 1487 | '("Apply Patch" . menu-bar-epatch-menu)) |
| 1508 | (define-key menu-bar-file-menu [ediff] | 1488 | (define-key menu-bar-file-menu [ediff] |
| 1509 | '("Find Differences" . menu-bar-ediff-menu)) | 1489 | '("Find Differences" . menu-bar-ediff-menu)))) |
| 1510 | )) | 1490 | |
| 1491 | (if (and window-system ediff-want-default-menus (ediff-frame-has-menubar)) | ||
| 1492 | (if (ediff-if-lucid) | ||
| 1493 | (progn ;; Lucid menu bars | ||
| 1494 | (defvar ediff-menu | ||
| 1495 | '("" | ||
| 1496 | ["Between Files ..." ediff-files t] | ||
| 1497 | ["Between Buffers ..." ediff-buffers t] | ||
| 1498 | ["With a Revision via VC ..." vc-ediff t] | ||
| 1499 | ["With a Revision via RCS ..." rcs-ediff t])) | ||
| 1500 | (defvar epatch-menu | ||
| 1501 | '("" | ||
| 1502 | ["To a File ..." ediff-patch-file t] | ||
| 1503 | ["To a Buffer ..." ediff-patch-buffer t])) | ||
| 1504 | (add-menu '("File") "Find Differences" | ||
| 1505 | ediff-menu | ||
| 1506 | "Delete Screen") | ||
| 1507 | (add-menu '("File") "Apply Patch" | ||
| 1508 | epatch-menu | ||
| 1509 | "Delete Screen") | ||
| 1510 | ;; Displays as a solid horizontal line | ||
| 1511 | (add-menu-item '("File") "---" nil nil "Delete Screen") | ||
| 1512 | ))) | ||
| 1511 | 1513 | ||
| 1512 | 1514 | ||
| 1513 | (defun ediff-setup-keymap () | 1515 | (defun ediff-setup-keymap () |