[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: verbatim shorthand problem
From: |
Arash Esbati |
Subject: |
Re: verbatim shorthand problem |
Date: |
Thu, 31 Aug 2023 22:02:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Mandar Mitra <mandar.mitra@gmail.com> writes:
> Arash Esbati wrote (Fri, Aug 25, 2023 at 11:38:36AM +0200):
>> Can you please file a bug report for this, incl. a MWE starting with
>> emacs -Q? TIA.
>>
>> For the time being, you can use delimiters instead of braces for the
>> optional argument which works, e.g.:
>>
>> \lstinline[language=C,basicstyle=\ttfamily]|for (i=0; i<8; i++)
>> printf("%c\n"), str1 [ i]);|
>
> Thanks very much for confirming, and for the work-around! Will file
> the bug report with an MWE this weekend.
I think I now see what's going wrong. Can you please apply this patch
to font-latex.el and try it again? I presume you're using AUCTeX from
the repo.
--8<---------------cut here---------------start------------->8---
diff --git a/font-latex.el b/font-latex.el
index 7617b5cc..083f72b4 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1084,7 +1084,7 @@ have changed."
;; An opening curly brace as delimiter is valid, but
;; allowing it might screw up fontification of stuff
;; like "\url{...} foo \textbf{<--!...}".
- "\\([^a-z@*\n\f{]\\).*?"
+ "\\([^a-z@*\n\f{[]\\).*?"
;; Give an escape char at the end of the verbatim
;; construct punctuation syntax. Prevents wrong
;; fontification of stuff like "\verb|foo\|".
--8<---------------cut here---------------end--------------->8---
Best, Arash
- verbatim shorthand problem, Werner LEMBERG, 2023/08/17
- Re: verbatim shorthand problem, Arash Esbati, 2023/08/18
- Re: verbatim shorthand problem, Werner LEMBERG, 2023/08/18
- Re: verbatim shorthand problem, Arash Esbati, 2023/08/18
- Re: verbatim shorthand problem, Werner LEMBERG, 2023/08/18
- Re: verbatim shorthand problem, Mandar Mitra, 2023/08/22
- Re: verbatim shorthand problem, Arash Esbati, 2023/08/25
- Re: verbatim shorthand problem, Arash Esbati, 2023/08/25
- Re: verbatim shorthand problem, Mandar Mitra, 2023/08/25
- Re: verbatim shorthand problem,
Arash Esbati <=