GNU bug report logs -
#20685
2015-04-19; args-out-of-range error when no newline at eob.
Previous Next
Full log
View this message in rfc822 format
Hi,
This one often bites me when I'm in a narrowed buffer.
Here's a backtrace from a minimal recipe (which is in the backtrace).
Debugger entered--Lisp error: (args-out-of-range #<buffer temp> 57 58)
buffer-substring-no-properties(57 58)
LaTeX-backward-paragraph()
LaTeX-fill-region(41 57 nil " environment document")
LaTeX-fill-environment(nil)
call-interactively(LaTeX-fill-environment)
(let ((data "\\documentclass{minimal}\n\\begin{document}\n\n\\end{document}")) (switch-to-buffer (get-buffer-create "temp")) (TeX-latex-mode) (insert data) (search-backward "\n\n") (call-interactively (quote LaTeX-fill-environment)))
eval-buffer(#<buffer *load*> nil "/home/youngfrog/tmp-test-auctex-filling.el" nil t) ; Reading at buffer position 319
load-with-code-conversion("/home/youngfrog/tmp-test-auctex-filling.el" "/home/youngfrog/tmp-test-auctex-filling.el" nil t)
load("/home/youngfrog/tmp-test-auctex-filling.el" nil t)
command-line-1(("-l" "/home/youngfrog/tmp-test-auctex-filling.el"))
command-line()
normal-top-level()
I suggest the following change:
--8<---------------cut here---------------start------------->8---
modified latex.el
@@ -4475,10 +4475,7 @@ If COUNT is non-nil, do it COUNT times."
"[@A-Za-z]+\\|[ \t]*\\($\\|"
TeX-comment-start-regexp "\\)"))
(progn
- (when (string= (buffer-substring-no-properties
- (point) (+ (point)
- (length TeX-esc)))
- TeX-esc)
+ (when (looking-at (regexp-quote TeX-esc))
(goto-char (TeX-find-macro-end)))
(forward-line 1)
(when (< (point) start)
--8<---------------cut here---------------end--------------->8---
This bug report was last modified 9 years and 364 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.