unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* term-setup-hook v tty-setup-hook v emacs-startup-hook
@ 2014-02-24  8:17 Glenn Morris
  2014-02-24 13:06 ` Juanma Barranquero
  2014-02-24 20:03 ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Glenn Morris @ 2014-02-24  8:17 UTC (permalink / raw)
  To: emacs-devel


Trying to document the new tty-setup-hook, I found it confusing that
Emacs now has both term-setup-hook and tty-setup-hook, with similar
names and descriptions.

On inspection, term-setup-hook seems to serve no purpose.
It is run by startup.el immediately after emacs-startup-hook.
So anything that you might want to use term-setup-hook for,
you could just as well use emacs-startup-hook instead.

I think it would be less confusing if term-setup-hook were made
obsolete (and undocumented) in favour of emacs-startup-hook.

(tty-setup-hook is a bit different.)



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

* Re: term-setup-hook v tty-setup-hook v emacs-startup-hook
  2014-02-24  8:17 term-setup-hook v tty-setup-hook v emacs-startup-hook Glenn Morris
@ 2014-02-24 13:06 ` Juanma Barranquero
  2014-02-24 16:57   ` Glenn Morris
  2014-02-24 20:03 ` Stefan Monnier
  1 sibling, 1 reply; 6+ messages in thread
From: Juanma Barranquero @ 2014-02-24 13:06 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Emacs developers

On Mon, Feb 24, 2014 at 9:17 AM, Glenn Morris <rgm@gnu.org> wrote:

> On inspection, term-setup-hook seems to serve no purpose.
> It is run by startup.el immediately after emacs-startup-hook.
> So anything that you might want to use term-setup-hook for,
> you could just as well use emacs-startup-hook instead.

Yes. They are conceptually different, but for all purposes they're identical.

> I think it would be less confusing if term-setup-hook were made
> obsolete (and undocumented) in favour of emacs-startup-hook.

Agreed. We run at least five hooks during initialization. If we can
reduce that to four without losing functionality, that's a net gain.

So we should simply do

(define-obsolete-variable-alias 'term-setup-hook 'emacs-startup-hook "24.4")

and of course fix the "The Init File" and "Terminal-Specific
Initialization" nodes of the Elisp manual.



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

* Re: term-setup-hook v tty-setup-hook v emacs-startup-hook
  2014-02-24 13:06 ` Juanma Barranquero
@ 2014-02-24 16:57   ` Glenn Morris
  2014-02-24 17:14     ` Juanma Barranquero
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2014-02-24 16:57 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs developers

Juanma Barranquero wrote:

> (define-obsolete-variable-alias 'term-setup-hook 'emacs-startup-hook "24.4")

I don't believe we can literally do that, since term-setup-hook runs
after emacs-startup-hook.
So s/define-obsolete-variable-alias/make-obsolete-variable.



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

* Re: term-setup-hook v tty-setup-hook v emacs-startup-hook
  2014-02-24 16:57   ` Glenn Morris
@ 2014-02-24 17:14     ` Juanma Barranquero
  2014-02-24 17:26       ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Juanma Barranquero @ 2014-02-24 17:14 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Emacs developers

On Mon, Feb 24, 2014 at 5:57 PM, Glenn Morris <rgm@gnu.org> wrote:

> I don't believe we can literally do that, since term-setup-hook runs
> after emacs-startup-hook.

Do you mean that there could be code that depends on term-setup-hook
running after emacs-startup-hook? Well, yes, it is theoretically
possible. Unlikely, I think.

But yes, you're right, make-obsolete-variable is safer.



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

* Re: term-setup-hook v tty-setup-hook v emacs-startup-hook
  2014-02-24 17:14     ` Juanma Barranquero
@ 2014-02-24 17:26       ` Glenn Morris
  0 siblings, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2014-02-24 17:26 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs developers

Juanma Barranquero wrote:

> Do you mean that there could be code that depends on term-setup-hook
> running after emacs-startup-hook?

Yes, that's what I meant.

>  Well, yes, it is theoretically possible. Unlikely, I think.

I agree, but think we might as well take account of the possibility.



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

* Re: term-setup-hook v tty-setup-hook v emacs-startup-hook
  2014-02-24  8:17 term-setup-hook v tty-setup-hook v emacs-startup-hook Glenn Morris
  2014-02-24 13:06 ` Juanma Barranquero
@ 2014-02-24 20:03 ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2014-02-24 20:03 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

> I think it would be less confusing if term-setup-hook were made
> obsolete (and undocumented) in favour of emacs-startup-hook.

Sounds good.


        Stefan



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

end of thread, other threads:[~2014-02-24 20:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-24  8:17 term-setup-hook v tty-setup-hook v emacs-startup-hook Glenn Morris
2014-02-24 13:06 ` Juanma Barranquero
2014-02-24 16:57   ` Glenn Morris
2014-02-24 17:14     ` Juanma Barranquero
2014-02-24 17:26       ` Glenn Morris
2014-02-24 20:03 ` Stefan Monnier

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).