From 926861fbc1bbcc0f7143be623e517ab1156ddae7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 11 Jan 2001 10:18:42 +0000 Subject: [PATCH] (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. --- lisp/ChangeLog | 7 +++++++ lisp/progmodes/etags.el | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ecc2faa17b..38bd3397935 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2001-01-11 Eli Zaretskii + + * progmodes/etags.el (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. + 2001-01-11 Richard M. Stallman * isearch.el (isearch-lazy-highlight-update): diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index a6fa0f8e289..e01a1448af8 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -782,7 +782,7 @@ Assumes the tags table is the current buffer." ;; 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 @@ See documentation of variable `tags-file-name'." (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 @@ See documentation of variable `tags-file-name'." (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 @@ See documentation of variable `tags-file-name'." 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) -- 2.39.5