Commit e4da1c6e authored by David Byers's avatar David Byers
Browse files

Bug fix for last checkin.

Detailed changes:
parent 1b085b7d
......@@ -52,17 +52,26 @@
(lcs-message t "Checking customizeable variables")
(lcs-check-customize-variables)
(lcs-message t "Checking menus")
(lcs-check-menu-contents)
(lcs-message t "Checking menu template: lyskom-menu-template")
(lcs-check-menu-template lyskom-menu-template)
(or noninteractive
(display-buffer lcs-message-buffer)))
(defun lcs-check-menu-contents ()
(defun lcs-check-menu-template (template)
"Check that all commands are in the LysKOM menus."
(let ((commands (lcs-extract-commands-from-menu-template lyskom-menu-template)))
))
(let ((commands (lcs-extract-commands-from-menu-template template))
(required lyskom-commands)
(missing nil))
(while required
(unless (or (memq (car required) lyskom-commands-not-in-menu)
(memq (car required) commands))
(setq missing (cons (car required) missing)))
(setq required (cdr required)))
(while missing
(lcs-message t "(lyskom-menu-template) Missing command: %s" (car missing))
(setq missing (cdr missing)))))
(defun lcs-extract-commands-from-menu-template (template)
(let ((result nil) (el nil))
......@@ -72,10 +81,11 @@
(setq result
(nconc result
(lcs-extract-commands-from-menu-template
(cdr (cdr el))))))
(car (cdr (cdr el)))))))
((eq (car el) 'item)
(setq result (cons (car (cdr el)) result)))))))
(setq result (cons (car (cdr el)) result)))))
result))
(defun lcs-check-language-vars ()
"Check that all language-specific variables exist in all languages"
......
......@@ -474,11 +474,11 @@
(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))
(progn (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)))
(define-key map (vector symbol)
(cons (lyskom-get-menu-string symbol) symbol)))))
(t (error "Menu description invalid in lyskom-define-menu")))))))
......
......@@ -3129,6 +3129,28 @@ Users are encouraged to use their best sense of humor."
server)
(defconst lyskom-commands-not-in-menu
'(
kom-unread-previous-commented-text
kom-create-aux-item
kom-become-nonanonymous
kom-become-anonymous
kom-send-alarm
kom-get-abuse
kom-get-appreciation
kom-list-clients
kom-view-previous-commented-text
kom-membership
kom-delete-text
kom-quick-mode
kom-slow-mode
kom-busy-wait
kom-comment-previous
kom-private-answer-previous
kom-change-language
)
"Commands that are not supposed to appear in menus.")
(defconst lyskom-commands
'(
kom-help
......
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