how to restrict the numbers of chars in a buffer/file
Stephen J. Turnbull
stephen at xemacs.org
Wed Aug 2 23:16:47 EDT 2006
>>>>> "Uwe" == Uwe Brauer <oub at mat.ucm.es> writes:
Uwe> Thanks did not know about that one. Lets see whether I can
Uwe> manage.
For your use case, David's suggestion is far better than mine (I
focused on the "file" in "buffer/file"). Something very simple like
(defvar uwe-message-limit 155)
(lambda (&rest ignored) ; you may need to have correct
; dummy arguments here
(when (> (buffer-size) uwe-message-limit)
(warn "The message buffer has %d characters.
You should reduce it to %d characters or less."
(buffer-size) uwe-message-limit)))
should do as the hook function.
--
School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.
More information about the XEmacs-Beta
mailing list