Avoid the error when point is inside the pattern.
+2012-03-21 Sam Steingold <sds@gnu.org>
+
+ * progmodes/etags.el (tags-completion-at-point-function):
+ Avoid the error when point is inside the pattern.
+
2012-03-21 John Yates <john@yates-sheets.org> (tiny change)
* progmodes/hideshow.el (hs-inside-comment-p): Fix hiding of first
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)))))))
\f
(defun find-tag-tag (string)
"Read a tag name, with defaulting and completion."