[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem of define-minor-mode while bootstrapping
From: |
Stefan Monnier |
Subject: |
Re: problem of define-minor-mode while bootstrapping |
Date: |
Fri, 20 Sep 2002 14:38:08 -0400 |
> >> Here's the last few lines of define-minor-mode.
> >>
> >> ;; If the mode is global, call the function according to the
> >> default.
> >> ,(if globalp
> >> `(if (and load-file-name ,mode)
> >> (eval-after-load load-file-name '(,mode 1)))))))
> >>
> >> Could someone please fix this problem at first?
>
> > Update your sandbox, I've fixed it a few days ago AFAIK,
>
> Do you mean this change?
>
> * emacs-lisp/easy-mmode.el (define-minor-mode): Add a :require arg.
> Don't call the function during init if mode is on by default.
>
> ***************
> *** 224,230 ****
> (symbol-value ',keymap-sym))))
>
> ;; If the mode is global, call the function according to the default.
> ! ,(if globalp
> `(if (and load-file-name ,mode)
> (eval-after-load load-file-name '(,mode 1)))))))
>
> --- 227,233 ----
> (symbol-value ',keymap-sym))))
>
> ;; If the mode is global, call the function according to the default.
> ! ,(if (and globalp (null init-value))
> `(if (and load-file-name ,mode)
> (eval-after-load load-file-name '(,mode 1)))))))
>
>
> Could you please install it in RC too if that causes no
> problem?
>
> But, it seems that, with this, if :init-value is t, the
> function to do various settings to make the mode work is
> never called.
Do you mean that you'd rather see
,(if globalp
`(if (and load-file-name (not (equal ,mode ,init-value)))
(eval-after-load load-file-name
'(,mode (if ,mode 1 -1)))))
I'm not sure it's worth the trouble. The reason for this little piece
of code is so as to call (foo-mode 1) when people do (setq foo-mode t)
in their .emacs and then load foo-mode.el.
But people shouldn't use (setq foo-mode t), they should use (foo-mode 1)
instead anyway.
So I'd rather use that code less often rather than more often.
Stefan
- problem of define-minor-mode while bootstrapping, Kenichi Handa, 2002/09/19
- Re: problem of define-minor-mode while bootstrapping, Stefan Monnier, 2002/09/19
- Re: problem of define-minor-mode while bootstrapping, Kenichi Handa, 2002/09/19
- Re: problem of define-minor-mode while bootstrapping,
Stefan Monnier <=
- Re: problem of define-minor-mode while bootstrapping, Kenichi Handa, 2002/09/20
- Re: problem of define-minor-mode while bootstrapping, Stefan Monnier, 2002/09/22
- Re: problem of define-minor-mode while bootstrapping, Kenichi Handa, 2002/09/22
- Re: problem of define-minor-mode while bootstrapping, Stefan Monnier, 2002/09/23
- Re: problem of define-minor-mode while bootstrapping, Kenichi Handa, 2002/09/23
- Re: problem of define-minor-mode while bootstrapping, Stefan Monnier, 2002/09/24
- Re: problem of define-minor-mode while bootstrapping, Kenichi Handa, 2002/09/24
- Re: problem of define-minor-mode while bootstrapping, Miles Bader, 2002/09/20
- Re: problem of define-minor-mode while bootstrapping, Richard Stallman, 2002/09/22
- Re: problem of define-minor-mode while bootstrapping, Dave Love, 2002/09/25