changeset 884:93a935b7a479

*** empty log message ***
author Roland McGrath <roland@gnu.org>
date Mon, 27 Jul 1992 18:52:51 +0000
parents 5a7ed0421c9d
children 9ba823ecb3df
files lisp/progmodes/etags.el
diffstat 1 files changed, 27 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/etags.el	Mon Jul 27 17:41:57 1992 +0000
+++ b/lisp/progmodes/etags.el	Mon Jul 27 18:52:51 1992 +0000
@@ -491,7 +491,7 @@
 See documentation of variable `tags-file-name'."
   (interactive (if current-prefix-arg
 		   '(nil t)
-		 (find-tag-tag "Find tag other window: ")))
+		 (find-tag-tag "Find tag: ")))
   (switch-to-buffer (find-tag-noselect tagname next-p)))
 ;;;###autoload (define-key esc-map "." 'find-tag)
 
@@ -589,10 +589,10 @@
 	  (if first-search
 	      (setq tag-lines-already-matched nil))
 
-	  (if first-table
-	      (setq first-table nil)
-	    ;; Start at beginning of tags file.
-	    (goto-char (point-min)))
+	  (and first-search first-table
+	       ;; Start at beginning of tags file.
+	       (goto-char (point-min)))
+	  (setq first-table nil)
 
 	  (setq tags-table-file buffer-file-name)
 	  (while order
@@ -807,29 +807,29 @@
 
 ;;; Match qualifier functions for tagnames.
 
-(defmacro tags-with-syntax (&rest body)
-  (` (let ((current (current-buffer))
-	   (otable (syntax-table))
-	   (buffer (find-file-noselect (file-of-tag)))
-	   table)
-       (unwind-protect
-	   (progn
-	     (set-buffer buffer)
-	     (setq table (syntax-table))
-	     (set-buffer current)
-	     (set-syntax-table table)
-	     (,@ body))
-	 (set-syntax-table otable)))))
+;; This might be a neat idea, but it's too hairy at the moment.
+;;(defmacro tags-with-syntax (&rest body)
+;;  (` (let ((current (current-buffer))
+;;	   (otable (syntax-table))
+;;	   (buffer (find-file-noselect (file-of-tag)))
+;;	   table)
+;;       (unwind-protect
+;;	   (progn
+;;	     (set-buffer buffer)
+;;	     (setq table (syntax-table))
+;;	     (set-buffer current)
+;;	     (set-syntax-table table)
+;;	     (,@ body))
+;;	 (set-syntax-table otable)))))
+;;(put 'tags-with-syntax 'edebug-form-spec '(&rest form))
 
 ;; t if point is at a tag line that matches TAG "exactly".
 ;; point should be just after a string that matches TAG.
-(defun tags-exact-match-p (tag)
-  (tags-with-syntax
-   (let ((end (point)))
-     (unwind-protect
-	 (= (match-beginning 0)
-	    (re-search-backward "\\(\\sw\\|\\s_\\)+" end t))
-       (goto-char end)))))
+(defun tag-exact-match-p (tag)
+  (and (looking-at "\\Sw.*\177") (looking-at "\\S_.*\177") ;not a symbol char
+       (save-excursion
+	 (backward-char (1+ (length tag)))
+	 (and (looking-at "\\Sw") (looking-at "\\S_")))))
 
 ;; t if point is at a tag line that matches TAG as a word.
 ;; point should be just after a string that matches TAG.
@@ -1098,8 +1098,6 @@
   (or (one-window-p)
       (delete-window)))  
 
-;;;###autoload (define-key esc-map "\t" 'complete-tag)
-
 ;;;###autoload
 (defun complete-tag ()
   "Perform tags completion on the text around point.
@@ -1131,7 +1129,8 @@
 	     (display-completion-list
 	      (all-completions pattern 'tags-complete-tag nil)))
 	   (message "Making completion list...%s" "done")))))
-;;;###autoload (define-key esc-map "?" 'complete-tag)	;? XXX
+
+;;;###autoload (define-key esc-map "\t" 'complete-tag)
 
 (provide 'etags)