Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lyskom-elisp-client
lyskom-elisp-client
Commits
51062535
Commit
51062535
authored
May 27, 2002
by
David Byers
Browse files
Added checking of help sections to make check
parent
97a94586
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/ChangeLog
View file @
51062535
2002-05-27 David Byers <david.byers@swipnet.se>
* check-strings.el: Added checking of matching sections for all
languages in new help.
* help.en: New file.
* vars.el.in: Removed lyskom-help-categories.
...
...
src/Makefile
View file @
51062535
...
...
@@ -185,7 +185,7 @@ fast: $(HEADER-ELC) $(LANGUAGE-ELC) $(SOURCES-ELC)
check
:
$(TARGET-EL)
$
(
EMACS-BATCH
)
-l
lpath.el
-l
$<
-l
check-strings.el
\
$
(
EMACS-BATCH
)
-l
lpath.el
-l
help-compile.el
-l
$<
-l
check-strings.el
\
-f
lyskom-check-strings
TAGS
:
$(HEADER) $(LANGUAGE-EL) $(SOURCES)
...
...
src/check-strings.el
View file @
51062535
...
...
@@ -15,7 +15,6 @@
(
require
'lyskom
)
(
defvar
lcs-dont-check-ending-categories
'
(
lyskom-command
)
"String categories where ending mismatches are OK."
)
...
...
@@ -35,6 +34,8 @@
(
or
noninteractive
(
lcs-setup-message-buffer
))
(
lcs-message
t
"Checking help"
)
(
lcs-check-help
)
(
lcs-message
t
"Checking face schemes"
)
(
lcs-check-face-schemes
)
...
...
@@ -52,9 +53,6 @@
(
lcs-message
t
"Checking customizeable variables"
)
(
lcs-check-customize-variables
)
; (lcs-message t "Checking help strings")
; (lcs-check-help-strings)
(
or
noninteractive
(
display-buffer
lcs-message-buffer
)))
...
...
@@ -104,6 +102,30 @@
(
lcs-message
nil
"(%s) Unknown command in lyskom-commands"
el
))
tmp
)))
(
defun
lcs-check-help
()
"Check the help files"
(
let*
((
help
(
mapcar
(
lambda
(
x
)
(
cons
(
car
x
)
(
mapcar
'car
(
eval
(
cdr
x
)))))
(
get
'lyskom-help-data
'lyskom-language-var
)))
(
all-sections
nil
))
(
mapc
(
lambda
(
x
)
(
mapc
(
lambda
(
section
)
(
push
section
all-sections
))
(
cdr
x
)))
help
)
(
while
help
(
let
((
sections
all-sections
))
(
while
sections
(
unless
(
memq
(
car
sections
)
(
cdr
(
car
help
)))
(
lcs-message
nil
"(%s) Missing help section (%s)"
(
car
sections
)
(
car
(
car
help
))))
(
setq
sections
(
cdr
sections
)))
(
setq
help
(
cdr
help
))))))
(
defun
lcs-check-category
(
category
)
"Check the strings in CATEGORY."
(
unless
(
eq
category
'lyskom-help-strings
)
...
...
@@ -311,62 +333,6 @@ Check that all server-stored variables are customizeable."
'lyskom-custom-variables
var
))
cust-vars-in-buffer
)))
(
defun
lcs-check-help-strings
()
"Check help strings"
(
lcs-check-category
'lyskom-help-strings
)
(
let
((
commands
(
mapcar
'car
(
lcs-all-category-string
'lyskom-command
)))
(
help-strings
(
mapcar
'car
(
lcs-all-category-string
'lyskom-help-strings
)))
(
help-symbols
nil
)
(
tmp
(
apply
'append
(
mapcar
'cdr
lyskom-help-categories
))))
;; Extract information from the help categories into a plist
;; where keys are item types and values are list of symbols
;; that appear in the items.
(
while
tmp
(
setq
help-symbols
(
plist-put
help-symbols
(
elt
(
car
tmp
)
0
)
(
cons
(
elt
(
car
tmp
)
1
)
(
plist-get
help-symbols
(
elt
(
car
tmp
)
0
)))))
(
setq
tmp
(
cdr
tmp
)))
;; Ensure that all commands are listed in the help strings variable
(
lcs-check-help-strings-2
"command"
commands
)
(
lcs-check-help-strings-2
"help category"
(
mapcar
'car
lyskom-help-categories
))
;; Ensure that all commands are in some command category
(
setq
tmp
commands
)
(
while
tmp
(
unless
(
memq
(
car
tmp
)
(
plist-get
help-symbols
'command
))
(
lcs-message
nil
"(%s:%s) Command not categorized."
'lyskom-help-categories
(
car
tmp
)))
(
setq
tmp
(
cdr
tmp
)))
;; Ensure that all referenced categories exist
(
setq
tmp
(
plist-get
help-symbols
'category
))
(
while
tmp
(
unless
(
assq
(
car
tmp
)
lyskom-help-categories
)
(
lcs-message
nil
"(%s:%s) Reference to help missing category."
'lyskom-help-categories
(
car
tmp
)))
(
setq
tmp
(
cdr
tmp
)))
))
(
defun
lcs-check-help-strings-2
(
wot
syms
)
(
while
syms
(
unless
(
memq
(
car
syms
)
help-strings
)
(
lcs-message
nil
"(%s:%s) Help string missing for %s."
'lyskom-help-strings
(
car
syms
)
wot
))
(
setq
syms
(
cdr
syms
))))
(
defun
lcs-setup-message-buffer
()
"Inititalize the message buffer for string checking."
(
save-excursion
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment