[cylc] 23/33: Add proper emacs support

Alastair McKinstry mckinstry at moszumanska.debian.org
Sat Dec 12 14:24:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository cylc.

commit ba762b05c5aab76b9e7711472f46c25c95369564
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Thu Nov 20 15:22:29 2014 +0000

    Add proper emacs support
---
 debian/cylc.emacsen-compat  |  1 +
 debian/cylc.emacsen-install | 28 ++++++++++++++++++++++++++++
 debian/cylc.emacsen-remove  | 11 +++++++++++
 debian/cylc.emacsen-startup | 12 ++++++++++++
 debian/cylc.install         |  2 +-
 5 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/debian/cylc.emacsen-compat b/debian/cylc.emacsen-compat
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/debian/cylc.emacsen-compat
@@ -0,0 +1 @@
+0
diff --git a/debian/cylc.emacsen-install b/debian/cylc.emacsen-install
new file mode 100644
index 0000000..094e7de
--- /dev/null
+++ b/debian/cylc.emacsen-install
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# emacsen install script for the Debian GNU/Linux cylc package
+
+FLAVOR=$1
+PACKAGE=cylc
+
+ELDIR=/usr/share/emacs/site-lisp/
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+ELFILE="cylc-mode.el"
+FLAGS="-batch -no-site-file -l path.el -f batch-byte-compile"
+
+if [ ${FLAVOR} != emacs ]; then
+  echo install/${PACKAGE}: Byte-compiling for ${FLAVOR}
+
+  install -m 755 -d ${ELCDIR}
+
+  # Source file symlink (emacsen policy 5C)
+  ln -s "${ELDIR}/${ELFILE}" "${ELCDIR}/${ELFILE}"
+
+  # Compile cylc-mode.el
+  cd ${ELCDIR}
+  cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+  ${FLAVOR} ${FLAGS} ${ELFILE}
+  rm -f path.el
+fi
diff --git a/debian/cylc.emacsen-remove b/debian/cylc.emacsen-remove
new file mode 100644
index 0000000..a120809
--- /dev/null
+++ b/debian/cylc.emacsen-remove
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+
+FLAVOR=$1
+PACKAGE=cylc
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/cylc
+
+if [ ${FLAVOR} != emacs ]; then
+  echo remove/${PACKAGE}: Purging byte-compiled files for ${FLAVOR}
+  rm -rf "${ELCDIR}"
+fi
diff --git a/debian/cylc.emacsen-startup b/debian/cylc.emacsen-startup
new file mode 100644
index 0000000..2eabb18
--- /dev/null
+++ b/debian/cylc.emacsen-startup
@@ -0,0 +1,12 @@
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file for the Debian GNU/Linux cmake package
+
+(if (file-exists-p "/usr/share/emacs/site-lisp/cylc/cylc-mode.el")
+ (progn
+ (debian-pkg-add-load-path-item "/usr/share/emacs/site-lisp/cylc")
+  (autoload 'cylc-mode "cylc-mode"
+   "Major mode for editing cylc suite files." t)
+  (setq auto-mode-alist
+   (append '( ("\\.rc\\'" . cylc-mode)) auto-mode-alist)))
+ (message "cylc removed but not purged, skipping setup"))
diff --git a/debian/cylc.install b/debian/cylc.install
index db235d2..f79483f 100644
--- a/debian/cylc.install
+++ b/debian/cylc.install
@@ -1,7 +1,7 @@
 bin/cylc-* /usr/share/cylc/bin
 usr/bin/cylc
 conf/5to6 /usr/share/cylc/bin
-conf/cylc-mode.el	/usr/share/emacs/site-lisp
+conf/cylc-mode.el	/usr/share/emacs/site-lisp/cylc
 conf/cylc.vim	/usr/share/vim/addons/plugin
 conf/cylc.lang /usr/share/gtksourceview-3.0/language-specs
 conf/cylc.xml /usr/share/kde4/apps/katepart/syntax

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cylc.git



More information about the debian-science-commits mailing list