# HG changeset patch # User Richard M. Stallman # Date 787344817 0 # Node ID a864b7f97b561028327c9c168bab7bb5240b5d36 # Parent 2279074cd821ca2a0a5a3915f9ab85cde18e9ac9 (Info-tagify): Avoid 1-off error in position of a tag. diff -r 2279074cd821 -r a864b7f97b56 lisp/informat.el --- a/lisp/informat.el Tue Dec 13 18:47:37 1994 +0000 +++ b/lisp/informat.el Tue Dec 13 18:53:37 1994 +0000 @@ -48,9 +48,11 @@ (case-fold-search t) list) (while (search-forward "\n\^_" nil t) - (forward-line 1) - (let ((beg (point))) - (forward-line 1) + ;; We want the 0-origin character position of the ^_. + ;; That is the same as the Emacs (1-origin) position + ;; of the newline before it. + (let ((beg (match-beginning 0))) + (forward-line 2) (if (re-search-backward regexp beg t) (setq list (cons (list (buffer-substring