Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sunybcs!boulder!hao!oddjob!gargoyle!ihnp4!inuxc!iuvax!pur-ee!uiucdcs!uiucdcsb!hammer From: hammer@uiucdcsb.UUCP Newsgroups: comp.emacs Subject: Re: gnuemacs quesion: what does (put 'x Message-ID: <165400023@uiucdcsb> Date: Tue, 1-Sep-87 11:47:00 EDT Article-I.D.: uiucdcsb.165400023 Posted: Tue Sep 1 11:47:00 1987 Date-Received: Fri, 4-Sep-87 00:46:40 EDT References: <740@hplabsz.HPL.HP.COM> Lines: 44 Nf-ID: #R:hplabsz.HPL.HP.COM:740:uiucdcsb:165400023:000:1657 Nf-From: uiucdcsb.cs.uiuc.edu!hammer Sep 1 10:47:00 1987 /* Written 8:12 pm Aug 30, 1987 by mayer@hplabsz.HPL.HP.COM in uiucdcsb:comp.emacs */ /* ---------- "gnuemacs quesion: what does (put 'x" ---------- */ <...> Oh yeah, and while I've got your attention let me ask another question: what is it about the buffers created by shell-command, dired, etc. that allows kill-buffer to delete the buffer without querying the user with "Buffer xyzzy modified; kill anyway?". If one evals buffer-modified-p in that buffer, it will return 't', yet kill-buffer rightly kills these buffers without asking. <...> kill-buffer does /* Make sure b->text.modified is correct even if buffer is selected now. */ bf_cur->text.modified = bf_modified; if (INTERACTIVE && !NULL (b->filename) && b->text.modified > b->save_modified) { tem = Fyes_or_no_p (format1 ("Buffer %s modified; kill anyway? ", XSTRING (b->name)->data)); if (NULL (tem)) return Qnil; } in order to query the user about killing a modified buffer. -- Niels Mayer Hewlett-Packard Laboratories. PS: Please post any followups to this article. There's no point in keeping this information a secret. /* End of text from uiucdcsb:comp.emacs */ You answered your own question. A *shell* buffer (for example) has no associated file, so b->filename is null. David Hammerslag University of Illinois at Urbana-Champaign hammer@a.cs.uiuc.edu (ARPA) hammer@uiuc.csnet (CSNET) {pur-ee, ihnp4}!uiucdcs!hammer (USENET)