From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Errors indicated by ineffective backslashes in string literals
Date: Sat, 16 Mar 2019 14:25:22 -0400 [thread overview]
Message-ID: <jwvmulu65q9.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: D2E71D4B-FBCE-42BA-B937-DF5350DF7C8C@acm.org
> 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).
> - (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. ]
> - (if file (replace-regexp-in-string "\.pdf$" ".ps" file)
> + (if file (replace-regexp-in-string "\\.pdf$" ".ps" file)
^
Here's another ;-)
Stefan
next prev parent reply other threads:[~2019-03-16 18:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-16 18:09 Errors indicated by ineffective backslashes in string literals Mattias Engdegård
2019-03-16 18:25 ` Stefan Monnier [this message]
2019-03-16 19:04 ` Mattias Engdegård
2019-03-16 19:22 ` Stefan Monnier
2019-03-19 1:56 ` Paul Eggert
2019-03-16 18:40 ` Paul Eggert
2019-03-16 19:06 ` Mattias Engdegård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvmulu65q9.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).