[Top][All Lists]

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

Re: How to automatically write *Messages" buffer to a file?

From: Stefan Monnier
Subject: Re: How to automatically write *Messages" buffer to a file?
Date: Wed, 24 Nov 2004 20:16:30 GMT
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

>   (make-variable-buffer-local 'after-change-functions)

Never use `make-variable-buffer-local' on a variable which belongs to some
other package.  You want to use `make-local-variable' instead.

Note that in the above case you don't need either of them because
after-change-functions is already automatically made buffer-local.  And even
if you wanted to make it buffer-local manually, you shouldn't use
make-local-variable but make-local-hook since after-change-functions is
a hook.

>   (setq after-change-functions
>          '(log-message))
>   (setq after-change-functions nil)

Never use `setq' on a hook.  Use `add-hook' or `remove-hook'.


PS: As for your question, don't use `append-to-file', use `write-region'
instead, and pass `quiet' as the VISIT argument to prevent the message.

reply via email to

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