mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-23 03:20:26 +10:00
Updating Doom Emacs.
This commit is contained in:
@@ -2,20 +2,25 @@
|
||||
;;;###if (featurep! :editor evil)
|
||||
|
||||
;;;###autoload (autoload '+web:encode-html-entities "lang/web/autoload/evil" nil t)
|
||||
(evil-define-operator +web:encode-html-entities (beg end &optional input)
|
||||
(evil-define-operator +web:encode-html-entities (beg end &optional bang input)
|
||||
"Encodes HTML entities in INPUT or the selected region."
|
||||
(interactive "<r><a>")
|
||||
(interactive "<r><!><a>")
|
||||
(cond (input
|
||||
(insert (+web-encode-entities input)))
|
||||
(let ((result (+web-encode-entities input)))
|
||||
(if bang
|
||||
(kill-new result)
|
||||
(insert result))))
|
||||
((and beg end)
|
||||
(+web/encode-entities-region beg end))))
|
||||
|
||||
;;;###autoload (autoload '+web:decode-html-entities "lang/web/autoload/evil" nil t)
|
||||
(evil-define-operator +web:decode-html-entities (beg end &optional input)
|
||||
(evil-define-operator +web:decode-html-entities (beg end &optional bang input)
|
||||
"Decodes HTML entities in INPUT or the selected region."
|
||||
(interactive "<r><a>")
|
||||
(interactive "<r><!><a>")
|
||||
(cond (input
|
||||
(insert (+web-decode-entities input)))
|
||||
(let ((result (+web-decode-entities input)))
|
||||
(if bang
|
||||
(kill-new result)
|
||||
(insert result))))
|
||||
((and beg end)
|
||||
(+web/decode-entities-region beg end))))
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
(defvar +web-entities-list
|
||||
[["&" "&"] [" " " "] [" " " "] [" " " "] [" " " "]
|
||||
["<" "<"] [">" ">"]
|
||||
["‏" ""] ["‎" ""] ["‍" ""] ["‌" ""]
|
||||
["¡" "¡"] ["¢" "¢"] ["£" "£"] ["¤" "¤"] ["¥" "¥"]
|
||||
["¦" "¦"] ["§" "§"] ["¨" "¨"] ["©" "©"] ["ª" "ª"]
|
||||
|
||||
Reference in New Issue
Block a user