emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102094: Move ns-win.el's rather wack


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102094: Move ns-win.el's rather wacky menu adjustments to menu-bar.el.
Date: Sun, 24 Oct 2010 17:48:26 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102094
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sun 2010-10-24 17:48:26 -0700
message:
  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.
modified:
  lib-src/ChangeLog
  lib-src/makefile.w32-in
  lisp/ChangeLog
  lisp/loadup.el
  lisp/menu-bar.el
  lisp/term/ns-win.el
  src/ChangeLog
  src/Makefile.in
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2010-10-23 02:46:06 +0000
+++ b/lib-src/ChangeLog 2010-10-25 00:48:26 +0000
@@ -1,3 +1,7 @@
+2010-10-25  Glenn Morris  <address@hidden>
+
+       * makefile.w32-in (OTHER_PLATFORM_SUPPORT): Remove easymenu.elc.
+
 2010-10-23  Glenn Morris  <address@hidden>
 
        * digest-doc.c, sorted-doc.c: Remove files.

=== modified file 'lib-src/makefile.w32-in'
--- a/lib-src/makefile.w32-in   2010-10-23 02:46:06 +0000
+++ b/lib-src/makefile.w32-in   2010-10-25 00:48:26 +0000
@@ -189,7 +189,6 @@
        $(lispsource)term/pc-win.elc \
        $(lispsource)x-dnd.elc \
        $(lispsource)term/x-win.elc \
-       $(lispsource)emacs-lisp/easymenu.elc \
        $(lispsource)term/ns-win.elc
 
 

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-10-24 23:40:55 +0000
+++ b/lisp/ChangeLog    2010-10-25 00:48:26 +0000
@@ -1,7 +1,16 @@
+2010-10-25  Glenn Morris  <address@hidden>
+
+       * 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.
+       * menu-bar.el (menu-bar-edit-menu) <copy, paste, paste-from-menu>:
+       <separator-undo, spell>: Move ns-win's adjustments here.
+       * loadup.el [ns]: Do not load easymenu.
+
 2010-10-24  Chong Yidong  <address@hidden>
 
        * image.el (image-checkbox-checked, image-checkbox-unchecked):
-       Deleted (Bug#7222).
+       Delete (Bug#7222).
 
        * startup.el (fancy-startup-tail): Instead of using inline images,
        refer to image files from etc/.

=== modified file 'lisp/loadup.el'
--- a/lisp/loadup.el    2010-10-22 04:03:55 +0000
+++ b/lisp/loadup.el    2010-10-25 00:48:26 +0000
@@ -233,9 +233,7 @@
       (load "ls-lisp")
       (load "disp-table"))) ; needed to setup ibm-pc char set, see internal.el
 (if (featurep 'ns)
-    (progn
-      (load "emacs-lisp/easymenu")  ;; for platform-related menu adjustments
-      (load "term/ns-win")))
+    (load "term/ns-win"))
 (if (fboundp 'x-create-frame)
     ;; Do it after loading term/foo-win.el since the value of the
     ;; mouse-wheel-*-event vars depends on those files being loaded or not.

=== modified file 'lisp/menu-bar.el'
--- a/lisp/menu-bar.el  2010-09-21 07:31:01 +0000
+++ b/lisp/menu-bar.el  2010-10-25 00:48:26 +0000
@@ -361,6 +361,11 @@
 (define-key menu-bar-edit-menu [props]
   `(menu-item ,(purecopy "Text Properties") facemenu-menu))
 
+;; ns-win.el said: Add spell for platorm consistency.
+(if (featurep 'ns)
+    (define-key menu-bar-edit-menu [spell]
+      `(menu-item ,(purecopy "Spell") ispell-menu-map)))
+
 (define-key menu-bar-edit-menu [fill]
   `(menu-item ,(purecopy "Fill") fill-region
              :enable (and mark-active (not buffer-read-only))
@@ -453,30 +458,46 @@
              ,(purecopy "Delete the text in region between mark and current 
position")))
 (defvar yank-menu (cons (purecopy "Select Yank") nil))
 (fset 'yank-menu (cons 'keymap yank-menu))
-(define-key menu-bar-edit-menu [paste-from-menu]
-  `(menu-item ,(purecopy "Paste from Kill Menu") yank-menu
+;; The ns differences here seem silly.
+(define-key menu-bar-edit-menu (if (featurep 'ns) [select-paste]
+                                 [paste-from-menu])
+  ;; ns-win.el said: Change text to be more consistent with
+  ;; surrounding menu items `paste', etc."
+  `(menu-item ,(purecopy (if (featurep 'ns) "Select and Paste"
+                           "Paste from Kill Menu")) yank-menu
              :enable (and (cdr yank-menu) (not buffer-read-only))
              :help ,(purecopy "Choose a string from the kill ring and paste 
it")))
 (define-key menu-bar-edit-menu [paste]
   `(menu-item ,(purecopy "Paste") yank
              :enable (and (or
-                           ;; Emacs compiled --without-x doesn't have
-                           ;; x-selection-exists-p.
+                           ;; Emacs compiled --without-x (or --with-ns)
+                           ;; doesn't have x-selection-exists-p.
                            (and (fboundp 'x-selection-exists-p)
                                 (x-selection-exists-p 'CLIPBOARD))
-                           kill-ring)
+                           (if (featurep 'ns) ; like paste-from-menu
+                               (cdr yank-menu)
+                             kill-ring))
                           (not buffer-read-only))
              :help ,(purecopy "Paste (yank) text most recently cut/copied")))
 (define-key menu-bar-edit-menu [copy]
-  `(menu-item ,(purecopy "Copy") menu-bar-kill-ring-save
-             :enable mark-active
-             :help ,(purecopy "Copy text in region between mark and current 
position")
-             :keys ,(purecopy "\\[kill-ring-save]")))
+  ;; ns-win.el said: Substitute a Copy function that works better
+  ;; under X (for GNUstep).
+  `(menu-item ,(purecopy "Copy") ,(if (featurep 'ns)
+                                      'ns-copy-including-secondary
+                                    'menu-bar-kill-ring-save)
+              :enable mark-active
+              :help ,(purecopy "Copy text in region between mark and current 
position")
+              :keys ,(purecopy (if (featurep 'ns)
+                                   "\\[ns-copy-including-secondary]"
+                                 "\\[kill-ring-save]"))))
 (define-key menu-bar-edit-menu [cut]
   `(menu-item ,(purecopy "Cut") kill-region
              :enable (and mark-active (not buffer-read-only))
              :help
              ,(purecopy "Cut (kill) text in region between mark and current 
position")))
+;; ns-win.el said: Separate undo from cut/paste section.
+(if (featurep 'ns)
+    (define-key menu-bar-edit-menu [separator-undo] `(,(purecopy "--"))))
 (define-key menu-bar-edit-menu [undo]
   `(menu-item ,(purecopy "Undo") undo
              :enable (and (not buffer-read-only)
@@ -486,7 +507,6 @@
                             (consp buffer-undo-list)))
              :help ,(purecopy "Undo last operation")))
 
-
 (defun menu-bar-kill-ring-save (beg end)
   (interactive "r")
   (if (mouse-region-match)
@@ -2082,5 +2102,4 @@
 
 (provide 'menu-bar)
 
-;; arch-tag: 6e6a3c22-4ec4-4d3d-8190-583f8ef94ced
 ;;; menu-bar.el ends here

=== modified file 'lisp/term/ns-win.el'
--- a/lisp/term/ns-win.el       2010-10-24 22:04:45 +0000
+++ b/lisp/term/ns-win.el       2010-10-25 00:48:26 +0000
@@ -52,13 +52,9 @@
 (require 'frame)
 (require 'mouse)
 (require 'faces)
-(require 'easymenu)
 (require 'menu-bar)
 (require 'fontset)
 
-;; Not needed?
-;;(require 'ispell)
-
 (defgroup ns nil
   "GNUstep/Mac OS X specific features."
   :group 'environment)
@@ -441,38 +437,6 @@
     (define-key menu-bar-help-menu [info-panel]
       '("About Emacs..." . ns-do-emacs-info-panel)))
 
-;;;; Edit menu: Modify slightly
-
-;; Substitute a Copy function that works better under X (for GNUstep).
-(easy-menu-remove-item global-map '("menu-bar" "edit") 'copy)
-(define-key-after menu-bar-edit-menu [copy]
-  '(menu-item "Copy" ns-copy-including-secondary
-    :enable mark-active
-    :help "Copy text in region between mark and current position")
-  'cut)
-
-;; Change to same precondition as select-and-paste, as we don't have
-;; `x-selection-exists-p'.
-(easy-menu-remove-item global-map '("menu-bar" "edit") 'paste)
-(define-key-after menu-bar-edit-menu [paste]
-  '(menu-item "Paste" yank
-    :enable (and (cdr yank-menu) (not buffer-read-only))
-    :help "Paste (yank) text most recently cut/copied")
-  'copy)
-
-;; Change text to be more consistent with surrounding menu items `paste', etc.
-(easy-menu-remove-item global-map '("menu-bar" "edit") 'paste-from-menu)
-(define-key-after menu-bar-edit-menu [select-paste]
-  '(menu-item "Select and Paste" yank-menu
-    :enable (and (cdr yank-menu) (not buffer-read-only))
-    :help "Choose a string from the kill ring and paste it")
-  'paste)
-
-;; Separate undo from cut/paste section, add spell for platform consistency.
-(define-key-after menu-bar-edit-menu [separator-undo] '("--") 'undo)
-(define-key-after menu-bar-edit-menu [spell] '("Spell" . ispell-menu-map) 
'fill)
-
-
 ;;;; Services
 (declare-function ns-perform-service "nsfns.m" (service send))
 

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-10-24 22:45:10 +0000
+++ b/src/ChangeLog     2010-10-25 00:48:26 +0000
@@ -1,3 +1,7 @@
+2010-10-25  Glenn Morris  <address@hidden>
+
+       * Makefile.in (SOME_MACHINE_LISP): Remove easymenu.elc.
+
 2010-10-24  Glenn Morris  <address@hidden>
 
        * w32fns.c (Fx_synchronize, Fx_change_window_property)

=== modified file 'src/Makefile.in'
--- a/src/Makefile.in   2010-10-22 03:37:20 +0000
+++ b/src/Makefile.in   2010-10-25 00:48:26 +0000
@@ -590,8 +590,7 @@
   ../lisp/term/common-win.elc \
   ../lisp/term/x-win.elc \
   ../lisp/term/pc-win.elc ../lisp/term/internal.elc \
-  ../lisp/term/ns-win.elc ../lisp/term/w32-win.elc \
-  ../lisp/emacs-lisp/easymenu.elc
+  ../lisp/term/ns-win.elc ../lisp/term/w32-win.elc
 
 ## Construct full set of libraries to be linked.
 ## Note that SunOS needs -lm to come before -lc; otherwise, you get


reply via email to

[Prev in Thread] Current Thread [Next in Thread]