unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* `turn-on-eldoc-mode' obsolete?
@ 2014-04-10 11:07 Rüdiger Sonderfeld
  2014-04-10 11:12 ` Tassilo Horn
  0 siblings, 1 reply; 4+ messages in thread
From: Rüdiger Sonderfeld @ 2014-04-10 11:07 UTC (permalink / raw)
  To: emacs-devel; +Cc: monnier

Hello,

in r116095 the function `turn-on-eldoc-mode' was replaced by an alias for 
`eldoc-mode' and marked obsolete.  There was no entry in the ChangeLog for 
this and I don't understand the reason.  It seems several minor modes provide 
a `turn-on' function to avoid the toggling behaviour of the minor mode command 
(e.g., turn-on-auto-fill, turn-on-flyspell, etc.).  Which is quite useful for 
mode hooks.

I think `turn-on-eldoc-mode' should be restored or there should be a common 
decision on `turn-on-*' functions for minor modes.

Regards,
Rüdiger




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: `turn-on-eldoc-mode' obsolete?
  2014-04-10 11:07 `turn-on-eldoc-mode' obsolete? Rüdiger Sonderfeld
@ 2014-04-10 11:12 ` Tassilo Horn
  2014-04-10 11:22   ` Rüdiger Sonderfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Tassilo Horn @ 2014-04-10 11:12 UTC (permalink / raw)
  To: Rüdiger Sonderfeld; +Cc: monnier, emacs-devel

Rüdiger Sonderfeld <ruediger@c-plusplus.de> writes:

Hi Rüdiger,

> in r116095 the function `turn-on-eldoc-mode' was replaced by an alias
> for `eldoc-mode' and marked obsolete.  There was no entry in the
> ChangeLog for this and I don't understand the reason.  It seems
> several minor modes provide a `turn-on' function to avoid the toggling
> behaviour of the minor mode command (e.g., turn-on-auto-fill,
> turn-on-flyspell, etc.).  Which is quite useful for mode hooks.

It used to be but not anymore.  Now all minor-modes defined with
`define-minor-mode' (which see) are turned on when passed no argument.
Thus

  (add-hook 'some-mode-hook #'some-minor-mode)

will always enable some-minor-mode.

The toggling behavior is only active in interactive calls or from lisp
if you provide 'toggle as argument.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: `turn-on-eldoc-mode' obsolete?
  2014-04-10 11:12 ` Tassilo Horn
@ 2014-04-10 11:22   ` Rüdiger Sonderfeld
  2014-04-10 11:37     ` Tassilo Horn
  0 siblings, 1 reply; 4+ messages in thread
From: Rüdiger Sonderfeld @ 2014-04-10 11:22 UTC (permalink / raw)
  To: emacs-devel; +Cc: monnier, Tassilo Horn

Hi,

On Thursday 10 April 2014 13:12:46 Tassilo Horn wrote:
> It used to be but not anymore.  Now all minor-modes defined with
> `define-minor-mode' (which see) are turned on when passed no argument.
> Thus
> 
>   (add-hook 'some-mode-hook #'some-minor-mode)
> 
> will always enable some-minor-mode.
> 
> The toggling behavior is only active in interactive calls or from lisp
> if you provide 'toggle as argument.

that makes sense.  So all `turn-on-*' functions should eventually be removed?

Regards,
Rüdiger




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: `turn-on-eldoc-mode' obsolete?
  2014-04-10 11:22   ` Rüdiger Sonderfeld
@ 2014-04-10 11:37     ` Tassilo Horn
  0 siblings, 0 replies; 4+ messages in thread
From: Tassilo Horn @ 2014-04-10 11:37 UTC (permalink / raw)
  To: Rüdiger Sonderfeld; +Cc: monnier, emacs-devel

Rüdiger Sonderfeld <ruediger@c-plusplus.de> writes:

Hi Rüdiger,

>> It used to be but not anymore.  Now all minor-modes defined with
>> `define-minor-mode' (which see) are turned on when passed no
>> argument.  Thus
>> 
>>   (add-hook 'some-mode-hook #'some-minor-mode)
>> 
>> will always enable some-minor-mode.
>> 
>> The toggling behavior is only active in interactive calls or from lisp
>> if you provide 'toggle as argument.
>
> that makes sense.  So all `turn-on-*' functions should eventually be
> removed?

Yes, I guess so.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-10 11:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-10 11:07 `turn-on-eldoc-mode' obsolete? Rüdiger Sonderfeld
2014-04-10 11:12 ` Tassilo Horn
2014-04-10 11:22   ` Rüdiger Sonderfeld
2014-04-10 11:37     ` Tassilo Horn

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).