Commit f60a3b08 authored by Dmitry Gutov's avatar Dmitry Gutov
Browse files

Fix etags completion near eob

* lisp/progmodes/etags.el (tags-completion-at-point-function):
Use `goto-char', to avoid the end-of-buffer error (bug#20061).
parent 4765d24e
......@@ -805,7 +805,8 @@ If no tags table is loaded, do nothing and return nil."
beg)
(when pattern
(save-excursion
(forward-char (1- (length pattern)))
;; Avoid end-of-buffer error.
(goto-char (+ (point) (length pattern) -1))
;; The find-tag function might be overly optimistic.
(when (search-backward pattern nil t)
(setq beg (point))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment