auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] A problem with \parencite and fill-paragraph


From: Ikumi Keita
Subject: Re: [AUCTeX] A problem with \parencite and fill-paragraph
Date: Sat, 01 Apr 2017 22:31:55 +0900

Hi Arash,

>>>>> Arash Esbati <address@hidden> writes:

> no, \B is not really necessary, I just wanted to say that appending \b
> to the complete regexp would not work for \[; it would be \B or
> nothing.  And dropping \B is more versatile.

Thank you for clarifying.  That agrees with my thought.

> (defun LaTeX-paragraph-commands-regexp-make ()
>   "Return a regular expression matching defined paragraph commands.
> Regexp part containing TeX control words is postfixed with `\\b'
> to avoid ambiguities (e.g. \\par vs. \\parencite)."
>   (let (cmds symbs)
>     (dolist (mac (append LaTeX-paragraph-commands
>                          LaTeX-paragraph-commands-internal))
>       (if (string-match "[^a-zA-Z]" mac)
>           (push mac symbs)
>         (push mac cmds)))
>     (concat (regexp-quote TeX-esc) "\\(?:"
>             (regexp-opt cmds "\\(?:")
>             "\\b"
>             "\\|"
>             (regexp-opt symbs)
>             "\\)")))

Now I fully agree with this proposal.

Best,
Ikumi Keita



reply via email to

[Prev in Thread] Current Thread [Next in Thread]