diff options
| author | Dmitry Gutov | 2015-11-16 00:30:12 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2015-11-16 00:30:30 +0200 |
| commit | f60a3b086cb30e1b794f586fe1da5947869e29fc (patch) | |
| tree | 5fb42dbe5cd25e885a7b9b066dd4c758899008b1 | |
| parent | 4765d24e18a947678bfa63b0351f68931484273c (diff) | |
| download | emacs-f60a3b086cb30e1b794f586fe1da5947869e29fc.tar.gz emacs-f60a3b086cb30e1b794f586fe1da5947869e29fc.zip | |
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).
| -rw-r--r-- | lisp/progmodes/etags.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 651c824275d..dd84754f389 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -805,7 +805,8 @@ If no tags table is loaded, do nothing and return nil." | |||
| 805 | beg) | 805 | beg) |
| 806 | (when pattern | 806 | (when pattern |
| 807 | (save-excursion | 807 | (save-excursion |
| 808 | (forward-char (1- (length pattern))) | 808 | ;; Avoid end-of-buffer error. |
| 809 | (goto-char (+ (point) (length pattern) -1)) | ||
| 809 | ;; The find-tag function might be overly optimistic. | 810 | ;; The find-tag function might be overly optimistic. |
| 810 | (when (search-backward pattern nil t) | 811 | (when (search-backward pattern nil t) |
| 811 | (setq beg (point)) | 812 | (setq beg (point)) |