Subject: bug#43242: [PATCH] Fix CSS completion bug

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 06 Sep 2020 23:46:54 +0200

"Philip K." <[email-masked]> 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