emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: table-recognize and default-major-mode


From: Tak Ota
Subject: Re: table-recognize and default-major-mode
Date: Thu, 04 Aug 2005 13:14:05 -0700 (PDT)

Thank you for enlightening my ignorance.  Could someone further
educate me regarding my next two questions?

What is the rational behind this default-major-mode design that runs
hooks on a premature buffer?

Isn't it a design flaw to run a hook twice (before and after buffer
setup) in this case?  Or do all hooks responsible to determine which
stage (pre or post setup) it is running at?

-Tak

Thu, 4 Aug 2005 12:57:32 -0700: "Luc Teirlinck" <address@hidden> wrote:

> Tak Ota wrote:
> 
>    Why the hook is executed before the buffer content is ready is beyond
>    my knowledge but I believe the clue is outside of table.el code.
> 
> It certainly is documented in the default-major-mode docstring:
> 
>     When a mode is used by default, `find-file' switches to it
>     before it reads the contents into the buffer and before
>     it finishes setting up the buffer.  Thus, the mode and
>     its hooks should not expect certain variables such as
>     `buffer-read-only' and `buffer-file-coding-system' to be set up.
> 
> Sincerely,
> 
> Luc.





reply via email to

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