使用font-lock进行终结时,是否可以一次提取多个组?
我正试着把头包起来 font-lock-keywords 格式,特别是 MATCH-ANCHORED 变种,但我不知道如何重新使用从一个正则表达式生成的匹配。以下是我的插图设置: (defvar fmt-font-lock-keywords ;; no-args `(("~\\(@:?\\|:@?\\)?[]>()}aswvcp;_]" (0 font-lock-keyword-face)) ;; numeric-arg ("~\\([0-9]*\\|#,?\\)\\(@:?\\|:@?\\)?[i*%&|~{[]" (0 font-lock-keyword-face)) ;; decimal ("~\\([0-9]*\\|#\\(,[0-9]*\\|#\\)\\{0,3\\}\\)?\\(@:?\\|:@?\\)?[rdbox]" (0 font-lock-keyword-face)) ;; floating-point f (,(concat "~\\(\\(\\([0-9]*\\|#\\)\\(,\\([0-9]*\\|#\\)\\)\\{3\\}\\(,'\\w\\)\\{1,2\\}\\)\\|" "\\(\\([0-9]*\\|#\\)\\(,\\([0-9]*\\|#\\)\\)\\{0,3\\}\\)\\)" "?\\(@:?\\|:@?\\)?f") (0 font-lock-keyword-face)) ;; floating-point e, g (,(concat "~\\(\\(\\([0-9]*\\|#\\)\\(,\\([0-9]*\\|#\\)\\)\\{3\\}\\(,'\\w\\)\\{1,3\\}\\)\\|" "\\(\\([0-9]*\\|#\\)\\(,\\([0-9]*\\|#\\)\\)\\{0,3\\}\\)\\)" "?\\(@:?\\|:@?\\)?[eg]") (0 font-lock-keyword-face)) ;; currency (,(concat "~\\(\\(\\([0-9]*\\|#\\)\\(,\\([0-9]*\\|#\\)\\)\\{2\\}\\(,'\\w\\)\\)\\|" "\\(\\([0-9]*\\|#\\)\\(,\\([0-9]*\\|#\\)\\)\\{0,2\\}\\)\\)" "?\\(@:?\\|:@?\\)?[$]") (0 font-lock-keyword-face)) ;; …