diff options
| author | Glenn Morris | 2010-10-24 17:48:26 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-10-24 17:48:26 -0700 |
| commit | 6a5c21753e3918152ca4abc50291d6e628e89f6c (patch) | |
| tree | e334dec719c1dd3781835302e9aae2e5f728dc3e | |
| parent | 5793a7bc13ed1d92dd70f48d952ca651c48a0fd3 (diff) | |
| download | emacs-6a5c21753e3918152ca4abc50291d6e628e89f6c.tar.gz emacs-6a5c21753e3918152ca4abc50291d6e628e89f6c.zip | |
Move ns-win.el's rather wacky menu adjustments to menu-bar.el.
* lisp/term/ns-win.el: Do not require easymenu.
(menu-bar-edit-menu) <copy, paste, paste-from-menu, separator-undo>:
<spell>: Move adjustments to menu-bar.el.
* lisp/menu-bar.el (menu-bar-edit-menu) <copy, paste, paste-from-menu>:
<separator-undo, spell>: Move ns-win's adjustments here.
* lisp/loadup.el [ns]: Do not load easymenu.
* src/Makefile.in (SOME_MACHINE_LISP): Remove easymenu.elc.
* lib-src/makefile.w32-in (OTHER_PLATFORM_SUPPORT): Remove easymenu.elc.
| -rw-r--r-- | lib-src/ChangeLog | 4 | ||||
| -rw-r--r-- | lib-src/makefile.w32-in | 1 | ||||
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/loadup.el | 4 | ||||
| -rw-r--r-- | lisp/menu-bar.el | 41 | ||||
| -rw-r--r-- | lisp/term/ns-win.el | 36 | ||||
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/Makefile.in | 3 |
8 files changed, 50 insertions, 54 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 9e43da96c5c..a4b0ff37d07 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-10-25 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * makefile.w32-in (OTHER_PLATFORM_SUPPORT): Remove easymenu.elc. | ||
| 4 | |||
| 1 | 2010-10-23 Glenn Morris <rgm@gnu.org> | 5 | 2010-10-23 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * digest-doc.c, sorted-doc.c: Remove files. | 7 | * digest-doc.c, sorted-doc.c: Remove files. |
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index dc6406d7025..5591f0edbed 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in | |||
| @@ -189,7 +189,6 @@ OTHER_PLATFORM_SUPPORT = \ | |||
| 189 | $(lispsource)term/pc-win.elc \ | 189 | $(lispsource)term/pc-win.elc \ |
| 190 | $(lispsource)x-dnd.elc \ | 190 | $(lispsource)x-dnd.elc \ |
| 191 | $(lispsource)term/x-win.elc \ | 191 | $(lispsource)term/x-win.elc \ |
| 192 | $(lispsource)emacs-lisp/easymenu.elc \ | ||
| 193 | $(lispsource)term/ns-win.elc | 192 | $(lispsource)term/ns-win.elc |
| 194 | 193 | ||
| 195 | 194 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9fd13d49ca4..96c8df73ee7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,16 @@ | |||
| 1 | 2010-10-25 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * term/ns-win.el: Do not require easymenu. | ||
| 4 | (menu-bar-edit-menu) <copy, paste, paste-from-menu, separator-undo>: | ||
| 5 | <spell>: Move adjustments to menu-bar.el. | ||
| 6 | * menu-bar.el (menu-bar-edit-menu) <copy, paste, paste-from-menu>: | ||
| 7 | <separator-undo, spell>: Move ns-win's adjustments here. | ||
| 8 | * loadup.el [ns]: Do not load easymenu. | ||
| 9 | |||
| 1 | 2010-10-24 Chong Yidong <cyd@stupidchicken.com> | 10 | 2010-10-24 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 11 | ||
| 3 | * image.el (image-checkbox-checked, image-checkbox-unchecked): | 12 | * image.el (image-checkbox-checked, image-checkbox-unchecked): |
| 4 | Deleted (Bug#7222). | 13 | Delete (Bug#7222). |
| 5 | 14 | ||
| 6 | * startup.el (fancy-startup-tail): Instead of using inline images, | 15 | * startup.el (fancy-startup-tail): Instead of using inline images, |
| 7 | refer to image files from etc/. | 16 | refer to image files from etc/. |
diff --git a/lisp/loadup.el b/lisp/loadup.el index 719f8be9c99..775b6ee4aea 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el | |||
| @@ -233,9 +233,7 @@ | |||
| 233 | (load "ls-lisp") | 233 | (load "ls-lisp") |
| 234 | (load "disp-table"))) ; needed to setup ibm-pc char set, see internal.el | 234 | (load "disp-table"))) ; needed to setup ibm-pc char set, see internal.el |
| 235 | (if (featurep 'ns) | 235 | (if (featurep 'ns) |
| 236 | (progn | 236 | (load "term/ns-win")) |
| 237 | (load "emacs-lisp/easymenu") ;; for platform-related menu adjustments | ||
| 238 | (load "term/ns-win"))) | ||
| 239 | (if (fboundp 'x-create-frame) | 237 | (if (fboundp 'x-create-frame) |
| 240 | ;; Do it after loading term/foo-win.el since the value of the | 238 | ;; Do it after loading term/foo-win.el since the value of the |
| 241 | ;; mouse-wheel-*-event vars depends on those files being loaded or not. | 239 | ;; mouse-wheel-*-event vars depends on those files being loaded or not. |
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 0659ae98717..9d8e4749087 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -361,6 +361,11 @@ | |||
| 361 | (define-key menu-bar-edit-menu [props] | 361 | (define-key menu-bar-edit-menu [props] |
| 362 | `(menu-item ,(purecopy "Text Properties") facemenu-menu)) | 362 | `(menu-item ,(purecopy "Text Properties") facemenu-menu)) |
| 363 | 363 | ||
| 364 | ;; ns-win.el said: Add spell for platorm consistency. | ||
| 365 | (if (featurep 'ns) | ||
| 366 | (define-key menu-bar-edit-menu [spell] | ||
| 367 | `(menu-item ,(purecopy "Spell") ispell-menu-map))) | ||
| 368 | |||
| 364 | (define-key menu-bar-edit-menu [fill] | 369 | (define-key menu-bar-edit-menu [fill] |
| 365 | `(menu-item ,(purecopy "Fill") fill-region | 370 | `(menu-item ,(purecopy "Fill") fill-region |
| 366 | :enable (and mark-active (not buffer-read-only)) | 371 | :enable (and mark-active (not buffer-read-only)) |
| @@ -453,30 +458,46 @@ | |||
| 453 | ,(purecopy "Delete the text in region between mark and current position"))) | 458 | ,(purecopy "Delete the text in region between mark and current position"))) |
| 454 | (defvar yank-menu (cons (purecopy "Select Yank") nil)) | 459 | (defvar yank-menu (cons (purecopy "Select Yank") nil)) |
| 455 | (fset 'yank-menu (cons 'keymap yank-menu)) | 460 | (fset 'yank-menu (cons 'keymap yank-menu)) |
| 456 | (define-key menu-bar-edit-menu [paste-from-menu] | 461 | ;; The ns differences here seem silly. |
| 457 | `(menu-item ,(purecopy "Paste from Kill Menu") yank-menu | 462 | (define-key menu-bar-edit-menu (if (featurep 'ns) [select-paste] |
| 463 | [paste-from-menu]) | ||
| 464 | ;; ns-win.el said: Change text to be more consistent with | ||
| 465 | ;; surrounding menu items `paste', etc." | ||
| 466 | `(menu-item ,(purecopy (if (featurep 'ns) "Select and Paste" | ||
| 467 | "Paste from Kill Menu")) yank-menu | ||
| 458 | :enable (and (cdr yank-menu) (not buffer-read-only)) | 468 | :enable (and (cdr yank-menu) (not buffer-read-only)) |
| 459 | :help ,(purecopy "Choose a string from the kill ring and paste it"))) | 469 | :help ,(purecopy "Choose a string from the kill ring and paste it"))) |
| 460 | (define-key menu-bar-edit-menu [paste] | 470 | (define-key menu-bar-edit-menu [paste] |
| 461 | `(menu-item ,(purecopy "Paste") yank | 471 | `(menu-item ,(purecopy "Paste") yank |
| 462 | :enable (and (or | 472 | :enable (and (or |
| 463 | ;; Emacs compiled --without-x doesn't have | 473 | ;; Emacs compiled --without-x (or --with-ns) |
| 464 | ;; x-selection-exists-p. | 474 | ;; doesn't have x-selection-exists-p. |
| 465 | (and (fboundp 'x-selection-exists-p) | 475 | (and (fboundp 'x-selection-exists-p) |
| 466 | (x-selection-exists-p 'CLIPBOARD)) | 476 | (x-selection-exists-p 'CLIPBOARD)) |
| 467 | kill-ring) | 477 | (if (featurep 'ns) ; like paste-from-menu |
| 478 | (cdr yank-menu) | ||
| 479 | kill-ring)) | ||
| 468 | (not buffer-read-only)) | 480 | (not buffer-read-only)) |
| 469 | :help ,(purecopy "Paste (yank) text most recently cut/copied"))) | 481 | :help ,(purecopy "Paste (yank) text most recently cut/copied"))) |
| 470 | (define-key menu-bar-edit-menu [copy] | 482 | (define-key menu-bar-edit-menu [copy] |
| 471 | `(menu-item ,(purecopy "Copy") menu-bar-kill-ring-save | 483 | ;; ns-win.el said: Substitute a Copy function that works better |
| 472 | :enable mark-active | 484 | ;; under X (for GNUstep). |
| 473 | :help ,(purecopy "Copy text in region between mark and current position") | 485 | `(menu-item ,(purecopy "Copy") ,(if (featurep 'ns) |
| 474 | :keys ,(purecopy "\\[kill-ring-save]"))) | 486 | 'ns-copy-including-secondary |
| 487 | 'menu-bar-kill-ring-save) | ||
| 488 | :enable mark-active | ||
| 489 | :help ,(purecopy "Copy text in region between mark and current position") | ||
| 490 | :keys ,(purecopy (if (featurep 'ns) | ||
| 491 | "\\[ns-copy-including-secondary]" | ||
| 492 | "\\[kill-ring-save]")))) | ||
| 475 | (define-key menu-bar-edit-menu [cut] | 493 | (define-key menu-bar-edit-menu [cut] |
| 476 | `(menu-item ,(purecopy "Cut") kill-region | 494 | `(menu-item ,(purecopy "Cut") kill-region |
| 477 | :enable (and mark-active (not buffer-read-only)) | 495 | :enable (and mark-active (not buffer-read-only)) |
| 478 | :help | 496 | :help |
| 479 | ,(purecopy "Cut (kill) text in region between mark and current position"))) | 497 | ,(purecopy "Cut (kill) text in region between mark and current position"))) |
| 498 | ;; ns-win.el said: Separate undo from cut/paste section. | ||
| 499 | (if (featurep 'ns) | ||
| 500 | (define-key menu-bar-edit-menu [separator-undo] `(,(purecopy "--")))) | ||
| 480 | (define-key menu-bar-edit-menu [undo] | 501 | (define-key menu-bar-edit-menu [undo] |
| 481 | `(menu-item ,(purecopy "Undo") undo | 502 | `(menu-item ,(purecopy "Undo") undo |
| 482 | :enable (and (not buffer-read-only) | 503 | :enable (and (not buffer-read-only) |
| @@ -486,7 +507,6 @@ | |||
| 486 | (consp buffer-undo-list))) | 507 | (consp buffer-undo-list))) |
| 487 | :help ,(purecopy "Undo last operation"))) | 508 | :help ,(purecopy "Undo last operation"))) |
| 488 | 509 | ||
| 489 | |||
| 490 | (defun menu-bar-kill-ring-save (beg end) | 510 | (defun menu-bar-kill-ring-save (beg end) |
| 491 | (interactive "r") | 511 | (interactive "r") |
| 492 | (if (mouse-region-match) | 512 | (if (mouse-region-match) |
| @@ -2082,5 +2102,4 @@ If FRAME is nil or not given, use the selected frame." | |||
| 2082 | 2102 | ||
| 2083 | (provide 'menu-bar) | 2103 | (provide 'menu-bar) |
| 2084 | 2104 | ||
| 2085 | ;; arch-tag: 6e6a3c22-4ec4-4d3d-8190-583f8ef94ced | ||
| 2086 | ;;; menu-bar.el ends here | 2105 | ;;; menu-bar.el ends here |
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index acd6bda60f0..ccbe9be7f9d 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el | |||
| @@ -52,13 +52,9 @@ | |||
| 52 | (require 'frame) | 52 | (require 'frame) |
| 53 | (require 'mouse) | 53 | (require 'mouse) |
| 54 | (require 'faces) | 54 | (require 'faces) |
| 55 | (require 'easymenu) | ||
| 56 | (require 'menu-bar) | 55 | (require 'menu-bar) |
| 57 | (require 'fontset) | 56 | (require 'fontset) |
| 58 | 57 | ||
| 59 | ;; Not needed? | ||
| 60 | ;;(require 'ispell) | ||
| 61 | |||
| 62 | (defgroup ns nil | 58 | (defgroup ns nil |
| 63 | "GNUstep/Mac OS X specific features." | 59 | "GNUstep/Mac OS X specific features." |
| 64 | :group 'environment) | 60 | :group 'environment) |
| @@ -441,38 +437,6 @@ The properties returned may include `top', `left', `height', and `width'." | |||
| 441 | (define-key menu-bar-help-menu [info-panel] | 437 | (define-key menu-bar-help-menu [info-panel] |
| 442 | '("About Emacs..." . ns-do-emacs-info-panel))) | 438 | '("About Emacs..." . ns-do-emacs-info-panel))) |
| 443 | 439 | ||
| 444 | ;;;; Edit menu: Modify slightly | ||
| 445 | |||
| 446 | ;; Substitute a Copy function that works better under X (for GNUstep). | ||
| 447 | (easy-menu-remove-item global-map '("menu-bar" "edit") 'copy) | ||
| 448 | (define-key-after menu-bar-edit-menu [copy] | ||
| 449 | '(menu-item "Copy" ns-copy-including-secondary | ||
| 450 | :enable mark-active | ||
| 451 | :help "Copy text in region between mark and current position") | ||
| 452 | 'cut) | ||
| 453 | |||
| 454 | ;; Change to same precondition as select-and-paste, as we don't have | ||
| 455 | ;; `x-selection-exists-p'. | ||
| 456 | (easy-menu-remove-item global-map '("menu-bar" "edit") 'paste) | ||
| 457 | (define-key-after menu-bar-edit-menu [paste] | ||
| 458 | '(menu-item "Paste" yank | ||
| 459 | :enable (and (cdr yank-menu) (not buffer-read-only)) | ||
| 460 | :help "Paste (yank) text most recently cut/copied") | ||
| 461 | 'copy) | ||
| 462 | |||
| 463 | ;; Change text to be more consistent with surrounding menu items `paste', etc. | ||
| 464 | (easy-menu-remove-item global-map '("menu-bar" "edit") 'paste-from-menu) | ||
| 465 | (define-key-after menu-bar-edit-menu [select-paste] | ||
| 466 | '(menu-item "Select and Paste" yank-menu | ||
| 467 | :enable (and (cdr yank-menu) (not buffer-read-only)) | ||
| 468 | :help "Choose a string from the kill ring and paste it") | ||
| 469 | 'paste) | ||
| 470 | |||
| 471 | ;; Separate undo from cut/paste section, add spell for platform consistency. | ||
| 472 | (define-key-after menu-bar-edit-menu [separator-undo] '("--") 'undo) | ||
| 473 | (define-key-after menu-bar-edit-menu [spell] '("Spell" . ispell-menu-map) 'fill) | ||
| 474 | |||
| 475 | |||
| 476 | ;;;; Services | 440 | ;;;; Services |
| 477 | (declare-function ns-perform-service "nsfns.m" (service send)) | 441 | (declare-function ns-perform-service "nsfns.m" (service send)) |
| 478 | 442 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index a0aa4a21ff1..529677cb5f4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-10-25 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (SOME_MACHINE_LISP): Remove easymenu.elc. | ||
| 4 | |||
| 1 | 2010-10-24 Glenn Morris <rgm@gnu.org> | 5 | 2010-10-24 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * w32fns.c (Fx_synchronize, Fx_change_window_property) | 7 | * w32fns.c (Fx_synchronize, Fx_change_window_property) |
diff --git a/src/Makefile.in b/src/Makefile.in index 87abc9ea734..4d45248b396 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -590,8 +590,7 @@ SOME_MACHINE_LISP = ../lisp/mouse.elc \ | |||
| 590 | ../lisp/term/common-win.elc \ | 590 | ../lisp/term/common-win.elc \ |
| 591 | ../lisp/term/x-win.elc \ | 591 | ../lisp/term/x-win.elc \ |
| 592 | ../lisp/term/pc-win.elc ../lisp/term/internal.elc \ | 592 | ../lisp/term/pc-win.elc ../lisp/term/internal.elc \ |
| 593 | ../lisp/term/ns-win.elc ../lisp/term/w32-win.elc \ | 593 | ../lisp/term/ns-win.elc ../lisp/term/w32-win.elc |
| 594 | ../lisp/emacs-lisp/easymenu.elc | ||
| 595 | 594 | ||
| 596 | ## Construct full set of libraries to be linked. | 595 | ## Construct full set of libraries to be linked. |
| 597 | ## Note that SunOS needs -lm to come before -lc; otherwise, you get | 596 | ## Note that SunOS needs -lm to come before -lc; otherwise, you get |