From 21749f14c7dfac88a0c1e0e748f222e4ca83bef6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 3 Jan 2004 21:15:28 +0000 Subject: [PATCH] (latex-find-indent): Avoid error at end of buf. --- lisp/textmodes/tex-mode.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 87dc8fcbc00..68b408af081 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -2342,15 +2342,15 @@ There might be text before point." (+ indent (current-column) tex-indent-item)) (t (let ((col (current-column))) - (if (not (eq (char-syntax char) ?\()) + (if (or (null char) (not (eq (char-syntax char) ?\())) ;; If the first char was not an open-paren, there's ;; a risk that this is really not an argument to the ;; macro at all. - (+ indent col) - (forward-sexp 1) - (if (< (line-end-position) - (save-excursion (forward-comment (point-max)) - (point))) + (+ indent col) + (forward-sexp 1) + (if (< (line-end-position) + (save-excursion (forward-comment (point-max)) + (point))) ;; we're indenting the first argument. (min (current-column) (+ tex-indent-arg col)) (skip-syntax-forward " ") -- 2.39.2