Subject: bug#64311: [PATCH] Fix shell-dirtrack-mode showing up as enabled in unrelated buffers

From: Eli Zaretskii <[email-masked]>
Date: Mon, 03 Jul 2023 20:17:31 +0300

> From: Vladimir Sedach <[email-masked]>
> Cc: [email-masked]
> Date: Mon, 03 Jul 2023 11:03:37 -0600
> 
> 
> Eli Zaretskii <[email-masked]> writes:
> > I think the alternative patch below solves all those issues.  If you
> > disagree, pleased tell what left-over problems you see after applying
> > that patch.
> 
> How should defvaralias be used?
> 
> On the master branch I count 74 defvaralias declarations in lisp/,
> excluding lisp/obsolete/ (there are some more generated dynamically
> by org-babel). Of these, 73 are used for variable rename refactoring
> (the 1 other use is vhdl-last-input-event as a compatibility shim for
> xemacs).
> 
> There were 2 things that to me looked wrong with the existing
> defvaralias declaration in shell.el:
> 
> 1. As far as I can tell, every declaration aside from shell.el is of
>    the form (defvaralias old-variable new-variable). The one in
>    shell.el is the other way around.
> 
> 2. There are only 2 occurrences where the old variable is still
>    referenced in Emacs code: erc-join-buffer and shell-dirtrackp
> 
> Isn't the point of defvaralias in removing uses of the old variable
> name from Emacs code?

I'm not sure.  You may be right.  Let's see if Stefan (CC'ed) has any
comments.

But in any case, given how long we have this arrangement, I wouldn't
make any changes in it unless it causes real problems.  And I think
after installing the simple changes I proposed there are no real
problems left to justify such changes.