XEmacs 21.4.2 "Developer-Friendly Unix APIs".
[chise/xemacs-chise.git.1] / lisp / menubar-items.el
index 54a82e8..499d150 100644 (file)
 
 ;;; Code:
 
-(defun menu-truncate-list (list n)
-  (if (<= (length list) n)
-      list
-    (butlast list (- (length list) n))))
+(defun Menubar-items-truncate-list (list n)
+  (mapcar #'(lambda (x)
+             (if (<= (length x) 50) x (concat "..." (substring x -50))))
+         (if (<= (length list) n)
+             list
+           (butlast list (- (length list) n)))))
 
 (defun submenu-generate-accelerator-spec (list &optional omit-chars-list)
   "Add auto-generated accelerator specifications to a submenu.
@@ -139,15 +141,18 @@ which will not be used as accelerators."
       ["Save %_As..." write-file]
       ["Save So%_me Buffers" save-some-buffers]
       "-----"
+      ,@(if (eq system-type 'windows-nt)
+         '(["Page Set%_up..." generic-page-setup]))
       ["%_Print" generic-print-buffer
        :active (or (valid-specifier-tag-p 'msprinter)
                   (and (not (eq system-type 'windows-nt))
-                       (fboundp 'lpr-buffer)))
+                       (fboundp 'lpr-region)))
        :suffix (if put-buffer-names-in-file-menu (concat (buffer-name) "...")
                 "...")]
-      ["Prett%_y-Print" ps-print-buffer-with-faces
-       :active (fboundp 'ps-print-buffer-with-faces)
-       :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
+      ,@(unless (eq system-type 'windows-nt)
+         '(["Prett%_y-Print" ps-print-buffer-with-faces
+            :active (fboundp 'ps-print-buffer-with-faces)
+            :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]))
       "-----"
       ["%_Revert Buffer" revert-buffer
        :active (or buffer-file-name revert-buffer-function)
@@ -432,7 +437,7 @@ which will not be used as accelerators."
                   (mapcar #'(lambda (string)
                               (vector string
                                       (list 'grep string)))
-                          (menu-truncate-list grep-history 10)))))
+                          (Menubar-items-truncate-list grep-history 10)))))
             (append menu '("---") items))))
        ["%_Grep..." grep :active (fboundp 'grep)]
        ["%_Kill Grep" kill-compilation
@@ -540,7 +545,7 @@ which will not be used as accelerators."
                   (mapcar #'(lambda (string)
                               (vector string
                                       (list 'compile string)))
-                          (menu-truncate-list compile-history 10)))))
+                          (Menubar-items-truncate-list compile-history 10)))))
             (append menu '("---") items))))
        ["%_Compile..." compile :active (fboundp 'compile)]
        ["%_Repeat Compilation" recompile :active (fboundp 'recompile)]
@@ -1423,7 +1428,7 @@ which will not be used as accelerators."
      ("%_Help"
       ["%_About XEmacs..." about-xemacs]
       "-----"
-      ["XEmacs %_News" view-emacs-news]
+      ["What's %_New in XEmacs" view-emacs-news]
       ["%_Obtaining XEmacs" describe-distribution]
       "-----"
       ("%_Info (Online Docs)"