Commit 1b085b7d authored by David Byers's avatar David Byers
Browse files

Attempt to clean up menus in W32

Detailed changes:
< 	(lyskom-define-menu-gnu): Same here.
---
> 	(lyskom-define-menu-gnu): Same here. In W32, encode the keyboard
> 	shortcut using latin-1. Hopefully that will get rid of the little
> 	boxes in the menus.
parent f52621b4
......@@ -3,7 +3,9 @@
* menus.el (lyskom-define-menu-xemacs): Try to use swedish
characters rather than brackets and braces for bindings that have
both.
(lyskom-define-menu-gnu): Same here.
(lyskom-define-menu-gnu): Same here. In W32, encode the keyboard
shortcut using latin-1. Hopefully that will get rid of the little
boxes in the menus.
* utilities.el (lyskom-traverse-keymap): New function.
......
......@@ -52,9 +52,31 @@
(lcs-message t "Checking customizeable variables")
(lcs-check-customize-variables)
(lcs-message t "Checking menus")
(lcs-check-menu-contents)
(or noninteractive
(display-buffer lcs-message-buffer)))
(defun lcs-check-menu-contents ()
"Check that all commands are in the LysKOM menus."
(let ((commands (lcs-extract-commands-from-menu-template lyskom-menu-template)))
))
(defun lcs-extract-commands-from-menu-template (template)
(let ((result nil) (el nil))
(while template
(setq el (car template) template (cdr template))
(cond ((eq (car el) 'menu)
(setq result
(nconc result
(lcs-extract-commands-from-menu-template
(cdr (cdr el))))))
((eq (car el) 'item)
(setq result (cons (car (cdr el)) result)))))))
(defun lcs-check-language-vars ()
"Check that all language-specific variables exist in all languages"
(mapcar (lambda (var)
......
......@@ -474,6 +474,8 @@
(car (cdr (assq symbol specials)))
" "))))
(if shortcut
(when (memq window-system '(win32 mswindows w32))
(setq shortcut (encode-coding-string shortcut 'iso-8859-1)))
(define-key map (vector symbol)
`(menu-item ,(lyskom-get-menu-string symbol) symbol
:keys ,shortcut))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment