(etags-goto-tag-location): Add 1 to char positions in TAGS.
authorRichard M. Stallman <rms@gnu.org>
Thu, 12 Jan 1995 05:50:13 +0000 (05:50 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 12 Jan 1995 05:50:13 +0000 (05:50 +0000)
lisp/progmodes/etags.el

index 84d0154..1817f6f 100644 (file)
@@ -1050,6 +1050,9 @@ See documentation of variable `tags-file-name'."
        (pat (concat (if (eq selective-display t)
                         "\\(^\\|\^m\\)" "^")
                     (regexp-quote (car tag-info)))))
+    ;; The character position in the tags table is 0-origin.
+    ;; Convert it to a 1-origin Emacs character position.
+    (if startpos (setq startpos (1+ startpos)))
     ;; If no char pos was given, try the given line number.
     (or startpos
        (if (car (cdr tag-info))