Commit 72729014 authored by Paul Eggert's avatar Paul Eggert
Browse files

Fix glitch in generating cxterm doc strings

* lisp/international/titdic-cnv.el (tit-process-header):
In generated doc strings, escape \, ", ', and ` properly.
Currently only ' appears but we might as well future-proof this.
parent 292f73fc
...@@ -283,7 +283,14 @@ SPC, 6, 3, 4, or 7 specifying a tone (SPC:陰平, 6:陽平, 3:上聲, 4:去聲, ...@@ -283,7 +283,14 @@ SPC, 6, 3, 4, or 7 specifying a tone (SPC:陰平, 6:陽平, 3:上聲, 4:去聲,
(pos (point))) (pos (point)))
(cond ((= ch ?C) ; COMMENT (cond ((= ch ?C) ; COMMENT
(cond ((looking-at "COMMENT") (cond ((looking-at "COMMENT")
(let ((pos (match-end 0))) (let ((pos (match-end 0))
(to (progn (end-of-line) (point))))
(goto-char pos)
(while (re-search-forward "[\\\"]" to t)
(replace-match "\\\\\\&"))
(goto-char pos)
(while (re-search-forward "['`]" to t)
(replace-match "\\\\\\\\=\\&"))
(end-of-line) (end-of-line)
(setq tit-comments (setq tit-comments
(cons (buffer-substring-no-properties pos (point)) (cons (buffer-substring-no-properties pos (point))
......
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