changeset 35226:e1ba079c4709

(find-tag-interactive): If last-tag is nil, behave as if there were no prefix argument. (find-tag-noselect): If last-tag is nil, behave as if the NEXT-P argument were nil.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 11 Jan 2001 10:17:09 +0000
parents eee3a978c12e
children 4e7249135902
files lisp/progmodes/etags.el
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/etags.el	Thu Jan 11 08:08:51 2001 +0000
+++ b/lisp/progmodes/etags.el	Thu Jan 11 10:17:09 2001 +0000
@@ -782,7 +782,7 @@
 
 ;; Get interactive args for find-tag{-noselect,-other-window,-regexp}.
 (defun find-tag-interactive (prompt &optional no-default)
-  (if current-prefix-arg
+  (if (and current-prefix-arg last-tag)
       (list nil (if (< (prefix-numeric-value current-prefix-arg) 0)
 		    '-
 		  t))
@@ -839,7 +839,7 @@
 	      (run-hooks 'local-find-tag-hook))))
       ;; Record whence we came.
       (ring-insert find-tag-marker-ring (point-marker))
-      (if next-p
+      (if (and next-p last-tag)
 	  ;; Find the same table we last used.
 	  (visit-tags-table-buffer 'same)
 	;; Pick a table to use.
@@ -852,7 +852,7 @@
 	  (set-buffer
 	   ;; find-tag-in-order does the real work.
 	   (find-tag-in-order
-	    (if next-p last-tag tagname)
+	    (if (and next-p last-tag) last-tag tagname)
 	    (if regexp-p
 		find-tag-regexp-search-function
 	      find-tag-search-function)
@@ -863,7 +863,7 @@
 		find-tag-regexp-next-line-after-failure-p
 	      find-tag-next-line-after-failure-p)
 	    (if regexp-p "matching" "containing")
-	    (not next-p)))
+	    (or (not next-p) (not last-tag))))
 	  (set-marker marker (point))
 	  (run-hooks 'local-find-tag-hook)
 	  (ring-insert tags-location-ring marker)