Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!ukc!newcastle.ac.uk!rigg!jkw From: J.K.Wight@newcastle.ac.uk (Jim Wight) Newsgroups: gnu.emacs Subject: Re: different default for insert-buffer Message-ID: <4535@cheviot.newcastle.ac.uk> Date: 23 May 89 15:30:27 GMT References: <40151@bbn.COM> Sender: news@newcastle.ac.uk Distribution: gnu.emacs comp.emacs mcd.emacs Organization: Computing Laboratory, U of Newcastle upon Tyne, UK NE17RU Lines: 35 In article <40151@bbn.COM> jr@bbn.com (John Robinson) writes: >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. Or, instead of modifying simple.el, how about redefining insert-buffer in .emacs to use John's suggested prompt and then to pass on the response to the old insert-buffer's function body, viz. (make-symbol "ins-buf") (setq ins-buf (symbol-function 'insert-buffer)) (defun insert-buffer (buffer) (interactive (list (read-buffer "Insert buffer: " (other-buffer) t))) (funcall ins-buf buffer) ) Jim --- Computing Laboratory PHONE : +44 91 222 8238 University of Newcastle upon Tyne UUCP : ...!ukc!newcastle.ac.uk!J.K.Wight Newcastle upon Tyne JANET : J.K.Wight@uk.ac.newcastle UK, NE1 7RU ARPA : J.K.Wight@newcastle.ac.uk