]> git.eshelyaron.com Git - emacs.git/commitdiff
(Info-tagify): Avoid 1-off error in position of a tag.
authorRichard M. Stallman <rms@gnu.org>
Tue, 13 Dec 1994 18:53:37 +0000 (18:53 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 13 Dec 1994 18:53:37 +0000 (18:53 +0000)
lisp/informat.el

index 3930378c5dfa5081cdf25bc38f0346fc4274193d..5a861ed18ba96fd0a09e955d55ea3ae6dfb1efb9 100644 (file)
                  (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