From: Dmitry Gutov Date: Mon, 29 Dec 2014 00:36:57 +0000 (+0200) Subject: Declare many etags command obsolete; update the goto menu X-Git-Tag: emacs-25.0.90~2631^2~12^2~7 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c1eec814857c59069c8115bf83fce3548a8684b8;p=emacs.git 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. --- diff --git a/etc/NEWS b/etc/NEWS index 4d632783812..548f409348a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba7503fb753..f1501799a22 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2014-12-29 Dmitry Gutov + + * 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 * international/mule.el (define-coding-system): Fix typos in the diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 8f33641a746..74a807095dc 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -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 + (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 [xref-apropos] + '(menu-item "Find Apropos..." xref-find-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 [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-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] diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 0be99794356..be0dabf17b2 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -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 `")