From: Stefan Monnier Date: Wed, 21 Mar 2012 17:50:28 +0000 (-0400) Subject: * progmodes/etags.el (tags-completion-at-point-function): Improve last fix. X-Git-Tag: emacs-pretest-24.0.05~81^2~3 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=af67c9d7cd1a44d1e7f168707486407d845ee357;p=emacs.git * progmodes/etags.el (tags-completion-at-point-function): Improve last fix. --- 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."