Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!WHEATIES.AI.MIT.EDU!tower From: tower@WHEATIES.AI.MIT.EDU (Leonard H. Tower Jr.) Newsgroups: gnu.emacs.bug Subject: [mcvax!diku.dk!seindal@uunet.uu.net: A minor patch to emacs] Message-ID: <8901100150.AA02627@wheat-chex.ai.mit.edu> Date: 10 Jan 89 01:50:52 GMT Sender: news@tut.cis.ohio-state.edu Reply-To: mcvax!diku.dk!seindal@uunet.uu.net Distribution: gnu Organization: GNUs Not Usenet Lines: 73 Return-Path: From: mcvax!diku.dk!seindal@uunet.uu.net To: The GNU hackers Slyrf: Heck, Yes! Subject: A minor patch to emacs Date: Thu, 05 Jan 89 14:56:32 +0100 Hi, All these silly messages about "buffer has shrunk a lot; not auto-saving" has been annoying me a lot, so I made this little change to fileio.c, so the messages are controlled by a lisp variable. If auto-save-no-complaints is set to non-nil, buffers will be auto-saved no matter how much they have shrunk. Unfortunately, it doesn't quite work if auto-save-no-complaints is made buffer-local. In that case all buffers are tested against the current buffers value. I don't really know how to fix this, so if any of you can help, I would appreciate it. I can live with it as it is now, but the ability to make it buffer-local would be a nice feature. Rene' Seindal, University of Copenhagen, Denmark. (seindal@diku.dk) ------------------------------------------------------------------------ *** /tmp/,RCSt1a04625 Thu Jan 5 14:37:01 1989 --- src/fileio.c Tue Jan 3 16:53:06 1989 *************** *** 75,80 **** --- 75,85 ---- start out by inserting the default directory into the minibuffer. */ int insert_default_directory; + /* Rene' Seindal (seindal@sleipner) Sat Dec 10 22:06:42 1988 */ + /* Nonzero means we do not want ANY complaints about shrunk buffers + from do-auto-save. */ + int auto_save_no_complaints; + /* On VMS, nonzero means write new files with record format stmlf. Zero means use var format. */ int vms_stmlf_recfm; *************** *** 1922,1929 **** && b->save_modified < b->text.modified && b->auto_save_modified < b->text.modified) { ! if ((XFASTINT (b->save_length) * 10 ! > (b->text.size1 + b->text.size2) * 13) /* These messages are frequent and annoying for `*mail*'. */ && !EQ (b->filename, Qnil)) { --- 1927,1936 ---- && b->save_modified < b->text.modified && b->auto_save_modified < b->text.modified) { ! if (auto_save_no_complaints == 0 ! /* These messages are frequent and annoying. */ ! && (XFASTINT (b->save_length) * 10 ! > (b->text.size1 + b->text.size2) * 13) /* These messages are frequent and annoying for `*mail*'. */ && !EQ (b->filename, Qnil)) { *************** *** 2132,2137 **** --- 2139,2148 ---- DEFVAR_BOOL ("insert-default-directory", &insert_default_directory, "*Non-nil means when reading a filename start with default dir in minibuffer."); insert_default_directory = 1; + + DEFVAR_BOOL ("auto-save-no-complaints", &auto_save_no_complaints, + "*Non-nil means do-auto-save will never complain about shrunk buffers."); + auto_save_no_complaints = 0; DEFVAR_BOOL ("vms-stmlf-recfm", &vms_stmlf_recfm, "*Non-nil means write new files with record format `stmlf'.\n\