unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Errors indicated by ineffective backslashes in string literals
Date: Sat, 16 Mar 2019 20:04:24 +0100	[thread overview]
Message-ID: <1E86F07B-EE45-41EA-A081-00E9844BDE4C@acm.org> (raw)
In-Reply-To: <jwvmulu65q9.fsf-monnier+emacs@gnu.org>

16 mars 2019 kl. 19.25 skrev Stefan Monnier <monnier@iro.umontreal.ca>:
> 
>> 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.




  reply	other threads:[~2019-03-16 19:04 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
2019-03-16 19:04   ` Mattias Engdegård [this message]
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=1E86F07B-EE45-41EA-A081-00E9844BDE4C@acm.org \
    --to=mattiase@acm.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).