[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Bugs in lisp/hl-line.el.
From: |
Stefan Monnier |
Subject: |
Re: [PATCH] Bugs in lisp/hl-line.el. |
Date: |
Sun, 04 May 2003 13:22:02 -0400 |
> > Quite right. I'd use (lambda () (hl-line-mode 1)) rather than
> > giving it a name and a docstring.
>
> I actually like giving it a name. I often automatically turn a minor
> mode on by using a major mode hook. When I don't like this behavior
> on second thought, it's possible to remove the turn-on-minor-mode
> function again from the hook variable. Had I used a lambda
> expression, I would have had to RESTART Emacs. ;-)
You can remove lambda expressions from hooks.
The equality test uses `equal' AFAIK.
> I'm in favor of letting the define-minor-mode macro generate
> turn-on-minor-mode and turn-off-minor-mode functions automatically.
The turn-mode-off function would be virtually never used.
And the toggling behavior is also basically never used either.
So my Emacs just uses foo-minor-mode as turn-mode-on function
(the toggling behavior still works interactively because
it passes a `toggle' argument).
This fixes the bug where users do (add-hook 'foo-mode 'bar-minor-mode)
without realizing that it might turn the mode off.
But this apparently incompatible change is not very popular among
emacs-devel crowd, it seems :-(
> Shall it write a new patch, one that does the same as my previous
> patch, but leaves the test for hl-minor-mode intact?
Do you have write access to the repository ?
If not, you probably should try and get it since IIRC you have signed
the relevant paperwork already.
Stefan