home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / gnu / emacs / help / 5131 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.6 KB  |  53 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!cis.ohio-state.edu!src.bae.co.UK!moore
  3. From: moore@src.bae.co.UK (Chris Moore)
  4. Subject: combining major modes
  5. Message-ID: <9212191347.AA09606@sun19.src.bae.co.uk>
  6. Sender: daemon@cis.ohio-state.edu
  7. Organization: Gatewayed from the GNU Project mailing list help-gnu-emacs@prep.ai.mit.edu
  8. References: <1992Dec17.180743.15761@lds.loral.com>
  9. Date: Sat, 19 Dec 1992 13:47:41 GMT
  10. Lines: 41
  11.  
  12.  
  13. kendall@lds.loral.com (Colin Kendall) said:
  14.  
  15. > Ok, I have default-major-mode set to vip-mode, and that works fine for
  16. > many files; i.e. when I visit a file called foo.bar, I'm in vip-mode. But
  17. > when the major mode is determined from auto-mode-alist, it throws me into
  18. > a combination of the chosen mode (e.g. c-mode if the file ends with .c)
  19. > and *Emacs* mode;
  20.  
  21. > It is possible to C-z and get into vip-mode, but that's annoying. How can
  22. > I get around this.
  23.  
  24. I solved the problem by littering my .emacs with things like this:
  25.  
  26. (setq bibtex-mode-hook
  27.       '(lambda ()
  28.     (vip-change-mode-to-vi)))
  29.  
  30. (setq c-mode-hook
  31.       '(lambda ()
  32.     (vip-change-mode-to-vi)))
  33.  
  34. (setq cl-shell-mode-hook
  35.       '(lambda ()
  36.     (vip-change-mode-to-emacs)))
  37.  
  38. (setq emacs-lisp-mode-hook
  39.       '(lambda ()
  40.     (vip-change-mode-to-vi)))
  41.  
  42. Whenever you find emacs dumping you into -Emacs: mode for a particular
  43. mode, look at the source code or documentation for that mode, find the
  44. appropriate hook, and set it up so that it changes to the appropriate vip
  45. state.
  46.  
  47. Chris.
  48. --
  49. moore@src.bae.co.uk   /      Chris Moore      \
  50.                      / Sowerby Research Centre \
  51.                      \  British Aerospace PLC  /
  52. tel: +44 272 363375   \      BRISTOL, UK      /
  53.