Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bbn!jr@bbn.com From: jr@bbn.com (John Robinson) Newsgroups: gnu.emacs Subject: Re: different default for insert-buffer Message-ID: <40151@bbn.COM> Date: 18 May 89 19:40:02 GMT References: Sender: news@bbn.COM Reply-To: jr@bbn.com (John Robinson) Distribution: gnu.emacs comp.emacs mcd.emacs Organization: BBN Systems and Technologies Corporation, Cambridge MA Lines: 30 In-reply-to: lynn@rave.phx.mcd.mot.com (Lynn D. Newton) 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