doomemacs/modules/lang/web/autoload/evil.el
Henrik Lissner ad6a3d0f33
refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00

26 lines
1 KiB
EmacsLisp

;;; lang/html/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (modulep! :editor evil)
;;;###autoload (autoload '+web:encode-html-entities "lang/web/autoload/evil" nil t)
(evil-define-operator +web:encode-html-entities (beg end &optional bang input)
"Encodes HTML entities in INPUT or the selected region."
(interactive "<r><!><a>")
(cond (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 bang input)
"Decodes HTML entities in INPUT or the selected region."
(interactive "<r><!><a>")
(cond (input
(let ((result (+web-decode-entities input)))
(if bang
(kill-new result)
(insert result))))
((and beg end)
(+web/decode-entities-region beg end))))