From: Andreas Voegele <voegelas@users.sourceforge.net>
To: gentoo-dev@cvs.gentoo.org
Subject: [gentoo-dev] Re: Emacs settings for ebuild scripts
Date: Sat Nov 10 07:18:01 2001 [thread overview]
Message-ID: <m27ksysodu.fsf@columbus.localdomain> (raw)
In-Reply-To: <1005396613.10442.4.camel@zoidberg>
Mikael Hallendal writes:
> In Emacs21 I get an error when hitting TAB telling me I'm not in
> shell-script-mode. You know what's causing that?
I don't know if this is a feature or a bug in Emacs 21. The function
sh-must-be-shell-mode in sh-script.el looks like this:
(defun sh-must-be-shell-mode ()
"Signal an error if not in Shell-script mode."
(unless (eq major-mode 'sh-mode)
(error "This buffer is not in Shell-script mode")))
IMHO the expression (eq major-mode 'sh-mode) should be replaced with
(derived-mode-p 'sh-mode).
I'll ask the Emacs developers.
In the meanwhile the following code, which includes an advice for
sh-must-be-shell-mode, can be used:
(define-derived-mode ebuild-script-mode
sh-mode "Ebuild-script" nil
(setq tab-width 4))
(setq auto-mode-alist
(append
'(("\\.ebuild$" . ebuild-script-mode))
auto-mode-alist))
(defadvice sh-must-be-shell-mode
(around sh-must-be-shell-mode-around activate)
"Accept modes derived from sh-mode."
(unless (derived-mode-p 'sh-mode)
ad-do-it))
--
Andreas
prev parent reply other threads:[~2001-11-10 14:17 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 ` [gentoo-dev] " Mikael Hallendal
2001-11-10 7:18 ` Andreas Voegele [this message]
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=m27ksysodu.fsf@columbus.localdomain \
--to=voegelas@users.sourceforge.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