From af67c9d7cd1a44d1e7f168707486407d845ee357 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 21 Mar 2012 13:50:28 -0400 Subject: [PATCH] * progmodes/etags.el (tags-completion-at-point-function): Improve last fix. --- lisp/ChangeLog | 3 +++ lisp/progmodes/etags.el | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dc8c5e04eb3..4cedbe5f9a6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-03-21 Stefan Monnier + * progmodes/etags.el (tags-completion-at-point-function): + Improve last fix. + * files.el (move-file-to-trash): Files aren't regexps (bug#11055). 2012-03-21 Sam Steingold diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 3a36410884f..4b337e1c15c 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -809,10 +809,11 @@ If no tags table is loaded, do nothing and return nil." beg) (when pattern (save-excursion - (when (search-backward pattern nil t) ; will fail inside pattern - (setq beg (point)) - (forward-char (length pattern)) - (list beg (point) (tags-lazy-completion-table) :exclusive 'no))))))) + (forward-char (1- (length pattern))) + (search-backward pattern) + (setq beg (point)) + (forward-char (length pattern)) + (list beg (point) (tags-lazy-completion-table) :exclusive 'no)))))) (defun find-tag-tag (string) "Read a tag name, with defaulting and completion." -- 2.39.5