[DRE-commits] r4260 - trunk/libhaml-ruby/debian

Gunnar Wolf gwolf at alioth.debian.org
Fri Oct 16 23:44:09 UTC 2009


Author: gwolf
Date: 2009-10-16 23:44:09 +0000 (Fri, 16 Oct 2009)
New Revision: 4260

Added:
   trunk/libhaml-ruby/debian/haml-elisp.emacsen-startup
Modified:
   trunk/libhaml-ruby/debian/changelog
Log:
Auto-load haml and sass modes on emacs startup (note - there is still something b0rken :( )

Modified: trunk/libhaml-ruby/debian/changelog
===================================================================
--- trunk/libhaml-ruby/debian/changelog	2009-10-14 20:01:56 UTC (rev 4259)
+++ trunk/libhaml-ruby/debian/changelog	2009-10-16 23:44:09 UTC (rev 4260)
@@ -1,3 +1,10 @@
+libhaml-ruby (2.2.8-2) UNRELEASED; urgency=low
+
+  * Include haml-elisp.emacsen-startup so the Emacs modes do not have to
+    be explicitly called (Closes: #551258)
+
+ -- Gunnar Wolf <gwolf at debian.org>  Fri, 16 Oct 2009 17:51:58 -0500
+
 libhaml-ruby (2.2.8-1) unstable; urgency=medium
 
   * New upstream release; fixes potential XSS isue due to incomplete

Added: trunk/libhaml-ruby/debian/haml-elisp.emacsen-startup
===================================================================
--- trunk/libhaml-ruby/debian/haml-elisp.emacsen-startup	                        (rev 0)
+++ trunk/libhaml-ruby/debian/haml-elisp.emacsen-startup	2009-10-16 23:44:09 UTC (rev 4260)
@@ -0,0 +1,33 @@
+(exit)
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file, e.g.  /etc/emacs/site-start.d/50haml-mode.el
+;; for the Debian haml-mode package
+;;
+;; Originally contributed by Nils Naumann <naumann at unileoben.ac.at>
+;; Modified by Dirk Eddelbuettel <edd at debian.org>
+;; Adapted for dh-make by Jim Van Zandt <jrv at debian.org>
+;; Adapted for haml by Gunnar Wolf <gwolf at debian.org>
+
+;; The haml-mode package follows the Debian/GNU Linux 'emacsen' policy and
+;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
+;; xemacs19, emacs20, xemacs20...).  The compiled code is then
+;; installed in a subdirectory of the respective site-lisp directory.
+;; We have to add this to the load-path:
+(let ((package-dir (concat "/usr/share/"
+                           (symbol-name flavor)
+                           "/site-lisp/haml-elisp")))
+;; If package-dir does not exist, the haml-mode package must have
+;; removed but not purged, and we should skip the setup.
+  (when (file-directory-p package-dir)
+    ;; Use debian-pkg-add-load-path-item per §9 of debian emacs subpolicy
+    (debian-pkg-add-load-path-item package-dir )
+    (autoload 'haml-mode "haml-mode"
+      "Major mode for editing haml-mode files." t)
+    (add-to-list 'auto-mode-alist '("\\.haml\\'" . haml-mode))
+    ;; The same package provides HAML and SASS modes in the same
+    ;; directory - So repeat only the last two instructions for sass
+    (autoload 'sass-mode "sass-mode"
+      "Major mode for editing sass-mode files." t)
+    (add-to-list 'auto-mode-alist '("\\.sass\\'" . sass-mode))
+    ))




More information about the Pkg-ruby-extras-commits mailing list