Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!hplabsz!mayer From: mayer@hplabsz.UUCP Newsgroups: comp.emacs Subject: gnuemacs quesion: what does (put 'xxxx-mode 'mode-class 'special) do? Message-ID: <740@hplabsz.HPL.HP.COM> Date: Sun, 30-Aug-87 21:12:57 EDT Article-I.D.: hplabsz.740 Posted: Sun Aug 30 21:12:57 1987 Date-Received: Tue, 1-Sep-87 00:43:16 EDT Reply-To: mayer@hplabsz.UUCP (Niels Mayer) Organization: Hewlett-Packard Laboratories Lines: 45 a few examples of where the mode-class property is used: blackbox.el :: (put 'blackbox-mode 'mode-class 'special) buff-menu.el :: (put 'buffer-menu-mode 'mode-class 'special) dired.el :: (put 'dired-mode 'mode-class 'special) ebuff-menu.el :: (put 'Electric-buffer-menu-mode 'mode-class 'special) Can someone explain why this is done? 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. In buffer.c, buffer-modified-p does bf_cur->text.modified = bf_modified; return buf->save_modified < buf->text.modified ? Qt : Qnil; to return 't' or 'nil' depending on whether the buffer has been modified. 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.