Add the explicit character at the beginning of the regexp
This commit is contained in:
parent
810baea2ea
commit
03748d48cd
1 changed files with 29 additions and 29 deletions
|
@ -99,35 +99,35 @@ Otherwise it builds `prettify-code-symbols-alist' according to
|
|||
(add-hook 'after-change-major-mode-hook #'+pretty-code-init-pretty-symbols-h)
|
||||
|
||||
(defvar +prog-ligatures-alist
|
||||
'((?! . ".\\(?:\\(==\\|[!=]\\)[!=]?\\)")
|
||||
(?# . ".\\(?:\\(###?\\|_(\\|[(:=?[_{]\\)[#(:=?[_{]?\\)")
|
||||
(?$ . ".\\(?:\\(>\\)>?\\)")
|
||||
(?% . ".\\(?:\\(%\\)%?\\)")
|
||||
(?& . ".\\(?:\\(&\\)&?\\)")
|
||||
(?* . ".\\(?:\\(\\*\\*\\|[*>]\\)[*>]?\\)")
|
||||
;; (?* . ".\\(?:\\(\\*\\*\\|[*/>]\\).?\\)")
|
||||
(?+ . ".\\(?:\\([>]\\)>?\\)")
|
||||
;; (?+ . ".\\(?:\\(\\+\\+\\|[+>]\\).?\\)")
|
||||
(?- . ".\\(?:\\(-[->]\\|<<\\|>>\\|[-<>|~]\\)[-<>|~]?\\)")
|
||||
;; (?. . ".\\(?:\\(\\.[.<]\\|[-.=]\\)[-.<=]?\\)")
|
||||
(?. . ".\\(?:\\(\\.<\\|[-=]\\)[-<=]?\\)")
|
||||
(?/ . ".\\(?:\\(//\\|==\\|[=>]\\)[/=>]?\\)")
|
||||
;; (?/ . ".\\(?:\\(//\\|==\\|[*/=>]\\).?\\)")
|
||||
(?0 . ".\\(?:\\(x[a-fA-F0-9]\\).?\\)")
|
||||
(?: . ".\\(?:\\(::\\|[:<=>]\\)[:<=>]?\\)")
|
||||
(59 . ".\\(?:\\(;\\);?\\)") ;; 59 is ;
|
||||
(?< . ".\\(?:\\(!--\\|\\$>\\|\\*>\\|\\+>\\|-[-<>|]\\|/>\\|<[-<=]\\|=[<>|]\\|==>?\\||>\\||||?\\|~[>~]\\|[$*+/:<=>|~-]\\)[$*+/:<=>|~-]?\\)")
|
||||
(?= . ".\\(?:\\(!=\\|/=\\|:=\\|<<\\|=[=>]\\|>>\\|[=>]\\)[=<>]?\\)")
|
||||
(?> . ".\\(?:\\(->\\|=>\\|>[-=>]\\|[-:=>]\\)[-:=>]?\\)")
|
||||
(?? . ".\\(?:\\([.:=?]\\)[.:=?]?\\)")
|
||||
(91 . ".\\(?:\\(|\\)[]|]?\\)") ;; 91 is [
|
||||
;; (?\ . ".\\(?:\\([\\n]\\)[\\]?\\)")
|
||||
(?^ . ".\\(?:\\(=\\)=?\\)")
|
||||
(?_ . ".\\(?:\\(|_\\|[_]\\)_?\\)")
|
||||
(?w . ".\\(?:\\(ww\\)w?\\)")
|
||||
(?{ . ".\\(?:\\(|\\)[|}]?\\)")
|
||||
(?| . ".\\(?:\\(->\\|=>\\||[-=>]\\||||*>\\|[]=>|}-]\\).?\\)")
|
||||
(?~ . ".\\(?:\\(~>\\|[-=>@~]\\)[-=>@~]?\\)"))
|
||||
'((?! . "!\\(?:\\(==\\|[!=]\\)[!=]?\\)")
|
||||
(?# . "#\\(?:\\(###?\\|_(\\|[(:=?[_{]\\)[#(:=?[_{]?\\)")
|
||||
(?$ . "$\\(?:\\(>\\)>?\\)")
|
||||
(?% . "%\\(?:\\(%\\)%?\\)")
|
||||
(?& . "&\\(?:\\(&\\)&?\\)")
|
||||
(?* . "*\\(?:\\(\\*\\*\\|[*>]\\)[*>]?\\)")
|
||||
;; (?* . "*\\(?:\\(\\*\\*\\|[*/>]\\).?\\)")
|
||||
(?+ . "+\\(?:\\([>]\\)>?\\)")
|
||||
;; (?+ . "+\\(?:\\(\\+\\+\\|[+>]\\).?\\)")
|
||||
(?- . "-\\(?:\\(-[->]\\|<<\\|>>\\|[-<>|~]\\)[-<>|~]?\\)")
|
||||
;; (?. . "\\.\\(?:\\(\\.[.<]\\|[-.=]\\)[-.<=]?\\)")
|
||||
(?. . "\\.\\(?:\\(\\.<\\|[-=]\\)[-<=]?\\)")
|
||||
(?/ . "/\\(?:\\(//\\|==\\|[=>]\\)[/=>]?\\)")
|
||||
;; (?/ . "/\\(?:\\(//\\|==\\|[*/=>]\\).?\\)")
|
||||
(?0 . "0\\(?:\\(x[a-fA-F0-9]\\).?\\)")
|
||||
(?: . ":\\(?:\\(::\\|[:<=>]\\)[:<=>]?\\)")
|
||||
(59 . ";\\(?:\\(;\\);?\\)") ;; 59 is ;
|
||||
(?< . "<\\(?:\\(!--\\|\\$>\\|\\*>\\|\\+>\\|-[-<>|]\\|/>\\|<[-<=]\\|=[<>|]\\|==>?\\||>\\||||?\\|~[>~]\\|[$*+/:<=>|~-]\\)[$*+/:<=>|~-]?\\)")
|
||||
(?= . "=\\(?:\\(!=\\|/=\\|:=\\|<<\\|=[=>]\\|>>\\|[=>]\\)[=<>]?\\)")
|
||||
(?> . ">\\(?:\\(->\\|=>\\|>[-=>]\\|[-:=>]\\)[-:=>]?\\)")
|
||||
(?? . "?\\(?:\\([.:=?]\\)[.:=?]?\\)")
|
||||
(91 . "\\[\\(?:\\(|\\)[]|]?\\)") ;; 91 is [
|
||||
;; (?\ . "\\\\\\(?:\\([\\n]\\)[\\]?\\)")
|
||||
(?^ . "^\\(?:\\(=\\)=?\\)")
|
||||
(?_ . "_\\(?:\\(|_\\|[_]\\)_?\\)")
|
||||
(?w . "w\\(?:\\(ww\\)w?\\)")
|
||||
(?{ . "{\\(?:\\(|\\)[|}]?\\)")
|
||||
(?| . "|\\(?:\\(->\\|=>\\||[-=>]\\||||*>\\|[]=>|}-]\\).?\\)")
|
||||
(?~ . "~\\(?:\\(~>\\|[-=>@~]\\)[-=>@~]?\\)"))
|
||||
"An alist containing all the ligatures used when in a `+prog-ligatures-modes' mode.
|
||||
|
||||
The car is the character ASCII number, cdr is a regex which will call `font-shape-gstring'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue