public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mikael Hallendal <micke@hallendal.net>
To: gentoo-dev@cvs.gentoo.org
Subject: Re: [gentoo-dev] Emacs settings for ebuild scripts
Date: Sat Nov 10 05:51:02 2001	[thread overview]
Message-ID: <1005396613.10442.4.camel@zoidberg> (raw)
In-Reply-To: <m2g07riw2j.fsf@columbus.localdomain>

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
>  </pre>
> -<p>TODO: add stuff about emacs.</p></body>
> +<p>If you're using GNU Emacs, you can put the following code into your .emacs file.</p>
> +<pre>
> +(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))
> +</pre>
> +</body>
>  </section>
>  
>  <section>
-- 
Mikael Hallendal              http://micke.hallendal.net/
Stockholm, Sweden             Cell: +46 (0)709 718 918







  parent reply	other threads:[~2001-11-10 12:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m2g07riw2j.fsf@columbus.localdomain>
2001-11-09 17:39 ` [gentoo-dev] Re: Emacs settings for ebuild scripts Andreas Voegele
2001-11-10  5:51 ` Mikael Hallendal [this message]
2001-11-10  7:18   ` Andreas Voegele

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1005396613.10442.4.camel@zoidberg \
    --to=micke@hallendal.net \
    --cc=gentoo-dev@cvs.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox