home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / help-lucid-emacs / text0378.txt < prev    next >
Encoding:
Text File  |  1993-07-14  |  1.2 KB  |  38 lines

  1. I am using the following function to create a new mode dependent screen for buffers:
  2.  
  3. (defun find-file-new-screen-with-mode-dependent-name (filename)
  4.   "Just like find-file, but creates a new screen for it first, if it isn't 
  5.    displayed yet. The name of the screen depends on the major-mode of
  6.    the buffer."
  7.   (interactive  ."FFind file in new screen: ")
  8.   (let* ((buf (find-file-noselect filename))
  9.      (scr (get-screen-for-buffer buf)))
  10.     (if scr  (select-screen scr))
  11.     (switch-to-buffer buf)))
  12.  
  13.  
  14.  
  15. In my .emacs file I load 
  16. (require 'fib-menubar)
  17.  
  18. If I put
  19. (find-file-new-screen-with-mode-dependent-name ".")
  20. in .emacs and start lucid just with 
  21. lucid 
  22. (in order to get the *scratch* buffer) I do 
  23. not get the fib-menubar in the *scratch* buffer until I click on the menubar. 
  24. Everything works fine if I do not open a buffer having pending messages like
  25. *scratch*. 
  26. A very similar problem appears if I try to open vm in a separate screen at 
  27. startup as long as I don't set vm-inhibit-startup-message.
  28.  
  29. Does anybody know a fix for that?
  30.  
  31.  
  32. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  33. ;
  34. ; please send your comments to pth@ibm-1.mpa-garching.mpg.de
  35. ;
  36. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  37.  
  38.