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

Re: Automatic Mode Lines



    Date: Wed, 2 Dec 87 09:55 EST
    From: "Jeffrey Mark Siskind" <Qobi@ZERMATT.LCS.MIT.EDU>

	> Does anyone have a hack that automatically inserts a mode line in a newly
	> created LISP mode buffer?  If not, is there an undocumented feature of
	> ZMACS that does the same?

	How about putting the following in your init file:

	(DEFUN FOO ()  (ZWEI:UPDATE-ATTRIBUTE-LIST-INTERNAL ZWEI:*INTERVAL*))

	(SETF ZWEI:LISP-MODE-HOOK 'FOO)

    The problem with the above hack is that when you read in an existing .lisp
    file, it sets the file modified flag for the buffer even if the the
    attribute line remains unchanged. Anybody have a better solution?
	    Jeff

Yes, there is a solution, but, it's not the elegant way:  (flavor:method
:revert-internal zwei:file-buffer-mixin) defined in SYS:ZWEI;ZMACS.LISP
handles the FS:FILE-NOT-FOUND message, which is responsible for creating
new buffer's "(New File)", if c-X c-F doesn't find the file. One may add
the call to #'zwei:update-attribute-list-internal here in order to get
the attribute line set.

	--jc