;;; 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.
["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)
(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
(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)]
("%_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)"