--- lua-mode-20071122.orig/debian/changelog
+++ lua-mode-20071122/debian/changelog
@@ -0,0 +1,95 @@
+lua-mode (20071122-3) unstable; urgency=low
+
+ * Leave elisp source file links next to byte-compiled files so that info
+ system can locate the source code.
+ (Closes: #543492)
+ * Fontify multiline strings.
+ (Closes: #466130)
+ * Use quilt instead of dpatch for patches.
+ * Use debhelper 7.
+ * Upgraded to Standards-Version 3.8.3.
+ + Added a Homepage control field.
+ + Added a Vcs-Hg control filed to indicate the location of the public
+ repository.
+ + Describe how to use quilt in Debian.source (thanks to Russ Allbery).
+ * Do not load site/init files during byte compilation.
+
+ -- Jens Peter Secher <jps@debian.org> Sun, 30 Aug 2009 17:20:20 +0200
+
+lua-mode (20071122-2) unstable; urgency=low
+
+ * Changed unusual keyboard binding to standard ones, thanks to Trent
+ W. Buck.
+ (Closes: bug#468298)
+ * Bumped Standards-Version to 3.7.3.
+
+ -- Jens Peter Secher <jps@debian.org> Sun, 02 Mar 2008 10:32:36 +0100
+
+lua-mode (20071122-1) unstable; urgency=low
+
+ * New upstream release.
+ * Bumped debhelper compatibility version to 5.
+
+ -- Jens Peter Secher <jps@debian.org> Sun, 02 Dec 2007 13:24:50 +0100
+
+lua-mode (20070703-2) unstable; urgency=low
+
+ * Use autoload instead of load, thanks to Trent W. Buck.
+ (Closes: bug#446234)
+
+ -- Jens Peter Secher <jps@debian.org> Mon, 15 Oct 2007 22:05:28 +0200
+
+lua-mode (20070703-1) unstable; urgency=low
+
+ * New upstream release.
+ * Simplify install, removal, and load-path by using symlinks instead of
+ copying source files.
+
+ -- Jens Peter Secher <jps@debian.org> Sun, 22 Jul 2007 23:17:59 +0200
+
+lua-mode (20061208-1) unstable; urgency=low
+
+ * New upstream release.
+ (Closes: bug#402133)
+ - which fixes typo in docstring.
+ (Closes: bug#394206)
+ - which obsoletes my patch for multiline comments, so dpatch is no
+ longer needed.
+ * Include a watch file.
+
+ -- Jens Peter Secher <jps@debian.org> Sun, 10 Dec 2006 13:30:39 +0100
+
+lua-mode (20060625-1) unstable; urgency=low
+
+ * New upstream release.
+ (Closes: bug#390588)
+ * Bumped Standards-Version to 3.7.2.
+
+ -- Jens Peter Secher <jps@debian.org> Wed, 4 Oct 2006 22:56:21 +0200
+
+lua-mode (1.74-2) unstable; urgency=low
+
+ * Show commented out multiline comments as non-comments... 'mkay!
+ (Closes: bug#350277)
+
+ -- Jens Peter Secher <jps@debian.org> Thu, 9 Feb 2006 21:55:57 +0100
+
+lua-mode (1.74-1) unstable; urgency=low
+
+ * New upstream version.
+ + Fixes broken indentation.
+ (Closes: bug#345316)
+ * Use the right path to the lua executable.
+ * Automatically turn on lua-mode for lua files.
+ * Make sure that Emacs Help can find the source code by including the
+ location in load-path.
+
+ -- Jens Peter Secher <jps@debian.org> Mon, 2 Jan 2006 22:25:57 +0100
+
+lua-mode (1.26-1) unstable; urgency=low
+
+ * Initial release.
+ (Closes: bug#266160)
+
+ -- Jens Peter Secher <jps@debian.org> Tue, 2 Nov 2004 21:26:59 +0100
+
--- lua-mode-20071122.orig/debian/control
+++ lua-mode-20071122/debian/control
@@ -0,0 +1,18 @@
+Source: lua-mode
+Section: editors
+Priority: optional
+Maintainer: Jens Peter Secher <jps@debian.org>
+Build-Depends: debhelper (>= 7), quilt, emacs23 | emacsen
+Standards-Version: 3.8.3
+Vcs-Hg: http://hg.debian.org/hg/collab-maint/lua-mode/lua-mode
+Homepage: http://luaforge.net/projects/lua-mode
+
+Package: lua-mode
+Architecture: all
+Depends: emacs23 | emacsen
+Enhances: lua50
+Description: Emacs mode for editing Lua programs
+ This emacs mode provides syntax highlighting and automatic
+ indentation for Lua, as well as sending lines/regions/files to a lua
+ interpreter. You will need this if you write Lua programs using
+ Emacs.
--- lua-mode-20071122.orig/debian/README.source
+++ lua-mode-20071122/debian/README.source
@@ -0,0 +1,49 @@
+This package uses quilt to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To get the fully patched source after unpacking the source package, cd to
+the root level of the source package and run:
+
+ quilt push -a
+
+The last patch listed in debian/patches/series will become the current
+patch.
+
+To add a new set of changes, first run quilt push -a, and then run:
+
+ quilt new <patch>
+
+where <patch> is a descriptive name for the patch, used as the filename in
+debian/patches. Then, for every file that will be modified by this patch,
+run:
+
+ quilt add <file>
+
+before editing those files. You must tell quilt with quilt add what files
+will be part of the patch before making changes or quilt will not work
+properly. After editing the files, run:
+
+ quilt refresh
+
+to save the results as a patch.
+
+Alternately, if you already have an external patch and you just want to
+add it to the build system, run quilt push -a and then:
+
+ quilt import -P <patch> /path/to/patch
+ quilt push -a
+
+(add -p 0 to quilt import if needed). <patch> as above is the filename to
+use in debian/patches. The last quilt push -a will apply the patch to
+make sure it works properly.
+
+To remove an existing patch from the list of patches that will be applied,
+run:
+
+ quilt delete <patch>
+
+You may need to run quilt pop -a to unapply patches first before running
+this command.
+
+ -- Jens Peter Secher <jps@debian.org>, Sun, 30 Aug 2009 17:01:46 +0200
--- lua-mode-20071122.orig/debian/emacsen-remove
+++ lua-mode-20071122/debian/emacsen-remove
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/lua-mode
+FLAVOR=$1
+PACKAGE=lua-mode
+if [ ${FLAVOR} != emacs ]; then
+ echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+ rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+fi
+exit 0
--- lua-mode-20071122.orig/debian/compat
+++ lua-mode-20071122/debian/compat
@@ -0,0 +1 @@
+7
--- lua-mode-20071122.orig/debian/watch
+++ lua-mode-20071122/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://luaforge.net/frs/?group_id=185&release_id=622 /frs/download.php/.*/lua-mode-(.*).tar.gz
--- lua-mode-20071122.orig/debian/copyright
+++ lua-mode-20071122/debian/copyright
@@ -0,0 +1,35 @@
+This package was debianised by Jens Peter Secher <jps@debian.org>
+on Mon, 16 Aug 2004 23:57 +0200.
+
+It was downloaded from
+http://lua-users.org/files/wiki_insecure/editors/lua-mode.el
+
+Upstream Author:
+ 2006 Juergen Hoetzel <juergen@hoetzel.info>
+ 2004 various (support for Lua 5 and byte compilation)
+ 2001 Christian Vogler <cvogler@gradient.cis.upenn.edu>
+ 1997 Bret Mogilefsky <mogul-lua@gelatinous.com> starting from
+ tcl-mode by Gregor Schmid <schmid@fb3-s7.math.tu-berlin.de>
+ with tons of assistance from
+ Paul Du Bois <pld-lua@gelatinous.com> and
+ Aaron Smith <aaron-lua@gelatinous.com>.
+
+Copyright (C) 1997, 2001, 2004, 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+
+The full GNU General Public License is located in the file
+/usr/share/common-licenses/GPL-2 on a Debian system.
--- lua-mode-20071122.orig/debian/emacsen-install
+++ lua-mode-20071122/debian/emacsen-install
@@ -0,0 +1,34 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/install/lua-mode
+
+FLAVOR=$1
+PACKAGE=lua-mode
+
+# Do nothing if generic flavor.
+if [ ${FLAVOR} = emacs ]; then
+ exit 0;
+fi
+
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+# The byte-compiled files goes into the site-lisp directory.
+BCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+install -m 755 -d ${BCDIR}
+
+# The elisp source files are in the generic site-list directory.
+SRCDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+SRC=`find ${SRCDIR} -name '*.el' -exec basename '{}' ';'`
+
+# Prepare for byte-compiling the source files.
+cd ${BCDIR}
+ln -sf ${SRCDIR}/*.el .
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+
+# Byte-compile elisp files.
+FLAGS="--no-site-file --no-init-file --batch -l path.el -f batch-byte-compile"
+${FLAVOR} ${FLAGS} ${SRC}
+rm -f path.el
+
+exit 0
--- lua-mode-20071122.orig/debian/rules
+++ lua-mode-20071122/debian/rules
@@ -0,0 +1,44 @@
+#!/usr/bin/make -f
+
+PACKAGE=lua-mode
+
+# Use quilt for patching.
+include /usr/share/quilt/quilt.make
+
+get-orig-source:
+ wget http://luaforge.net/frs/download.php/2724/lua-mode-20071122.tar.gz
+
+clean: clean-patched unpatch
+
+clean-patched:
+ dh_testdir
+ dh_testroot
+ dh_clean
+
+build: patch
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_prep
+ dh_installdirs
+ dh_install lua-mode.el usr/share/emacs/site-lisp/$(PACKAGE)
+
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installemacsen
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary-arch: build install
+
+binary: binary-indep binary-arch
+
+.PHONY: get-orig-source build clean clean-patched install binary-indep binary-arch binary
--- lua-mode-20071122.orig/debian/emacsen-startup
+++ lua-mode-20071122/debian/emacsen-startup
@@ -0,0 +1,17 @@
+;; -*-emacs-lisp-*-
+
+(if (not (file-exists-p "/usr/share/emacs/site-lisp/lua-mode"))
+ (message "Package lua-mode removed but not purged. Skipping setup.")
+
+ ;; The lua-mode package follows the Debian/GNU Linux 'emacsen' policy
+ ;; and byte-compiles its elisp files for each 'emacs flavor'. The compiled
+ ;; code is then installed in a subdirectory of the respective site-lisp
+ ;; directory.
+ (debian-pkg-add-load-path-item
+ (concat
+ "/usr/share/" (symbol-name debian-emacs-flavor) "/site-lisp/lua-mode"))
+
+ ;; Automatically start lua files in lua-mode.
+ (add-to-list (quote auto-mode-alist) (quote ("\\.lua\\'" . lua-mode)))
+
+ (autoload 'lua-mode "lua-mode" "Major mode for editing Lua code." t))
--- lua-mode-20071122.orig/debian/patches/series
+++ lua-mode-20071122/debian/patches/series
@@ -0,0 +1,2 @@
+keybindings.diff
+multiline-strings.diff
--- lua-mode-20071122.orig/debian/patches/keybindings.diff
+++ lua-mode-20071122/debian/patches/keybindings.diff
@@ -0,0 +1,19 @@
+Description: Change/remove unusual keybindings.
+Author: Trent W. Buck <trentbuck@gmail.com>
+
+Index: lua-mode/lua-mode.el
+===================================================================
+--- lua-mode.orig/lua-mode.el 2009-08-30 20:21:18.000000000 +0200
++++ lua-mode/lua-mode.el 2009-08-30 20:22:35.000000000 +0200
+@@ -370,9 +370,8 @@
+ lua-mode-map)))
+
+ ;; communication
+- (define-key map "\M-[" 'lua-beginning-of-proc)
+- (define-key map "\M-]" 'lua-end-of-proc)
+- (define-key map "\C-c" 'comment-region)
++ (define-key map (kbd "C-M-a") 'lua-beginning-of-proc)
++ (define-key map (kbd "C-M-e") 'lua-end-of-proc)
+ (define-key map "\C-l" 'lua-send-buffer)
+ (define-key map "\C-f" 'lua-search-documentation)
+ (if lua-prefix-key
--- lua-mode-20071122.orig/debian/patches/multiline-strings.diff
+++ lua-mode-20071122/debian/patches/multiline-strings.diff
@@ -0,0 +1,24 @@
+Description: Fontify multiline strings.
+Bug: http://bugs.debian.org/466130
+Author: Jens Peter Secher <jps@debian.org>
+
+Match multiline strings. Regular expressions, however, are not
+expressive enough to only match begin and end markers with the same
+number of equal signs in them. In other words, the regular expression
+below will match syntaktically wrong multiline strings.
+
+Index: lua-mode/lua-mode.el
+===================================================================
+--- lua-mode.orig/lua-mode.el 2009-08-30 20:46:49.000000000 +0200
++++ lua-mode/lua-mode.el 2009-08-30 22:50:15.000000000 +0200
+@@ -220,6 +220,10 @@
+ `("\\(?:^\\|[^-]\\)\\(--\\[\\(=*\\)\\[\\(?:.\\|\n\\)*?\\]\\2\\]\\)"
+ (1 font-lock-comment-face t))
+
++ ;; Multi-line string literals.
++ '("[^-]\\[=*\\[\\(\\([^]]\\|][^]]\\|]=+[^]]\\)*?\\)]=*]"
++ (1 font-lock-string-face t))
++
+ ;;
+ ;; Keywords.
+ ;; (concat "\\<"