From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=DATE_IN_PAST_12_24, DMARC_MISSING,INVALID_DATE,MAILING_LIST_MULTI,RDNS_DYNAMIC autolearn=no autolearn_force=no version=4.0.0 Received: from as1-4-5-1.han.s.bonet.se ([194.236.131.211] helo=bender.hallendal.net) by cvs.gentoo.org with esmtp (Exim 3.30 #1) id 162Xas-0006e2-00 for gentoo-dev@cvs.gentoo.org; Sat, 10 Nov 2001 05:50:42 -0700 Received: from zoidberg.hallendal.net (unknown [192.168.114.10]) by bender.hallendal.net (Postfix) with ESMTP id 95BE64DF0 for ; Sat, 10 Nov 2001 13:50:19 +0100 (CET) Subject: Re: [gentoo-dev] Emacs settings for ebuild scripts From: Mikael Hallendal To: gentoo-dev@cvs.gentoo.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/0.99.0 (Preview Release) Message-Id: <1005396613.10442.4.camel@zoidberg> Mime-Version: 1.0 Sender: gentoo-dev-admin@cvs.gentoo.org Errors-To: gentoo-dev-admin@cvs.gentoo.org X-BeenThere: gentoo-dev@cvs.gentoo.org X-Mailman-Version: 2.0 Precedence: bulk Reply-To: gentoo-dev@cvs.gentoo.org List-Help: List-Post: List-Subscribe: , List-Id: Gentoo Linux development list List-Unsubscribe: , List-Archive: Date: Sat Nov 10 05:51:02 2001 X-Original-Date: 10 Nov 2001 13:50:13 +0100 X-Archives-Salt: ac5222d6-0f2b-42b9-a40e-f8d8c6b6aea5 X-Archives-Hash: c7f630d76a0631b3d3e46ca8f0374eb0 tis 2001-11-06 klockan 19.38 skrev Andreas Voegele: > Hi! Hi! In Emacs21 I get an error when hitting TAB telling me I'm not in shell-script-mode. You know what's causing that? Regards, Mikael Hallendal > Ebuild writers may add the following Emacs Lisp code to their .emacs > file. The code adds an ebuild mode which is based on the shell mode > and sets the tabwidth to 4. > > (define-derived-mode ebuild-script-mode > sh-mode "Ebuild-script" > "Major mode for editing ebuild scripts. > \\{ebuild-mode-map}" > (setq tab-width 4)) > > (setq auto-mode-alist > (append > '(("\\.ebuild$" . ebuild-script-mode)) > auto-mode-alist)) > > I've tested this code with GNU Emacs. Can anyone check if the code > works with XEmacs? > > There's a patch for the Gentoo Linux Developers HOWTO attached to this > mail. The patch replaces the text "TODO: add stuff about emacs" with > the above code. > > ---- > > --- /mnt/gentoo/usr/portage/app-doc/gentoo-web/files/xml/gentoo-howto.xml Fri Oct 19 21:03:36 2001 > +++ gentoo-howto.xml Tue Nov 6 19:31:35 2001 > @@ -319,7 +319,20 @@ > set tabstop=4 shiftwidth=4 noexpandtab > endif > > -

TODO: add stuff about emacs.

> +

If you're using GNU Emacs, you can put the following code into your .emacs file.

> +
> +(define-derived-mode ebuild-script-mode
> +  sh-mode "Ebuild-script"
> +  "Major mode for editing ebuild scripts.
> +\\{ebuild-mode-map}"
> +  (setq tab-width 4))
> +
> +(setq auto-mode-alist
> +      (append
> +       '(("\\.ebuild$" . ebuild-script-mode))
> +       auto-mode-alist))
> +
> + > > >
-- Mikael Hallendal http://micke.hallendal.net/ Stockholm, Sweden Cell: +46 (0)709 718 918