Install yasnippet and vala-snippets packages
This commit is contained in:
18
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/x-find-replace
Executable file
18
elpa/yasnippet-20160924.2001/snippets/emacs-lisp-mode/x-find-replace
Executable file
@@ -0,0 +1,18 @@
|
||||
#contributor: Xah Lee (XahLee.org)
|
||||
#name: find and replace on region
|
||||
# key: x-find-replace
|
||||
# --
|
||||
(defun replace-html-chars-region (start end)
|
||||
"Replace “<” to “<” and other chars in HTML.
|
||||
This works on the current region."
|
||||
(interactive "r")
|
||||
(save-restriction
|
||||
(narrow-to-region start end)
|
||||
(goto-char (point-min))
|
||||
(while (search-forward "&" nil t) (replace-match "&" nil t))
|
||||
(goto-char (point-min))
|
||||
(while (search-forward "<" nil t) (replace-match "<" nil t))
|
||||
(goto-char (point-min))
|
||||
(while (search-forward ">" nil t) (replace-match ">" nil t))
|
||||
)
|
||||
)
|
Reference in New Issue
Block a user