From a4f2b51302ef4243f584fff4cc18c4300ff326da Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 7 Feb 2014 23:02:42 -0500 Subject: Widen first in LaTeX narrowing functions This is consistent with behavior in `narrow-to-page' and `narrow-to-defun'. --- lisp/init-tex.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lisp') diff --git a/lisp/init-tex.el b/lisp/init-tex.el index 3f244cf..db8cde0 100644 --- a/lisp/init-tex.el +++ b/lisp/init-tex.el @@ -21,6 +21,7 @@ This is meant for single elements, like \"\\section\". If TAG is not given, it is taken from the active region." (interactive) (save-excursion + (widen) (let* ((tag (or tag (buffer-substring-no-properties (mark) (point)))) (tag (if (s-starts-with? "\\" tag) @@ -41,6 +42,7 @@ This is meant for paired elements, like \"\\begin{document}\". If TAG is not given, it is taken from the active region." (interactive) (save-excursion + (widen) (let* ((tag (or tag (buffer-substring-no-properties (mark) (point)))) (beg (progn (end-of-line) -- cgit v1.2.3