Declare many etags command obsolete; update the goto menu

* lisp/menu-bar.el (menu-bar-goto-menu): Replace all but one etags item
with xref ones.

* lisp/progmodes/etags.el (find-tag-other-window)
(find-tag-other-frame, find-tag-regexp, tags-loop-continue)
(tags-apropos): Declare obsolete.
This commit is contained in:
Dmitry Gutov 2014-12-29 02:36:57 +02:00
parent 9fb9136398
commit c1eec81485
4 changed files with 32 additions and 20 deletions

View file

@ -456,6 +456,11 @@ easier binding, which is now unoccupied (`M-,').
alias for a private variable. `xref-push-marker-stack' and
`xref-pop-marker-stack' should be used to mutate it instead.
** etags
As a result of the above, these commands are now obsolete:
`find-tag-other-window', `find-tag-other-frame', `find-tag-regexp',
`tags-apropos' and `tags-loop-continue'.
** Obsolete packages
---

View file

@ -1,3 +1,12 @@
2014-12-29 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/etags.el (find-tag-other-window)
(find-tag-other-frame, find-tag-regexp, tags-loop-continue)
(tags-apropos): Declare obsolete.
* menu-bar.el (menu-bar-goto-menu): Replace all but one etags item
with xref ones.
2014-12-28 Eli Zaretskii <eliz@gnu.org>
* international/mule.el (define-coding-system): Fix typos in the

View file

@ -378,30 +378,23 @@
(bindings--define-key menu [separator-tag-file]
menu-bar-separator)
(bindings--define-key menu [apropos-tags]
'(menu-item "Tags Apropos..." tags-apropos
:help "Find function/variables whose names match regexp"))
(bindings--define-key menu [next-tag-otherw]
'(menu-item "Next Tag in Other Window"
menu-bar-next-tag-other-window
:enable (and (boundp 'tags-location-ring)
(not (ring-empty-p tags-location-ring)))
:help "Find next function/variable matching last tag name in another window"))
(bindings--define-key menu [xref-pop]
'(menu-item "Back..." xref-pop-marker-stack
:help "Back to the position of the last search"))
(bindings--define-key menu [next-tag]
'(menu-item "Find Next Tag"
menu-bar-next-tag
:enable (and (boundp 'tags-location-ring)
(not (ring-empty-p tags-location-ring)))
:help "Find next function/variable matching last tag name"))
(bindings--define-key menu [find-tag-otherw]
'(menu-item "Find Tag in Other Window..." find-tag-other-window
(bindings--define-key menu [xref-apropos]
'(menu-item "Find Apropos..." xref-find-apropos
:help "Find function/variables whose names match regexp"))
(bindings--define-key menu [xref-find-otherw]
'(menu-item "Find Definition in Other Window..."
xref-find-definitions-other-window
:help "Find function/variable definition in another window"))
(bindings--define-key menu [find-tag]
'(menu-item "Find Tag..." find-tag
(bindings--define-key menu [xref-find-def]
'(menu-item "Find Definition..." xref-find-definitions
:help "Find definition of function or variable"))
(bindings--define-key menu [separator-tags]
(bindings--define-key menu [separator-xref]
menu-bar-separator)
(bindings--define-key menu [end-of-buf]

View file

@ -975,6 +975,7 @@ onto a ring and may be popped back to with \\[pop-tag-mark].
Contrast this with the ring of marks gone to by the command.
See documentation of variable `tags-file-name'."
(declare (obsolete xref-find-definitions-other-window "25.1"))
(interactive (find-tag-interactive "Find tag other window: "))
;; This hair is to deal with the case where the tag is found in the
@ -1015,6 +1016,7 @@ onto a ring and may be popped back to with \\[pop-tag-mark].
Contrast this with the ring of marks gone to by the command.
See documentation of variable `tags-file-name'."
(declare (obsolete xref-find-definitions-other-frame "25.1"))
(interactive (find-tag-interactive "Find tag other frame: "))
(let ((pop-up-frames t))
(find-tag-other-window tagname next-p)))
@ -1037,6 +1039,7 @@ onto a ring and may be popped back to with \\[pop-tag-mark].
Contrast this with the ring of marks gone to by the command.
See documentation of variable `tags-file-name'."
(declare (obsolete xref-find-apropos "25.1"))
(interactive (find-tag-interactive "Find tag regexp: " t))
;; We go through find-tag-other-window to do all the display hair there.
(funcall (if other-window 'find-tag-other-window 'find-tag)
@ -1786,6 +1789,7 @@ Two variables control the processing we do on each file: the value of
interesting (it returns non-nil if so) and `tags-loop-operate' is a form to
evaluate to operate on an interesting file. If the latter evaluates to
nil, we exit; otherwise we scan the next file."
(declare (obsolete "use `xref-find-definitions' interface instead." "25.1"))
(interactive)
(let (new
;; Non-nil means we have finished one file
@ -1929,6 +1933,7 @@ directory specification."
;;;###autoload
(defun tags-apropos (regexp)
"Display list of all tags in tags table REGEXP matches."
(declare (obsolete xref-find-apropos "25.1"))
(interactive "sTags apropos (regexp): ")
(with-output-to-temp-buffer "*Tags List*"
(princ "Click mouse-2 to follow tags.\n\nTags matching regexp `")