lang/web: fix Emacs<26 incompatibility #806
The regexp argument for string-trim-right was introduced in 26.1.
This commit is contained in:
parent
11b8ee55a1
commit
40a900f533
1 changed files with 4 additions and 1 deletions
|
@ -38,7 +38,10 @@
|
||||||
(cl-loop for pair in (cdr alist)
|
(cl-loop for pair in (cdr alist)
|
||||||
unless (string-match-p "^[a-z-]" (cdr pair))
|
unless (string-match-p "^[a-z-]" (cdr pair))
|
||||||
collect (cons (car pair)
|
collect (cons (car pair)
|
||||||
(string-trim-right (cdr pair) "\\(?:>\\|]\\|}\\)+")))))
|
;; TODO Replace with `string-trim-right' (Emacs 26+)
|
||||||
|
(if (string-match "\\(?:>\\|]\\|}\\)+\\'" string)
|
||||||
|
(replace-match "" t t string)
|
||||||
|
string)))))
|
||||||
(setf (alist-get nil web-mode-engines-auto-pairs) nil))
|
(setf (alist-get nil web-mode-engines-auto-pairs) nil))
|
||||||
|
|
||||||
(map! :map web-mode-map
|
(map! :map web-mode-map
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue