Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
Not eligible to see or edit group visibility for this bug.
View Bug Activity | Format For Printing | XML | Clone This Bug
Small change to the baselayout ebuild to register a site-lisp file so that emacs will syntax highlight init scripts without manual intervention. The site-lisp file is installed only if the global emacs USE flag is enabled. Without it, there is no change to what the baselayout ebuild does or looks like. This change depends on modifications I've made to the elisp-common eclass because the elisp-site-regen function was just too verbose and, moreover, repeated its verbose instructions *twice* under normal usage. See bug #182633. The attached patch is against CVS revision 1.2 of baselayout-1.12.10-r4.ebuild.
Created an attachment (id=122564) [details] Patch implements site lisp file install for init script syntax highlighting.
Created an attachment (id=122565) [details] Site lisp file. Should be placed in baselayout/files directory.
Mark this bug as depending on a small enhancement to elisp-common.eclass, submitted in another bug.
Your site init file is a good idea, but I believe the baselayout team will not be happy if they have to depend on Emacs. We may find another place for it, maybe in app-emacs/ebuild-mode. (And probably it is anyway time to rename that package to app-emacs/gentoo-syntax since it is no longer limited to ebuilds.) (In reply to comment #1) > Created an attachment (id=122564) [edit] [details] > Patch implements site lisp file install for init script syntax highlighting. +pkg_postrm() { + # Regenerate emacs site-lisp file for init script syntax highlighting. + has_version virtual/emacs && elisp-site-regen silent +} You should use "use emacs" instead of "has_version virtual/emacs" as condition here.
base-system: Please comment if it is an option for you to add this to baselayout.
(In reply to comment #4) > Your site init file is a good idea, but I believe the baselayout team will not > be happy if they have to depend on Emacs. I actually thought that could be the case. I looked at ebuild-mode (I use it) and got hung up on the name and description. I would fine with putting it there and would be happy to submit the (admittedly simple) patches. I like the name change, too. :) >You should use "use emacs" instead of "has_version virtual/emacs" as condition >here. The way I did it, using "has_version virtual/emacs", although counter to the recommendation in the elisp-common eclass, by observation seemed to be a standard method to avoid errors under the corner case that emacs wasn't installed. I'll fix it. :)
yeah, these should live in an emacs package, not baselayout ...
I've added your code (with a minor modification, using "add-to-list" instead of "append") to the site file of app-emacs/ebuild-mode. If we rename that package is a different issue, so closing this bug.
(In reply to comment #8) > If we rename that package is a different issue, so closing this bug. FYI: Package is moved to app-emacs/gentoo-syntax.