🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #1998

combining major modes

#1998
From: Chris Moore
Date: Sat, 19 Dec 1992 13:47
41 lines
1722 bytes
kendall@lds.loral.com (Colin Kendall) said:

> Ok, I have default-major-mode set to vip-mode, and that works fine for
> many files; i.e. when I visit a file called foo.bar, I'm in vip-mode. But
> when the major mode is determined from auto-mode-alist, it throws me into
> a combination of the chosen mode (e.g. c-mode if the file ends with .c)
> and *Emacs* mode;

> It is possible to C-z and get into vip-mode, but that's annoying. How can
> I get around this.

I solved the problem by littering my .emacs with things like this:

(setq bibtex-mode-hook
      '(lambda ()
	(vip-change-mode-to-vi)))

(setq c-mode-hook
      '(lambda ()
	(vip-change-mode-to-vi)))

(setq cl-shell-mode-hook
      '(lambda ()
	(vip-change-mode-to-emacs)))

(setq emacs-lisp-mode-hook
      '(lambda ()
	(vip-change-mode-to-vi)))

Whenever you find emacs dumping you into -Emacs: mode for a particular
mode, look at the source code or documentation for that mode, find the
appropriate hook, and set it up so that it changes to the appropriate vip
state.

Chris.
--
moore@src.bae.co.uk   /      Chris Moore      \
                     / Sowerby Research Centre \
                     \  British Aerospace PLC  /
tel: +44 272 363375   \      BRISTOL, UK      /
Technical Details
Message-ID: <9212191347.AA09606@sun19.src.bae.co.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!src.bae.co.UK!moore
References: <1992Dec17.180743.15761@lds.loral.com>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.emacs.help
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!src.bae.co.UK!moore
From: moore@src.bae.co.UK (Chris Moore)
Subject: combining major modes
Message-ID: <9212191347.AA09606@sun19.src.bae.co.uk>
Sender: daemon@cis.ohio-state.edu
Organization: Gatewayed from the GNU Project mailing list help-gnu-emacs@prep.ai.mit.edu
References: <1992Dec17.180743.15761@lds.loral.com>
Date: Sat, 19 Dec 1992 13:47:41 GMT
Lines: 41