\f
;;; Helper functions
-(defvar xref-etags-mode--saved nil)
-
(define-minor-mode xref-etags-mode
"Minor mode to make xref use etags again.
Certain major modes install their own mechanisms for listing
identifiers and navigation. Turn this on to undo those settings
and just use etags."
- :lighter ""
+ :lighter nil
(if xref-etags-mode
- (progn
- (setq xref-etags-mode--saved xref-backend-functions)
- (kill-local-variable 'xref-backend-functions))
- (setq-local xref-backend-functions xref-etags-mode--saved)))
+ (add-hook 'xref-backend-functions #'etags--xref-backend nil t)
+ (remove-hook 'xref-backend-functions #'etags--xref-backend t)))
(declare-function grep-expand-template "grep")