Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!ames!coherent!NeXT!sync From: info-gnu-emacs-request@prep.ai.mit.edu Newsgroups: gnu.emacs Subject: Re: different default for insert-buffer Message-ID: <3844@sunset.NeXT.UUCP> Date: 6 Jun 89 00:35:21 GMT Sender: sync@NeXT.UUCP Organization: NeXT Inc., Palo Alto Lines: 32 From: root@unix.sri.com (John Robinson) In article , lynn@rave (Lynn D. Newton) writes: >I'm using GNU Emacs 18.54. > >When I execute insert-buffer, the prompt "Insert buffer: (default ...)" >asks me for the current buffer. This seems like a strange >default. Why would I want to duplicate the current buffer? >Usually I want to insert _another_ buffer, frequently the last >one I visited. Is there some variable out there I can set to >change the default, especially one that knows which buffer I was >in last? This same thing has been annoying me lately. Mayne this is motivation to fix it. In the definition of insert-buffer (in simple.el), it has the following: (interactive "*bInsert buffer: ") The b argumnet type says get an emacs buffer, and interactive's default is the buffer you called the function from. This is right (I feel) for kill-buffer, but not insert-buffer. You have to use the more elaborate form of interactive: (interactive (list (read-buffer "Insert buffer: " (other-buffer) t)) If you prefer a default other than (other-buffer), replace that form. -- /jr, nee John Robinson What a waste it is to lose one's mind--or not jr@bbn.com or bbn!jr to have a mind. How true that is. -Dan Quayle