[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Cannot expand string in command on 13.0.3
From: |
Tak Kunihiro |
Subject: |
Cannot expand string in command on 13.0.3 |
Date: |
Tue, 12 Jan 2021 18:29:17 +0900 (JST) |
I cannot replace keywords listed in my command in TeX-command-list by
expansion string in TeX-expand-list. I have problem under 13.0.3 but
no problem under 12.3.1. I still cannot reproduce the problem started
from emacs -Q.
I found that replace-match on line 568 replaces something that differs
from matched string on line 553.
If you have idea, please let me know.
tex-buf:537: (defun TeX-command-expand (command &optional list)
tex-buf:538: "Expand COMMAND for `TeX-active-master' as described in LIST.
tex-buf:539: LIST default to `TeX-expand-list'. As a special exception,
tex-buf:540: `%%' can be used to produce a single `%' sign in the output
tex-buf:541: without further expansion."
tex-buf:542: (let ((TeX-expand-command command)
tex-buf:543: TeX-expand-pos
tex-buf:544: TeX-command-text
tex-buf:545: TeX-command-pos
tex-buf:546: pat entry case-fold-search string expansion arguments)
tex-buf:547: (setq list (cons
tex-buf:548: (list "%%" (lambda nil
tex-buf:549: (setq TeX-expand-pos (1+
TeX-expand-pos))
tex-buf:550: "%"))
tex-buf:551: (or list (TeX-expand-list)))
tex-buf:552: pat (regexp-opt (mapcar #'car list)))
tex-buf:553: (while (setq TeX-expand-pos (string-match pat
TeX-expand-command TeX-expand-pos))
tex-buf:554: (setq string (match-string 0 TeX-expand-command)
tex-buf:555: entry (assoc string list)
tex-buf:556: expansion (car (cdr entry)) ;Second element
tex-buf:557: arguments (cdr (cdr entry)) ;Remaining elements
tex-buf:558: string (save-match-data
tex-buf:559: (cond
tex-buf:560: ((functionp expansion)
tex-buf:561: (apply expansion arguments))
tex-buf:562: ((boundp expansion)
tex-buf:563: (apply (symbol-value expansion) arguments))
tex-buf:564: (t
tex-buf:565: (error "Nonexpansion %s" expansion)))))
tex-buf:566: (when (stringp string)
tex-buf:567: (setq TeX-expand-command
tex-buf:568: (replace-match string t t TeX-expand-command))))
tex-buf:569: TeX-expand-command))
- Cannot expand string in command on 13.0.3,
Tak Kunihiro <=
- Re: Cannot expand string in command on 13.0.3, Tassilo Horn, 2021/01/12
- Re: Cannot expand string in command on 13.0.3, Tak Kunihiro, 2021/01/12
- Re: Cannot expand string in command on 13.0.3, Tassilo Horn, 2021/01/13
- Re: Cannot expand string in command on 13.0.3, Tak Kunihiro, 2021/01/13
- Re: Cannot expand string in command on 13.0.3, Ikumi Keita, 2021/01/13
- Re: Cannot expand string in command on 13.0.3, Tak Kunihiro, 2021/01/13
- Re: Cannot expand string in command on 13.0.3, Ikumi Keita, 2021/01/14