[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Errors indicated by ineffective backslashes in string literals
From: |
Mattias Engdegård |
Subject: |
Re: Errors indicated by ineffective backslashes in string literals |
Date: |
Sat, 16 Mar 2019 20:04:24 +0100 |
16 mars 2019 kl. 19.25 skrev Stefan Monnier <address@hidden>:
>
>> Sorry to bother you again, but while trying to get a better understanding of
>> regexp usage and errors I found several ineffective backslashes in string
>> literals (like "\.") and decided to do something about them.
>
> I went through something similar "recently" and added the corresponding
> highlighting in elisp-mode (see elisp--font-lock-backslash in lisp-mode.el).
Nice, thank you. I wrote a script to search for the help-echo property to
locate the errors.
>> - (directory-files-recursively store-dir "\.gpg$"))))
>> + (directory-files-recursively store-dir "\\.gpg$"))))
> ^
> should be \\'
>
> [ Yes, I know it's unrelated, but it's another common (minor) error. ]
Ah yes, sorry, should have done that while at it. Now I searched for such cases
and found lots, and decided to postpone it since it's mostly cosmetic -- unless
we are concerned about newlines in file names, which we perhaps should be.