X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/2c0f29abb2928f672043cf97d689770bd2265064..ef2470117d8fccea2f5200bff27d6d1a04b855b7:/packages/yasnippet/snippets/emacs-lisp-mode/x-find-replace.yasnippet diff --git a/packages/yasnippet/snippets/emacs-lisp-mode/x-find-replace.yasnippet b/packages/yasnippet/snippets/emacs-lisp-mode/x-find-replace.yasnippet index e5a1d6c39..b0c58ec21 100644 --- a/packages/yasnippet/snippets/emacs-lisp-mode/x-find-replace.yasnippet +++ b/packages/yasnippet/snippets/emacs-lisp-mode/x-find-replace.yasnippet @@ -6,7 +6,7 @@ "Replace “<” to “<” and other chars in HTML. This works on the current region." (interactive "r") - (save-restriction + (save-restriction (narrow-to-region start end) (goto-char (point-min)) (while (search-forward "&" nil t) (replace-match "&" nil t))