Skip to content

Commit 7272901

Browse files
committed
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.
1 parent 292f73f commit 7272901

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lisp/international/titdic-cnv.el

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,14 @@ SPC, 6, 3, 4, or 7 specifying a tone (SPC:陰平, 6:陽平, 3:上聲, 4:去聲,
283283
(pos (point)))
284284
(cond ((= ch ?C) ; COMMENT
285285
(cond ((looking-at "COMMENT")
286-
(let ((pos (match-end 0)))
286+
(let ((pos (match-end 0))
287+
(to (progn (end-of-line) (point))))
288+
(goto-char pos)
289+
(while (re-search-forward "[\\\"]" to t)
290+
(replace-match "\\\\\\&"))
291+
(goto-char pos)
292+
(while (re-search-forward "['`]" to t)
293+
(replace-match "\\\\\\\\=\\&"))
287294
(end-of-line)
288295
(setq tit-comments
289296
(cons (buffer-substring-no-properties pos (point))

0 commit comments

Comments
 (0)