home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / emacs / help / 3880 < prev    next >
Encoding:
Text File  |  1992-08-29  |  959 b   |  33 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!decwrl!parc!news!delacour
  3. From: delacour@waxwing.parc.xerox.com (Vincent Delacour)
  4. Subject: switch-to-buffer : how to require an existing buffer ??
  5. Message-ID: <DELACOUR.92Aug26115023@waxwing.parc.xerox.com>
  6. Sender: news@parc.xerox.com
  7. Organization: Xerox PARC, Palo Alto, CA
  8. Date: 26 Aug 92 11:50:23
  9. Lines: 22
  10.  
  11.  
  12.  
  13. Hi, 
  14.  
  15. Does somebody know the right way to have switch-to-buffer and 
  16. switch-to-buffer-other-window require an existing buffer ? 
  17.  
  18. Thanks in advance, 
  19.  
  20.     Vincent
  21.  
  22. ps: this is what I've tried. This works superfiocially, but the
  23. default buffer proposed by switch-to-buffer is now almost always the
  24. current buffer, which is not really satisfactory. In fact, both the
  25. solution and the reason why the simple function below does not work
  26. would interest me. Thanks again.
  27.  
  28. (defun my-switch-to-buffer (bu)
  29.    ;;  require an existing buffer
  30.    (interactive "bSwitch to buffer: ") 
  31.    (switch-to-buffer bu t))
  32.  
  33.