summaryrefslogtreecommitdiff
path: root/lib/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/emacs')
-rw-r--r--lib/emacs/Makefile.am3
-rw-r--r--lib/emacs/Makefile.in420
-rw-r--r--lib/emacs/autoconf-mode.el100
-rw-r--r--lib/emacs/autotest-mode.el101
4 files changed, 624 insertions, 0 deletions
diff --git a/lib/emacs/Makefile.am b/lib/emacs/Makefile.am
new file mode 100644
index 0000000..aa62207
--- /dev/null
+++ b/lib/emacs/Makefile.am
@@ -0,0 +1,3 @@
+# Make Autoconf Emacs library.
+
+dist_lisp_LISP = autoconf-mode.el autotest-mode.el
diff --git a/lib/emacs/Makefile.in b/lib/emacs/Makefile.in
new file mode 100644
index 0000000..13490a3
--- /dev/null
+++ b/lib/emacs/Makefile.in
@@ -0,0 +1,420 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Make Autoconf Emacs library.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = lib/emacs
+DIST_COMMON = $(dist_lisp_LISP) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/autobuild.m4 \
+ $(top_srcdir)/m4/m4.m4 $(top_srcdir)/m4/make-case.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(lispdir)"
+dist_lispLISP_INSTALL = $(INSTALL_DATA)
+LISP = $(dist_lisp_LISP)
+am__ELFILES = autoconf-mode.el autotest-mode.el
+am__ELCFILES = $(am__ELFILES:.el=.elc)
+ELCFILES = $(LISP:.el=.elc)
+elisp_comp = $(top_srcdir)/build-aux/elisp-comp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMACS = @EMACS@
+EMACSLOADPATH = @EMACSLOADPATH@
+EXPR = @EXPR@
+GREP = @GREP@
+HELP2MAN = @HELP2MAN@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+M4 = @M4@
+M4_DEBUGFILE = @M4_DEBUGFILE@
+M4_GNU = @M4_GNU@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PERL_FLOCK = @PERL_FLOCK@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TEST_EMACS = @TEST_EMACS@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@
+ac_cv_sh_n_works = @ac_cv_sh_n_works@
+ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+lispdir = @lispdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+dist_lisp_LISP = autoconf-mode.el autotest-mode.el
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/emacs/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu lib/emacs/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+elc-stamp: $(LISP)
+ @echo 'WARNING: Warnings can be ignored. :-)'
+ @rm -f elc-temp && touch elc-temp
+ if test "$(EMACS)" != no; then \
+ set x; \
+ list='$(LISP)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ set x "$$@" "$$d$$p"; shift; \
+ done; \
+ shift; \
+ EMACS="$(EMACS)" $(SHELL) $(elisp_comp) "$$@" || exit 1; \
+ else : ; fi
+ @mv -f elc-temp $@
+$(am__ELCFILES): elc-stamp
+ @if test "$(EMACS)" != no && test ! -f $@; then \
+ trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
+ if mkdir elc-lock 2>/dev/null; then \
+ rm -f elc-stamp; \
+ $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
+ rmdir elc-lock; \
+ else \
+ while test -d elc-lock; do sleep 1; done; \
+ test -f elc-stamp; exit $$?; \
+ fi; \
+ else : ; fi
+install-dist_lispLISP: $(dist_lisp_LISP) $(ELCFILES)
+ @$(NORMAL_INSTALL)
+ @if test "$(EMACS)" != no && test -n "$(lispdir)"; then \
+ $(MKDIR_P) "$(DESTDIR)$(lispdir)"; \
+ list='$(dist_lisp_LISP)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ $(am__strip_dir) \
+ echo " $(dist_lispLISP_INSTALL) '$$d$$p' '$(DESTDIR)$(lispdir)/$$f'"; \
+ $(dist_lispLISP_INSTALL) "$$d$$p" "$(DESTDIR)$(lispdir)/$$f" || exit $$?; \
+ if test -f $${p}c; then \
+ echo " $(dist_lispLISP_INSTALL) '$${p}c' '$(DESTDIR)$(lispdir)/$${f}c'"; \
+ $(dist_lispLISP_INSTALL) "$${p}c" "$(DESTDIR)$(lispdir)/$${f}c" || exit $$?; \
+ else : ; fi; \
+ done; \
+ else : ; fi
+
+uninstall-dist_lispLISP:
+ @$(NORMAL_UNINSTALL)
+ @test "$(EMACS)" != no && test -n "$(lispdir)" || exit 0; \
+ list='$(dist_lisp_LISP)'; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ filesc=`echo "$$files" | sed 's|$$|c|'`; \
+ echo " ( cd '$(DESTDIR)$(lispdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(lispdir)" && rm -f $$files || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(lispdir)' && rm -f" $$filesc ")"; \
+ cd "$(DESTDIR)$(lispdir)" && rm -f $$filesc
+
+clean-lisp:
+ -rm -f elc-stamp $(ELCFILES)
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LISP) $(ELCFILES)
+installdirs:
+ for dir in "$(DESTDIR)$(lispdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-lisp mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_lispLISP
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_lispLISP
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-lisp \
+ distclean distclean-generic distdir dvi dvi-am html html-am \
+ info info-am install install-am install-data install-data-am \
+ install-dist_lispLISP install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-dist_lispLISP
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/lib/emacs/autoconf-mode.el b/lib/emacs/autoconf-mode.el
new file mode 100644
index 0000000..161ea82
--- /dev/null
+++ b/lib/emacs/autoconf-mode.el
@@ -0,0 +1,100 @@
+;;; autoconf-mode.el --- autoconf code editing commands for Emacs
+
+;; Author: Martin Buchholz (martin@xemacs.org)
+;; Maintainer: Martin Buchholz
+;; Keywords: languages, faces, m4, configure
+
+;; This file is part of Autoconf
+
+;; Copyright (C) 2001, 2006, 2009-2012 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 3 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, see <http://www.gnu.org/licenses/>.
+
+;; A major mode for editing autoconf input (like configure.in).
+;; Derived from m4-mode.el by Andrew Csillag (drew@staff.prodigy.com)
+
+;;; Your should add the following to your Emacs configuration file:
+
+;; (autoload 'autoconf-mode "autoconf-mode"
+;; "Major mode for editing autoconf files." t)
+;; (setq auto-mode-alist
+;; (cons '("\\.ac\\'\\|configure\\.in\\'" . autoconf-mode)
+;; auto-mode-alist))
+
+;;; Code:
+
+;;thank god for make-regexp.el!
+(defvar autoconf-font-lock-keywords
+ `(("\\bdnl \\(.*\\)" 1 font-lock-comment-face t)
+ ("\\$[0-9*#@]" . font-lock-variable-name-face)
+ ("\\b\\(m4_\\)?\\(builtin\\|change\\(com\\|quote\\|word\\)\\|d\\(e\\(bug\\(file\\|mode\\)\\|cr\\|f\\(ine\\|n\\)\\)\\|iv\\(ert\\|num\\)\\|nl\\|umpdef\\)\\|e\\(rrprint\\|syscmd\\|val\\)\\|f\\(ile\\|ormat\\)\\|gnu\\|i\\(f\\(def\\|else\\)\\|n\\(c\\(lude\\|r\\)\\|d\\(ex\\|ir\\)\\)\\)\\|l\\(en\\|ine\\)\\|m\\(4\\(exit\\|wrap\\)\\|aketemp\\|kstemp\\)\\|p\\(atsubst\\|opdef\\|ushdef\\)\\|regexp\\|s\\(hift\\|include\\|ubstr\\|ys\\(cmd\\|val\\)\\)\\|tra\\(ceo\\(ff\\|n\\)\\|nslit\\)\\|un\\(d\\(efine\\|ivert\\)\\|ix\\)\\)\\b" . font-lock-keyword-face)
+ ("^\\(\\(m4_\\)?define\\(_default\\)?\\|A._DEFUN\\|m4_defun\\(_once\\|_init\\)?\\)(\\[?\\([A-Za-z0-9_]+\\)" 5 font-lock-function-name-face)
+ "default font-lock-keywords")
+)
+
+(defvar autoconf-mode-syntax-table nil
+ "syntax table used in autoconf mode")
+(setq autoconf-mode-syntax-table (make-syntax-table))
+(modify-syntax-entry ?\" "\"" autoconf-mode-syntax-table)
+;;(modify-syntax-entry ?\' "\"" autoconf-mode-syntax-table)
+(modify-syntax-entry ?# "<\n" autoconf-mode-syntax-table)
+(modify-syntax-entry ?\n ">#" autoconf-mode-syntax-table)
+(modify-syntax-entry ?\( "()" autoconf-mode-syntax-table)
+(modify-syntax-entry ?\) ")(" autoconf-mode-syntax-table)
+(modify-syntax-entry ?\[ "(]" autoconf-mode-syntax-table)
+(modify-syntax-entry ?\] ")[" autoconf-mode-syntax-table)
+(modify-syntax-entry ?* "." autoconf-mode-syntax-table)
+(modify-syntax-entry ?_ "_" autoconf-mode-syntax-table)
+
+(defvar autoconf-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map '[(control c) (\;)] 'comment-region)
+ map))
+
+(defun autoconf-current-defun ()
+ "Autoconf value for `add-log-current-defun-function'.
+This tells add-log.el how to find the current macro."
+ (save-excursion
+ (if (re-search-backward "^\\(m4_define\\(_default\\)?\\|m4_defun\\(_once\\|_init\\)?\\|A._DEFUN\\)(\\[*\\([A-Za-z0-9_]+\\)" nil t)
+ (buffer-substring (match-beginning 4)
+ (match-end 4))
+ nil)))
+
+;;;###autoload
+(defun autoconf-mode ()
+ "A major-mode to edit Autoconf files like configure.ac.
+\\{autoconf-mode-map}
+"
+ (interactive)
+ (kill-all-local-variables)
+ (use-local-map autoconf-mode-map)
+
+ (make-local-variable 'add-log-current-defun-function)
+ (setq add-log-current-defun-function 'autoconf-current-defun)
+
+ (make-local-variable 'comment-start)
+ (setq comment-start "# ")
+ (make-local-variable 'parse-sexp-ignore-comments)
+ (setq parse-sexp-ignore-comments t)
+
+ (make-local-variable 'font-lock-defaults)
+ (setq major-mode 'autoconf-mode)
+ (setq mode-name "Autoconf")
+ (setq font-lock-defaults `(autoconf-font-lock-keywords nil))
+ (set-syntax-table autoconf-mode-syntax-table)
+ (run-hooks 'autoconf-mode-hook))
+
+(provide 'autoconf-mode)
+
+;;; autoconf-mode.el ends here
diff --git a/lib/emacs/autotest-mode.el b/lib/emacs/autotest-mode.el
new file mode 100644
index 0000000..6cb304e
--- /dev/null
+++ b/lib/emacs/autotest-mode.el
@@ -0,0 +1,101 @@
+;;; autotest-mode.el --- autotest code editing commands for Emacs
+
+;; Author: Akim Demaille (akim@freefriends.org)
+;; Keywords: languages, faces, m4, Autotest
+
+;; This file is part of Autoconf
+
+;; Copyright (C) 2001, 2009-2012 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 3 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, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; A major mode for editing autotest input (like testsuite.at).
+;; Derived from autoconf-mode.el, by Martin Buchholz (martin@xemacs.org).
+
+;;; Your should add the following to your Emacs configuration file:
+
+;; (autoload 'autotest-mode "autotest-mode"
+;; "Major mode for editing autotest files." t)
+;; (setq auto-mode-alist
+;; (cons '("\\.at\\'" . autotest-mode) auto-mode-alist))
+
+;;; Code:
+
+(defvar autotest-font-lock-keywords
+ `(("\\bdnl\\b\\(.*\\)" 1 font-lock-comment-face t)
+ ("\\$[0-9*#@]" . font-lock-variable-name-face)
+ ("^\\(m4_define\\|m4_defun\\)(\\[*\\([A-Za-z0-9_]+\\)" 2 font-lock-function-name-face)
+ ("^AT_SETUP(\\[+\\([^]]+\\)" 1 font-lock-function-name-face)
+ ("^AT_DATA(\\[+\\([^]]+\\)" 1 font-lock-variable-name-face)
+ ("\\b\\(_?m4_[_a-z0-9]*\\|_?A[ST]_[_A-Z0-9]+\\)\\b" . font-lock-keyword-face)
+ "default font-lock-keywords")
+)
+
+(defvar autotest-mode-syntax-table nil
+ "syntax table used in autotest mode")
+(setq autotest-mode-syntax-table (make-syntax-table))
+(modify-syntax-entry ?\" "\"" autotest-mode-syntax-table)
+;;(modify-syntax-entry ?\' "\"" autotest-mode-syntax-table)
+(modify-syntax-entry ?# "<\n" autotest-mode-syntax-table)
+(modify-syntax-entry ?\n ">#" autotest-mode-syntax-table)
+(modify-syntax-entry ?\( "()" autotest-mode-syntax-table)
+(modify-syntax-entry ?\) ")(" autotest-mode-syntax-table)
+(modify-syntax-entry ?\[ "(]" autotest-mode-syntax-table)
+(modify-syntax-entry ?\] ")[" autotest-mode-syntax-table)
+(modify-syntax-entry ?* "." autotest-mode-syntax-table)
+(modify-syntax-entry ?_ "_" autotest-mode-syntax-table)
+
+(defvar autotest-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map '[(control c) (\;)] 'comment-region)
+ map))
+
+(defun autotest-current-defun ()
+ "Autotest value for `add-log-current-defun-function'.
+This tells add-log.el how to find the current test group/macro."
+ (save-excursion
+ (if (re-search-backward "^\\(m4_define\\|m4_defun\\|AT_SETUP\\)(\\[+\\([^]]+\\)" nil t)
+ (buffer-substring (match-beginning 2)
+ (match-end 2))
+ nil)))
+
+;;;###autoload
+(defun autotest-mode ()
+ "A major-mode to edit Autotest files like testsuite.at.
+\\{autotest-mode-map}
+"
+ (interactive)
+ (kill-all-local-variables)
+ (use-local-map autotest-mode-map)
+
+ (make-local-variable 'add-log-current-defun-function)
+ (setq add-log-current-defun-function 'autotest-current-defun)
+
+ (make-local-variable 'comment-start)
+ (setq comment-start "# ")
+ (make-local-variable 'parse-sexp-ignore-comments)
+ (setq parse-sexp-ignore-comments t)
+
+ (make-local-variable 'font-lock-defaults)
+ (setq major-mode 'autotest-mode)
+ (setq mode-name "Autotest")
+ (setq font-lock-defaults `(autotest-font-lock-keywords nil))
+ (set-syntax-table autotest-mode-syntax-table)
+ (run-hooks 'autotest-mode-hook))
+
+(provide 'autotest-mode)
+
+;;; autotest-mode.el ends here