emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regexp linting run in Emacs tree


From: Mattias Engdegård
Subject: Re: regexp linting run in Emacs tree
Date: Sun, 4 Aug 2019 21:07:05 +0200

4 aug. 2019 kl. 20.46 skrev Paul Eggert <address@hidden>:
> 
> Thanks, I installed the attached to master.

Thank you, this looks fine.

> The following seem to be false alarms, though:
> 
> lisp/progmodes/fortran.el:1823:36: In call to skip-chars-backward: Duplicated 
> character ` ' (pos 2)
>  " \t "
>   ...^
> [and similar matches] This seem to be assuming that the customized variable 
> fortran-comment-indent-char has its default value.

Yes, it is a bit hard to guard against that sort of thing --- relint blindly 
assumes default values of global variables. What about adding a `delete-dups' 
to make it shut up?

> lisp/isearch.el:2191:23: In call to string-match-p: Error: Unknown syntax 
> code ‘@’: 
> "\\`\\(?:\\s-\\|\\s.\\|\\s(\\|\\s)\\|\\s\"\\|\\s\\\\|\\s/\\|\\s$\\|\\s'\\|\\s<\\|\\s>\\|\\s@\\|\\s!\\|\\s|\\)+\\'"
> [and similar matches] This seems to be assuming that \s@ is not valid, but 
> that escape is documented as valid. Is there some problem with \s@ that I 
> don't know about?

I assumed that @ isn't a valid syntax code in regexps, since it only means 
'inherit from standard syntax table' which is fine for specifying the syntax of 
a character but makes no sense when we are trying to match something. Do you 
agree? (The regexp engine will accept it, but then again it will accept any 
character without complaining, which is probably a bug.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]