emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r107645: * lisp/progmodes/etags.el (t


From: Sam Steingold
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107645: * lisp/progmodes/etags.el (tags-completion-at-point-function):
Date: Wed, 21 Mar 2012 13:17:23 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107645
committer: Sam Steingold <address@hidden>
branch nick: trunk
timestamp: Wed 2012-03-21 13:17:23 -0400
message:
  * lisp/progmodes/etags.el (tags-completion-at-point-function):
  Avoid the error when point is inside the pattern.
modified:
  lisp/ChangeLog
  lisp/progmodes/etags.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-03-21 17:02:09 +0000
+++ b/lisp/ChangeLog    2012-03-21 17:17:23 +0000
@@ -1,3 +1,8 @@
+2012-03-21  Sam Steingold  <address@hidden>
+
+       * progmodes/etags.el (tags-completion-at-point-function):
+       Avoid the error when point is inside the pattern.
+
 2012-03-21  John Yates  <address@hidden>  (tiny change)
 
        * progmodes/hideshow.el (hs-inside-comment-p): Fix hiding of first

=== modified file 'lisp/progmodes/etags.el'
--- a/lisp/progmodes/etags.el   2012-01-19 07:21:25 +0000
+++ b/lisp/progmodes/etags.el   2012-03-21 17:17:23 +0000
@@ -809,10 +809,10 @@
          beg)
       (when pattern
        (save-excursion
-         (search-backward pattern) ;FIXME: will fail if we're inside pattern.
-         (setq beg (point))
-         (forward-char (length pattern))
-         (list beg (point) (tags-lazy-completion-table) :exclusive 'no))))))
+         (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)))))))
 
 (defun find-tag-tag (string)
   "Read a tag name, with defaulting and completion."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]