[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automatic Mode Lines
This will do what you want done, but you have to bind it to a key. I
don't know of any "newly-generated-file-buffer-hook", but if you find
one, please tell me and hang something like this on it.
After about two minutes of hacking I cam up with the following info.
The zwei function which creates buffers is ZWEI:MAKE-BUFFER which
returns a buffer. This function is called by c-X c-F when the
file is not found. You can do
(TYPEP (SEND BUFFER :MAJOR-MODE) 'ZWEI:LISP-MODE)
(TYPEP (SEND BUFFER :GET :MAJOR-MODE) 'ZWEI:LISP-MODE)
(I don't remember which is correct) to find out whether the newly
created buffer is a lisp buffer. So I suggest that you ADVISE
ZWEI:MAKE-BUFFER to provide the "newly-generated-file-buffer-hook".
I would do it myself, but I don't have time today to hack such
code. (I already spent more time writing this message than it took
me to find out the above info.) Anyway, the usefull technique
for solving such problems (suggested to me by Neil Mayle, a consultant
to Symbolics) is to use (m-X) Edit Zmacs Command to get at the souce
of the ZWEI function and m-. from there until you find the function
which you want to modify.