* Backslash cleanup introduced bug [284c470e 9/17]
@ 2015-09-18 12:34 Wilson Snyder
2015-09-18 16:41 ` Paul Eggert
0 siblings, 1 reply; 3+ messages in thread
From: Wilson Snyder @ 2015-09-18 12:34 UTC (permalink / raw)
To: Paul Eggert; +Cc: emacs-devel
Thanks for your recent quoting cleanup commit. One of your
cleanups broke the verilog-mode.el package regressions.
I've repaired it; no additional action is needed, but a
heads up in case this affects other packages.
This:
- "==" "!=" "===" "!==" "<=" ">=" "==\?" "!=\?" "<->"
+ "==" "!=" "===" "!==" "<=" ">=" "==\\?" "!=\\?" "<->"
was a list of operators, not a series of regexps, so this
change will break matching `==?' (it will look for `==\?'.
Therefore the proper cleanup is:
- "==" "!=" "===" "!==" "<=" ">=" "==\?" "!=\?" "<->"
+ "==" "!=" "===" "!==" "<=" ">=" "==?" "!=?" "<->"
Also:
(verilog-string-replace-matches
- "\[[^0-9: \t]+\]" "" nil nil
+ "\\[[^0-9: \t]+]" "" nil nil
While I agree it works, I think quoting literal open
brackets without quoting literal closing brackets makes it
harder to read - which closing bracket matches the literal
open bracket?
(verilog-string-replace-matches
- "\[[^0-9: \t]+\]" "" nil nil
+ "\\[[^0-9: \t]+\\]" "" nil nil
I find this is easier to read as the \\[ and \\] form a
matching pair. Furthermore I can see any unquoted closing
bracket and know it is part of a character class; and see
any quoted closing bracket and know it matches a literal.
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Backslash cleanup introduced bug [284c470e 9/17]
2015-09-18 12:34 Backslash cleanup introduced bug [284c470e 9/17] Wilson Snyder
@ 2015-09-18 16:41 ` Paul Eggert
2015-09-18 16:45 ` Paul Eggert
0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggert @ 2015-09-18 16:41 UTC (permalink / raw)
To: Wilson Snyder; +Cc: emacs-devel
On 09/18/2015 05:34 AM, Wilson Snyder wrote:
> One of your
> cleanups broke the verilog-mode.el package regressions.
>
Thanks for catching that. I think you're referring to 753fbfbe, not to
284c470e as the Subject: line says. 284c470e was intended to not change
behavior. 753fbfbe was intended to fix behavior, but obviously I messed
up in that instance (and thanks for fixing it). I now see that I also
misclassified a few changes in 284c470e, as they actually did affect
behavior (e.g., this change in verilog-mode.el:
- (re-search-backward "/\*")
+ (re-search-backward "/\\*")
), but I think these misclassified changes all fixed bugs so it should
be OK.
One other thing. In 284c470e I tried to leave bugs alone when in
doubt. That is, although there are undoubtedly still some bugs related
to backslashes, when in doubt I left behavior the same as it was
before. For example, lisp/net/tramp-adb.el has this:
(defcustom tramp-adb-prompt
"^\\(?:[[:digit:]]*|?\\)?\\(?:[[:alnum:]\e;[]*@[[:alnum:]]*[^#\\$]*\\)?[#\\$][[:space:]]"
and both instances of \\$ should probably be just $. I wasn't sure,
though, so I left them alone.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Backslash cleanup introduced bug [284c470e 9/17]
2015-09-18 16:41 ` Paul Eggert
@ 2015-09-18 16:45 ` Paul Eggert
0 siblings, 0 replies; 3+ messages in thread
From: Paul Eggert @ 2015-09-18 16:45 UTC (permalink / raw)
To: Wilson Snyder; +Cc: emacs-devel
One more thing. Re this reversion:
- (verilog-insert " // Implicit .*\n"))
+ (verilog-insert " // Implicit .\*\n")) ;For some reason the . or
* must be escaped...
Could you please explain why the backslash is needed before "*"? In
Elisp, the two strings are equal.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-18 16:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-18 12:34 Backslash cleanup introduced bug [284c470e 9/17] Wilson Snyder
2015-09-18 16:41 ` Paul Eggert
2015-09-18 16:45 ` Paul Eggert
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).