emacs-devel
[Top][All Lists]
Advanced

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

dirtrack-toggle () vs. shell-dirtrack-mode (&optional arg)


From: Juanma Barranquero
Subject: dirtrack-toggle () vs. shell-dirtrack-mode (&optional arg)
Date: Thu, 18 May 2006 11:45:27 +0200

After this:

2006-05-17  Stefan Monnier  <address@hidden>

       * 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




reply via email to

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