GNU bug report logs -
#43242
[PATCH] Fix CSS completion bug
Previous Next
Reported by: "Philip K." <philipk <at> posteo.net>
Date: Sun, 6 Sep 2020 12:52:01 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
"Philip K." <philipk <at> posteo.net> writes:
> Well, it's being used in the next line in the member call to extract the
> record from css-property-ids.
I think there may be a slight misunderstanding about what the point of
save-match-data is. Here's the code:
+ (save-match-data
+ (and (looking-back "\\([[:alnum:]-]+\\):[^/][^;]*"
+ (line-beginning-position) t)
+ (car (member (match-string-no-properties 1)
+ css-property-ids))))))
The regexp operators set a global match state, but is you use
save-match-data, the previous global state is restored after the form
ends. So save-match-data is used to preserve the global state -- it's
not necessary if you don't care about overwriting it, and overwriting it
is the norm.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 315 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.