Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 152687 - Ebuild HOWTO: Improve code listing 5 (emacsrc)
Summary: Ebuild HOWTO: Improve code listing 5 (emacsrc)
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Other documents (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Community Relations Team
URL: http://www.gentoo.org/proj/en/devrel/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-24 11:50 UTC by Christian Schlotter
Modified: 2007-06-23 20:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for updating the xml file. (hb-guide-ebuild.diff,1.06 KB, patch)
2006-10-24 13:01 UTC, Christian Schlotter
Details | Diff
Patch for updating the xml file. (patch,1.29 KB, patch)
2006-10-24 13:11 UTC, Christian Schlotter
Details | Diff
hb-guide-ebuild.xml.diff (hb-guide-ebuild.xml.diff,1.10 KB, patch)
2007-06-23 19:38 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Schlotter 2006-10-24 11:50:39 UTC
Hi!

After upgrading to GNU Emacs 22 I noticed that my editor stopped inserting tabs in ebuild mode.  Specifing this explicitly in the function solves the issue:

[code listing begin]
(defun ebuild-mode ()
  (shell-script-mode)
  (sh-set-shell "bash")
  (make-local-variable 'tab-width)
  (setq tab-width 4)
  (make-local-variable 'indent-tabs-mode)
  (setq indent-tabs-mode t))
(add-to-list 'auto-mode-alist '("\\.ebuild$" . ebuild-mode))
(add-to-list 'auto-mode-alist '("\\.eclass$" . ebuild-mode))
[code listing end]

I also changed the way auto-mode-alist is extended.

Unfortunately I could not find the xml source of the handbook, so pardon me for not attaching a diff.

Regards
Christian
Comment 1 Jan Kundrát (RETIRED) gentoo-dev 2006-10-24 11:55:29 UTC
The respective XML source is available from http://www.gentoo.org/proj/en/devrel/handbook/hb-guide-ebuild.xml?passthru=1 . I guess you don't have to make the patch yourself, though. Reassigning to the owner of devrel handbook.
Comment 2 Christian Schlotter 2006-10-24 13:01:15 UTC
Created attachment 100404 [details, diff]
Patch for updating the xml file.

I also replaced mentions of .emacsrc with .emacs, as I did not find a .emacsrc or emacsrc file on my system.
Comment 3 Christian Schlotter 2006-10-24 13:11:07 UTC
Created attachment 100408 [details, diff]
Patch for updating the xml file.

Also updated the Header to the current year.
Comment 4 Christian Schlotter 2006-11-26 11:35:19 UTC
Now the code listing can be simplified to

# echo app-emacs/ebuild-mode >> /etc/portage/package.keywords
# emerge --ask --verbose app-emacs/ebuild-mode
Comment 5 Christian Faulhammer (RETIRED) gentoo-dev 2007-06-01 08:56:23 UTC
(In reply to comment #4)
> Now the code listing can be simplified to
> 
> # echo app-emacs/ebuild-mode >> /etc/portage/package.keywords
> # emerge --ask --verbose app-emacs/ebuild-mode

 Yes, all needed settings (and more) can be found in ebuild-mode.
Comment 6 Ulrich Müller gentoo-dev 2007-06-21 10:18:10 UTC
Please hold on, since we consider renaming app-emacs/ebuild-mode.
Comment 7 Ulrich Müller gentoo-dev 2007-06-23 19:38:08 UTC
Created attachment 122911 [details, diff]
hb-guide-ebuild.xml.diff

(In reply to comment #6)
> Please hold on, since we consider renaming app-emacs/ebuild-mode.

The package was renamed to app-emacs/gentoo-syntax. Please find an updated diff in the attachment. I believe the code listing is now dispensable.
Comment 8 Petteri Räty (RETIRED) gentoo-dev 2007-06-23 19:59:17 UTC
(In reply to comment #7)
> Created an attachment (id=122911) [edit]
> hb-guide-ebuild.xml.diff
> 
> (In reply to comment #6)
> > Please hold on, since we consider renaming app-emacs/ebuild-mode.
> 
> The package was renamed to app-emacs/gentoo-syntax. Please find an updated diff
> in the attachment. I believe the code listing is now dispensable.
> 

Applied. You probably want to check devmanual too and file a separate bug about it if needed.
Comment 9 Ulrich Müller gentoo-dev 2007-06-23 20:10:13 UTC
(In reply to comment #8)
> Applied.

Thanks.

> You probably want to check devmanual too and file a separate bug about
> it if needed.

That is bug #177356.