diff options
| author | Philip Kaludercic <philipk@posteo.net> | 2022-08-09 11:32:01 +0200 |
|---|---|---|
| committer | Philip Kaludercic <philipk@posteo.net> | 2022-08-09 11:34:23 +0200 |
| commit | 99d48709ad5540179afecc24d8b4cdb3d9e688ca (patch) | |
| tree | 01c7b46c37f827ed60aacea50d21ced05c0bed21 /compat-28.el | |
| parent | dd48603a136881a5321de4419be95ea873496172 (diff) | |
Replace rx expression with its macroexpansion
That way we avoid accidentally autoloading rx.
Diffstat (limited to 'compat-28.el')
| -rw-r--r-- | compat-28.el | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/compat-28.el b/compat-28.el index 0c399b4..1b1d6de 100644 --- a/compat-28.el +++ b/compat-28.el @@ -285,22 +285,23 @@ and BLUE, is normalized to have its value in [0,65535]." ;; [0] http://www.nic.funet.fi/pub/X11/X11R4/DOCS/color/Xcms.text ;; [1] https://gitlab.freedesktop.org/xorg/lib/libx11/-/blob/master/src/xcms/LRGB.c#L1392 ((string-match - (rx bos "rgbi:" (* space) - (group (? (or "-" "+")) - (or (: (+ digit) (? "." (* digit))) - (: "." (+ digit))) - (? "e" (? (or "-" "+")) (+ digit))) - "/" (* space) - (group (? (or "-" "+")) - (or (: (+ digit) (? "." (* digit))) - (: "." (+ digit))) - (? "e" (? (or "-" "+")) (+ digit))) - "/" (* space) - (group (? (or "-" "+")) - (or (: (+ digit) (? "." (* digit))) - (: "." (+ digit))) - (? "e" (? (or "-" "+")) (+ digit))) - eos) + ;; (rx bos "rgbi:" (* space) + ;; (group (? (or "-" "+")) + ;; (or (: (+ digit) (? "." (* digit))) + ;; (: "." (+ digit))) + ;; (? "e" (? (or "-" "+")) (+ digit))) + ;; "/" (* space) + ;; (group (? (or "-" "+")) + ;; (or (: (+ digit) (? "." (* digit))) + ;; (: "." (+ digit))) + ;; (? "e" (? (or "-" "+")) (+ digit))) + ;; "/" (* space) + ;; (group (? (or "-" "+")) + ;; (or (: (+ digit) (? "." (* digit))) + ;; (: "." (+ digit))) + ;; (? "e" (? (or "-" "+")) (+ digit))) + ;; eos) + "\\`rgbi:[[:space:]]*\\([+-]?\\(?:[[:digit:]]+\\(?:\\.[[:digit:]]*\\)?\\|\\.[[:digit:]]+\\)\\(?:e[+-]?[[:digit:]]+\\)?\\)/[[:space:]]*\\([+-]?\\(?:[[:digit:]]+\\(?:\\.[[:digit:]]*\\)?\\|\\.[[:digit:]]+\\)\\(?:e[+-]?[[:digit:]]+\\)?\\)/[[:space:]]*\\([+-]?\\(?:[[:digit:]]+\\(?:\\.[[:digit:]]*\\)?\\|\\.[[:digit:]]+\\)\\(?:e[+-]?[[:digit:]]+\\)?\\)\\'" spec) (let ((r (round (* (string-to-number (match-string 1 spec)) 65535))) (g (round (* (string-to-number (match-string 2 spec)) 65535))) |
