emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Globally apply xref-etags-mode


From: Dmitry Gutov
Subject: Re: Globally apply xref-etags-mode
Date: Sun, 12 Nov 2023 03:35:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 11/11/2023 16:15, Matt wrote:
             (if (string= "tmp" (cadr (file-name-split (file-name-directory 
(buffer-file-name)))))

This should be shorter:

  (if (string-match-p "^/tmp/" (buffer-file-name))

;;  Bootstrap the TAGS referencing
(with-current-buffer "ob-shell.el"
   (xref-etags-mode))

Or just 'M-x xref-etags-mode'?

If there is a significant demand for it, we could add global-xref-etags-mode (with 'define-globalized-minor-mode'), which would affect all buffers. But so far questions like this one seem rare enough.

And for some reason or other, you also decided to only turn this minor mode on in certain files.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]