Commit 341dd64c authored by David Byers's avatar David Byers
Browse files

Fixed bug 575.

Fixed bug introduced in previous checkin
parent cc6e0d29
2002-06-13 David Byers <>
Hopefully did the right thing to Debian packages wrt bug 575:
* debian/rules: Removed references to help-compile.el and the help
files since they are now included in lyskom.el.
* debian/emacsen-common-install: Same here.
Fix bug 575:
* help-sv.xml, help-en.xml: Renamed to swedish-help.xml and
english-help.xml to facilitate language selection when building
* Makefile: Removed help-compile.el from all old targets.
(EXTRA-SRCVERBATIM): Removed help files and help-compile.el since
they are now included in lyskom.el.
* lyskom-rest.el (lyskom-format-aux-help): Moved parens so that
error handing for %d is correct again.
2002-06-12 Ulrik Haugen <>
* Makefile (EXTRA-SRCVERBATIM): name the help files by their
......@@ -5,6 +25,16 @@
2002-06-12 David Byers <>
Fix bug 575:
* Makefile (%-hep.el): New target to convert help XML files to
elisp files.
* help-compile.el (lyskom-help-parse-buffer): New function
extracted from lyskom-help-parse-help-file.
(lyskom-help-parse-help-file): Use it.
(lyskom-help-compile-to-el): New function to compile a help XML to
an elisp file. This is required to fix build issues.
Fix bug 573:
* lyskom-rest.el: (lyskom-format-aux-help): Support formatting
floating-point numbers since that's what we'll get when the ints
......@@ -65,7 +65,7 @@ HEADER = header.el \
# Next come the language definitions.
LANGUAGE-EL := $(LANGUAGES:=-strings.el)
LANGUAGE-EL := $(LANGUAGES:=-strings.el) $(LANGUAGES:=-help.el)
# Finally, other source files.
SOURCES = komtypes.el \
......@@ -115,7 +115,6 @@ EXTRA-SRCDIST = \
envcheck.el lpath.el autoconf.el \
help-compile.el help-en.xml help-sv.xml \
# Included in the non-source distribution archives.
......@@ -155,6 +154,9 @@ $(TARGET-EL) lyskom-all-$(CLIENTVERSION).el: \
cat $^ >$@
%-help.el: help-%.xml
emacs -batch -l help-compile.el $^ -f lyskom-help-compile-to-el
lyskom-%-$(CLIENTVERSION).el: $(HEADER) %-strings.el $(SOURCES)
cat $^ >$@
......@@ -172,7 +174,7 @@ verbose-el: $(HEADER) $(LANGUAGE-EL) $(SOURCES)
$(EMACS-BATCH) -l lpath.el -l _header.el -f batch-byte-compile $<
$(EMACS-BATCH) -l lpath.el -l help-compile.el -f batch-byte-compile $<
$(EMACS-BATCH) -l lpath.el -f batch-byte-compile $<
HEADER-ELC = $(HEADER:%.el=%.elc)
......@@ -186,7 +188,7 @@ fast: $(HEADER-ELC) $(LANGUAGE-ELC) $(SOURCES-ELC)
check: $(TARGET-EL)
$(EMACS-BATCH) -l lpath.el -l help-compile.el -l $< -l check-strings.el \
$(EMACS-BATCH) -l lpath.el -l $< -l check-strings.el \
-f lyskom-check-strings
......@@ -7,7 +7,7 @@ echo install/lyskom-elisp-client: Handling install of emacsen flavor ${FLAVOR}
byte_compile_options="-batch -q -no-site-file -l $el_dir/lpath.el -l $el_dir/help-compile.el -f batch-byte-compile"
byte_compile_options="-batch -q -no-site-file -l $el_dir/lpath.el -f batch-byte-compile"
if [ ${FLAVOR} != emacs ]; then
echo install/lyskom-elisp-client: byte-compiling for ${FLAVOR}
......@@ -34,8 +34,7 @@ EOF
cd ${elc_dir}
gunzip -c ${el_dir}/lyskom.el.gz > ${elc_dir}/lyskom-elisp-client.el
cp ${el_dir}/help-*.xml ${elc_dir}
${FLAVOR} ${byte_compile_options} lyskom-elisp-client.el
rm -f ${elc_dir}/*.el ${elc_dir}/help-*.xml
rm -f ${elc_dir}/*.el
exit 0
......@@ -27,7 +27,7 @@ binary-indep: build
$(MAKE) lyskom-@@CLIENTVERSION@@.el
cp lpath.el help-compile.el help-en.xml help-sv.xml debian/tmp/usr/share/emacs/site-lisp/lyskom-elisp-client/
cp lpath.el debian/tmp/usr/share/emacs/site-lisp/lyskom-elisp-client/
gzip -c lyskom-@@CLIENTVERSION@@.el > debian/tmp/usr/share/emacs/site-lisp/lyskom-elisp-client/lyskom.el.gz
install -m 644 debian/50lyskom-elisp-client.el debian/tmp/etc/emacs/site-start.d
......@@ -3899,7 +3899,6 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(lyskom-language-var global lyskom-unread-title-format en
(defvar lyskom-en-help-data (lyskom-help-compile en))
(lyskom-language-var local lyskom-help-data en lyskom-en-help-data)
......@@ -287,12 +287,15 @@ CONTAINING-SYNTAX is the syntax specification for the containing tag."
(set-buffer buffer)
(insert-file-contents filename)
(lyskom-help-replace-regexp "[\r\n]" "")
(lyskom-help-replace-regexp "<!--[^>]*-->" "")
(lyskom-help-replace-regexp "\\s-+" " ")
(let ((parse (lyskom-help-parse-string (buffer-string)
'(toplevel nil nil (help)))))
(defun lyskom-help-parse-buffer ()
(lyskom-help-replace-regexp "[\r\n]" "")
(lyskom-help-replace-regexp "<!--[^>]*-->" "")
(lyskom-help-replace-regexp "\\s-+" " ")
(let ((parse (lyskom-help-parse-string (buffer-string)
'(toplevel nil nil (help)))))
(defun lyskom-help-parse-extract (parse tag)
(let ((result nil))
......@@ -311,3 +314,20 @@ CONTAINING-SYNTAX is the syntax specification for the containing tag."
(car (lyskom-help-parse-help-file (format "help-%s.xml" language))))
(defvar lyskom-help-language-mapping '((sv . "swedish") (en . "english")))
(defun lyskom-help-compile-to-el ()
(let* ((parse (lyskom-help-parse-buffer))
(result (lyskom-help-parse-extract (lyskom-help-data-get-data (car parse)) 'section))
(language-code (intern (lyskom-help-data-get-attr 'language (car parse))))
(language (cdr (assq language-code lyskom-help-language-mapping)))
(sym (intern (format "lyskom-%S-help-data" language-code))))
(if (null language)
(error "Unknown language code `%S'" language-code))
(set-buffer (get-buffer-create "*LysKOM Help Output*"))
(let ((standard-output (current-buffer)))
(print `(defvar ,sym ',result))
(write-file (format "%s-help.el" language)))))
......@@ -1434,9 +1434,9 @@ Deferred insertions are not supported."
(format (format "%%%c" format-letter) arg))
((and (floatp arg) (= format-letter ?d))
(format "%0.0f" arg))
(signal 'lyskom-internal-error
(list 'lyskom-format
": argument error (expected int)")))))
(t (signal 'lyskom-internal-error
(list 'lyskom-format
": argument error (expected int)"))))))
;; Format a character by converting it to a string and inserting
;; it into the result list
......@@ -3959,7 +3959,6 @@ i servern. Annars sparas det i din .emacs.")
(lyskom-language-var global lyskom-unread-title-format sv
(defvar lyskom-sv-help-data (lyskom-help-compile sv))
(lyskom-language-var local lyskom-help-data sv lyskom-sv-help-data)
(provide 'lyskom-language-sv)
Supports Markdown
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