* dirtrack-toggle () vs. shell-dirtrack-mode (&optional arg)
@ 2006-05-18 9:45 Juanma Barranquero
2006-05-18 17:46 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Juanma Barranquero @ 2006-05-18 9:45 UTC (permalink / raw)
After this:
2006-05-17 Stefan Monnier <monnier@iro.umontreal.ca>
* shell.el (shell-dirtrack-mode): Make it into a proper minor mode, so
we can explicitly enable/disable rather than toggle.
`dirtrack-toggle' is an alias to
shell-dirtrack-mode (&optional arg)
in shell.el, and a function
dirtrack-toggle ()
in dirtrack.el. Harmless, but it does generate a warning when compiling:
In dirtrack-toggle:
dirtrack.el:241:8:Warning: function dirtrack-toggle used to take 0-1
arguments, now takes 0
Adding a dummy argument to `dirtrack-toggle' seems ugly, so perhaps,
in shell.el, instead of the defalias:
(defun dirtrack-toggle ()
(interactive)
(call-interactively #'shell-dirtrack-mode))
which is no less ugly. Or, assuming they aren't going to be used both
at the same time, in dirtrack.el:
(eval-when-compile (fmakunbound 'dirtrack-toggle))
(defun dirtrack-toggle () ...)
which is hardly better.
All in all, so many options for such an irrelevant an issue... :)
--
/L/e/k/t/u
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: dirtrack-toggle () vs. shell-dirtrack-mode (&optional arg)
2006-05-18 9:45 dirtrack-toggle () vs. shell-dirtrack-mode (&optional arg) Juanma Barranquero
@ 2006-05-18 17:46 ` Stefan Monnier
2006-05-18 17:51 ` Juanma Barranquero
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2006-05-18 17:46 UTC (permalink / raw)
Cc: Emacs Devel
> After this:
> 2006-05-17 Stefan Monnier <monnier@iro.umontreal.ca>
> * shell.el (shell-dirtrack-mode): Make it into a proper minor mode, so
> we can explicitly enable/disable rather than toggle.
> `dirtrack-toggle' is an alias to
> shell-dirtrack-mode (&optional arg)
> in shell.el, and a function
> dirtrack-toggle ()
> in dirtrack.el. Harmless, but it does generate a warning when compiling:
Hmm... so there were two definitions which happened to have the same number
of arguments so the byte-compiler never complained whereas now that the two
defs have different number of args the compiler complains.
I think the problem is that we have two definitions. I suggest we remove
the dirtrack-toggle alias in shell.el. This function has plenty of other
aliases already.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: dirtrack-toggle () vs. shell-dirtrack-mode (&optional arg)
2006-05-18 17:46 ` Stefan Monnier
@ 2006-05-18 17:51 ` Juanma Barranquero
0 siblings, 0 replies; 3+ messages in thread
From: Juanma Barranquero @ 2006-05-18 17:51 UTC (permalink / raw)
Cc: Emacs Devel
On 5/18/06, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> I think the problem is that we have two definitions.
Certainly, having a name that can be either a function, or an alias to
another function (in another module), seems prone to cause confusion
sooner or later...
--
/L/e/k/t/u
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-18 17:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-18 9:45 dirtrack-toggle () vs. shell-dirtrack-mode (&optional arg) Juanma Barranquero
2006-05-18 17:46 ` Stefan Monnier
2006-05-18 17:51 ` Juanma Barranquero
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.