X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Fetags.el;h=cba03e029515525f20473b1267001bd5b12d0c5a;hp=00180d65101710b28abbc5c793ba48d0336cb7b5;hb=3e447015251ce6dcde843cbed10d9033d5538622;hpb=a5f466de30a3e927ed1146b0c7e3870e71465c8f diff --git a/lisp/etags.el b/lisp/etags.el index 00180d6..cba03e0 100644 --- a/lisp/etags.el +++ b/lisp/etags.el @@ -52,7 +52,7 @@ ;; Kyle Jones ;; added "Exact match, then inexact" code ;; added support for include directive. -;; Hrvoje Niksic +;; Hrvoje Niksic ;; various changes. @@ -598,11 +598,8 @@ Make it buffer-local in a mode hook. The function is called with no (format "%s(default %s) " prompt default) prompt) tag-completion-table 'tag-completion-predicate nil nil - 'find-tag-history)) - (if (string-equal tag-name "") - ;; #### - This is a really LAME way of doing it! --Stig - default ;indicate exact symbol match - tag-name))) + 'find-tag-history default)) + tag-name)) (defvar last-tag-data nil "Information for continuing a tag search. @@ -641,7 +638,7 @@ If it returns non-nil, this file needs processing by evalling (t (setq tag-table-currently-matching-exact t))) ;; \_ in the tagname is used to indicate a symbol boundary. - (setq exact-tagname (concat "\\_" tagname "\\_")) + (setq exact-tagname (format "\C-?\\_%s\\_\C-a\\|\\_%s\\_" tagname tagname)) (while (string-match "\\\\_" exact-tagname) (aset exact-tagname (1- (match-end 0)) ?b)) (save-excursion @@ -674,7 +671,9 @@ If it returns non-nil, this file needs processing by evalling ;; tag searches? (while (re-search-forward tag-target nil t) (and (save-match-data - (looking-at "[^\n\C-?]*\C-?")) + (save-excursion + (goto-char (match-beginning 0)) + (looking-at "[^\n\C-?]*\C-?"))) ;; If we're looking for inexact matches, skip ;; exact matches since we've visited them ;; already. @@ -693,6 +692,7 @@ If it returns non-nil, this file needs processing by evalling (if next "more " "") (if exact "matching" "containing") tagname)) + (beginning-of-line) (search-forward "\C-?") (setq file (expand-file-name (file-of-tag) ;; In XEmacs, this needs to be