From 08b894ab8b9eeea4cd707560ecd84debab174ff3 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 12 Jan 1995 05:50:13 +0000 Subject: [PATCH] (etags-goto-tag-location): Add 1 to char positions in TAGS. --- lisp/progmodes/etags.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 84d0154c154..1817f6f1ae6 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -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)) -- 2.39.5