summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-02-07 23:02:42 -0500
committerKyle Meyer <kyle@kyleam.com>2014-02-07 23:07:37 -0500
commita4f2b51302ef4243f584fff4cc18c4300ff326da (patch)
tree5b10b9e129f14f18738089dcab7e57fbc962e606
parentfd6965614b9ecc88fc670bc6e6847a28a403390b (diff)
downloademacs.d-a4f2b51302ef4243f584fff4cc18c4300ff326da.tar.gz
Widen first in LaTeX narrowing functions
This is consistent with behavior in `narrow-to-page' and `narrow-to-defun'.
-rw-r--r--lisp/init-tex.el2
1 files changed, 2 insertions, 0 deletions
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)