migration to git, tested build for rpm and deb
This commit is contained in:
10
etc/90wt-mode.el.in
Normal file
10
etc/90wt-mode.el.in
Normal file
@@ -0,0 +1,10 @@
|
||||
;; -*-emacs-lisp-*-
|
||||
;;
|
||||
;; Emacs startup file for the Debian GNU/Linux wt-mode package
|
||||
;;
|
||||
|
||||
;; Set up to autoload
|
||||
(add-to-list 'load-path "@emacsdir@")
|
||||
(autoload 'wt-mode "wt-mode" "Major mode for editing Webtester test scripts" t)
|
||||
(setq auto-mode-alist
|
||||
(cons '("\\.wt\\'" . wt-mode) auto-mode-alist))
|
23
etc/makefile.am
Normal file
23
etc/makefile.am
Normal file
@@ -0,0 +1,23 @@
|
||||
## @id $Id$
|
||||
##
|
||||
## This file has been added:
|
||||
## - by bootstrap.sh
|
||||
## - on Wed, 18 July 2018 13:55:02 +0200
|
||||
## Feel free to change it or even remove and rebuild it, up to your needs
|
||||
##
|
||||
## 1 2 3 4 5 6 7 8
|
||||
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
emacsdir = ${datadir}/emacs/site-lisp
|
||||
dist_emacs_SCRIPTS = wt-mode.el
|
||||
|
||||
emacsconfdir = ${sysconfdir}/emacs/site-start.d
|
||||
emacsconf_DATA = 90wt-mode.el
|
||||
|
||||
EXTRA_DIST = 90wt-mode.el.in
|
||||
|
||||
90wt-mode.el: 90wt-mode.el.in
|
||||
sed 's,@emacsdir@,'"${emacsdir}"',g' $< > $@
|
||||
|
||||
CLEANFILES = 90wt-mode.el
|
||||
MAINTAINERCLEANFILES = makefile.in
|
48
etc/wt-mode.el
Normal file
48
etc/wt-mode.el
Normal file
@@ -0,0 +1,48 @@
|
||||
;; Define an Emacs Mode for Webtester
|
||||
;;
|
||||
;; Features:
|
||||
;; - indentation support
|
||||
;; - syntax highlighting
|
||||
;;
|
||||
;; Documentations:
|
||||
;; - mode tutorial:
|
||||
;; https://www.emacswiki.org/emacs/ModeTutorial
|
||||
;; - faces for font lock:
|
||||
;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Faces-for-Font-Lock.html
|
||||
|
||||
(defvar wt-mode-hook nil)
|
||||
|
||||
(defvar wt-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map "\C-j" 'newline-and-indent)
|
||||
map)
|
||||
"Newline and indent")
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.wt\\'" . wt-mode))
|
||||
|
||||
|
||||
;; get all keywords:
|
||||
;; echo $(webrunner -h | sed -n 's, COMMAND: ,,p') | sed 's, ,\\\\|,g'
|
||||
(defconst wt-font-lock-keywords
|
||||
(list
|
||||
'("^ *\\(auth\\|ca-certificate\\|call\\|case\\|default\\|check\\|clear-cookies\\|click\\|clicktype\\|client-certificate\\|do\\|download\\|echo\\|execute\\|exists\\|exit\\|expect\\|fail\\|for\\|function\\|if\\|else\\|while\\|ignore\\|unignore\\|ignoreto\\|include\\|label\\|load\\|not\\|offline-storage-path\\|open\\|screenshot\\|set\\|setvalue\\|sleep\\|testcase\\|testsuite\\|timeout\\|unset\\|upload\\)\\b" . font-lock-builtin-face)
|
||||
'("^ *#.*$" . font-lock-comment-face))
|
||||
"Highlighting expressions for Webtester")
|
||||
|
||||
(defvar wt-mode-syntax-table
|
||||
(let ((st (make-syntax-table)))
|
||||
st)
|
||||
"Syntax table for wt-mode")
|
||||
|
||||
(defun wt-mode ()
|
||||
"Major mode for editing Webtester test scripts"
|
||||
(interactive)
|
||||
(kill-all-local-variables)
|
||||
(set-syntax-table wt-mode-syntax-table)
|
||||
(use-local-map wt-mode-map)
|
||||
(set (make-local-variable 'font-lock-defaults) '(wt-font-lock-keywords))
|
||||
(setq major-mode 'wt-mode)
|
||||
(setq mode-name "Webtester")
|
||||
(run-hooks 'wpdl-mode-hook))
|
||||
|
||||
(provide 'wt-mode)
|
Reference in New Issue
Block a user