# HG changeset patch # User Richard M. Stallman # Date 874375072 0 # Node ID 23ada3fdbc8baef737defaa804f0c3894e3d116a # Parent b960ef5a1eccc53c22886d676027a8a99455058a (tit-process-header): Convert argument of KEYPROMPT if it contains an escape. (tit-process-body): Handle trailing whitespace and multiple spaces between phrases. diff -r b960ef5a1ecc -r 23ada3fdbc8b lisp/international/titdic-cnv.el --- a/lisp/international/titdic-cnv.el Mon Sep 15 23:21:03 1997 +0000 +++ b/lisp/international/titdic-cnv.el Tue Sep 16 01:57:52 1997 +0000 @@ -176,6 +176,10 @@ (cond ((looking-at "KEYPROMPT(\\(.*\\)):[ \t]*") (let ((key-char (match-string 1))) (goto-char (match-end 0)) + (if (string-match "\\\\[0-9]+" key-char) + (setq key-char + (car (read-from-string (format "\"%s\"" + key-char))))) (setq tit-keyprompt (cons (cons key-char (tit-read-key-value)) tit-keyprompt)))))))) @@ -320,17 +324,18 @@ (if tit-phrase (progn ;; PHRASE1 PHRASE2 ... => ["PHRASE1" "PHRASE2" ...] - (insert "[\"") - (skip-chars-forward "^ \t\n") + (insert "[") + (skip-chars-forward " \t") (while (not (eolp)) (insert "\"") - (forward-char 1) + (skip-chars-forward "^ \t\n") (insert "\"") - (skip-chars-forward "^ \t\n")) - (insert "\"])")) + (skip-chars-forward " \t")) + (insert "])")) ;; TRANSLATIONS => "TRANSLATIONS" (insert "\"") (end-of-line) + (skip-chars-backward " \t") (insert "\")")) (forward-line 1)))) (insert ")\n")))