From: Richard M. Stallman Date: Thu, 12 Jan 1995 05:50:13 +0000 (+0000) Subject: (etags-goto-tag-location): Add 1 to char positions in TAGS. X-Git-Url: http://git.hcoop.net/bpt/emacs.git/commitdiff_plain/08b894ab8b9eeea4cd707560ecd84debab174ff3 (etags-goto-tag-location): Add 1 to char positions in TAGS. --- diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 84d0154c15..1817f6f1ae 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))