summaryrefslogtreecommitdiff
path: root/lisp/informat.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-12-13 18:53:37 +0000
committerRichard M. Stallman <rms@gnu.org>1994-12-13 18:53:37 +0000
commit6b1e327109cb3593f96dadc115db498b5ffb6c70 (patch)
treef1d48bb778e88c407d68a68752eb2b5e0b0a0d8d /lisp/informat.el
parentf0653de7749c27b8fe6c92c7c72c75ae493b8e73 (diff)
downloademacs-6b1e327109cb3593f96dadc115db498b5ffb6c70.tar.gz
(Info-tagify): Avoid 1-off error in position of a tag.
Diffstat (limited to 'lisp/informat.el')
-rw-r--r--lisp/informat.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/informat.el b/lisp/informat.el
index 3930378c5df..5a861ed18ba 100644
--- a/lisp/informat.el
+++ b/lisp/informat.el
@@ -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