Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!ucbvax!tut.cis.ohio-state.edu!sun.com!peck From: peck@sun.com (Jeff Peck) Newsgroups: gnu.emacs.bug Subject: setting the modification-flag Message-ID: <8909191818.AA21562@denali.sun.com> Date: 19 Sep 89 18:18:11 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 14 Sometimes i really want to write the buffer to a file, even if it is not obviously modified. Maybe i have just visited a new file and want to save it with 0 length. On some days I would use "xDEL" (ie insert a char and delete it), but that mucks up the Undo record. This simple, upward compatible change to "not-modified" does the trick. in files.el: (defun not-modified (&optional arg) "Mark current buffer as unmodified, not needing to be saved. With prefix arg, mark buffer as modified, so save-buffer {\\[save-buffer]} will work." (interactive "P") (message (if arg "Modification-flag set" "Modification-flag cleared")) (set-buffer-modified-p arg))