aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-09-16 01:57:52 +0000
committerRichard M. Stallman1997-09-16 01:57:52 +0000
commit1fa1e1f500f6448680c01df95082d203f893e7f5 (patch)
tree38797c9c5905fb1f334296c53693cdf8255ad8c4
parentf0f90cfddf26c142604377904049c9070038cb9a (diff)
downloademacs-1fa1e1f500f6448680c01df95082d203f893e7f5.tar.gz
emacs-1fa1e1f500f6448680c01df95082d203f893e7f5.zip
(tit-process-header): Convert argument of KEYPROMPT if it contains an escape.
(tit-process-body): Handle trailing whitespace and multiple spaces between phrases.
-rw-r--r--lisp/international/titdic-cnv.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el
index f80925325cd..9a4f6ddfbcc 100644
--- a/lisp/international/titdic-cnv.el
+++ b/lisp/international/titdic-cnv.el
@@ -176,6 +176,10 @@
176 (cond ((looking-at "KEYPROMPT(\\(.*\\)):[ \t]*") 176 (cond ((looking-at "KEYPROMPT(\\(.*\\)):[ \t]*")
177 (let ((key-char (match-string 1))) 177 (let ((key-char (match-string 1)))
178 (goto-char (match-end 0)) 178 (goto-char (match-end 0))
179 (if (string-match "\\\\[0-9]+" key-char)
180 (setq key-char
181 (car (read-from-string (format "\"%s\""
182 key-char)))))
179 (setq tit-keyprompt 183 (setq tit-keyprompt
180 (cons (cons key-char (tit-read-key-value)) 184 (cons (cons key-char (tit-read-key-value))
181 tit-keyprompt)))))))) 185 tit-keyprompt))))))))
@@ -320,17 +324,18 @@
320 (if tit-phrase 324 (if tit-phrase
321 (progn 325 (progn
322 ;; PHRASE1 PHRASE2 ... => ["PHRASE1" "PHRASE2" ...] 326 ;; PHRASE1 PHRASE2 ... => ["PHRASE1" "PHRASE2" ...]
323 (insert "[\"") 327 (insert "[")
324 (skip-chars-forward "^ \t\n") 328 (skip-chars-forward " \t")
325 (while (not (eolp)) 329 (while (not (eolp))
326 (insert "\"") 330 (insert "\"")
327 (forward-char 1) 331 (skip-chars-forward "^ \t\n")
328 (insert "\"") 332 (insert "\"")
329 (skip-chars-forward "^ \t\n")) 333 (skip-chars-forward " \t"))
330 (insert "\"])")) 334 (insert "])"))
331 ;; TRANSLATIONS => "TRANSLATIONS" 335 ;; TRANSLATIONS => "TRANSLATIONS"
332 (insert "\"") 336 (insert "\"")
333 (end-of-line) 337 (end-of-line)
338 (skip-chars-backward " \t")
334 (insert "\")")) 339 (insert "\")"))
335 (forward-line 1)))) 340 (forward-line 1))))
336 (insert ")\n"))) 341 (insert ")\n")))