diff options
author | 2024-01-08 16:58:26 +0100 | |
---|---|---|
committer | 2024-01-08 16:58:26 +0100 | |
commit | 29591228ddb64562a5d2fcecc8468243359609f8 (patch) | |
tree | 4baccf6215bcb716118d58cce5118218e9d0f688 | |
parent | Don't use variables for faces in glep-mode (diff) | |
download | ebuild-mode-29591228ddb64562a5d2fcecc8468243359609f8.tar.gz ebuild-mode-29591228ddb64562a5d2fcecc8468243359609f8.tar.bz2 ebuild-mode-29591228ddb64562a5d2fcecc8468243359609f8.zip |
Simplify the keyword generation script
* keyword-generation.sh: Create only the bare list of keywords,
without the variable definition.
* ebuild-mode-keywords.el (ebuild-mode-keywords-eclass):
Move the begin and end marker comments into the defvar.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ebuild-mode-keywords.el | 4 | ||||
-rwxr-xr-x | keyword-generation.sh | 12 |
3 files changed, 12 insertions, 11 deletions
@@ -1,3 +1,10 @@ +2024-01-08 Ulrich Müller <ulm@gentoo.org> + + * keyword-generation.sh: Create only the bare list of keywords, + without the variable definition. + * ebuild-mode-keywords.el (ebuild-mode-keywords-eclass): + Move the begin and end marker comments into the defvar. + 2023-11-29 Ulrich Müller <ulm@gentoo.org> * glep-mode.el (glep-mode-add-font-lock): Specify faces directly diff --git a/ebuild-mode-keywords.el b/ebuild-mode-keywords.el index ede91dd..5da37d4 100644 --- a/ebuild-mode-keywords.el +++ b/ebuild-mode-keywords.el @@ -108,9 +108,9 @@ ;; The list of eclass function keywords below is auto-generated ;; by keyword-generation.sh. -;; @@KEYWORDS-BEGIN@@ (defvar ebuild-mode-keywords-eclass '(( + ;; @@KEYWORDS-BEGIN@@ ;; acct-group "acct-group_pkg_preinst" "acct-group_pkg_pretend" "acct-group_src_install" @@ -849,9 +849,9 @@ "xorg-3_pkg_postrm" "xorg-3_pkg_setup" "xorg-3_reconf_source" "xorg-3_src_compile" "xorg-3_src_configure" "xorg-3_src_install" "xorg-3_src_prepare" "xorg-3_src_unpack" + ;; @@KEYWORDS-END@@ ) font-lock-type-face)) -;; @@KEYWORDS-END@@ (provide 'ebuild-mode-keywords) diff --git a/keyword-generation.sh b/keyword-generation.sh index 845fc5e..facdf31 100755 --- a/keyword-generation.sh +++ b/keyword-generation.sh @@ -40,9 +40,6 @@ has() { return 1 } -echo "(defvar ebuild-mode-keywords-eclass" >"${TMPFILE}" -echo "'((" >>"${TMPFILE}" - for (( i = 0; i < ${#ECLASSES[@]}; i++ )); do eclass=${ECLASSES[i]} file=${ECLASSFILES[i]} @@ -68,22 +65,19 @@ for (( i = 0; i < ${#ECLASSES[@]}; i++ )); do { echo ";; ${eclass}" - printf ' "%s"' "${functions[@]}" + printf '"%s" ' "${functions[@]}" echo } >>"${TMPFILE}" echo "ok" >&2 done -echo ")" >>"${TMPFILE}" -echo "font-lock-type-face))" >>"${TMPFILE}" - emacs -q --no-site-file --batch \ --visit "${TMPFILE}" \ --eval "(emacs-lisp-mode)" \ - --eval "(indent-region (point-min) (point-max))" \ --eval "(let ((fill-column 78) - (fill-indent-according-to-mode t) + (fill-prefix \" \") (paragraph-start \"^.\")) + (indent-region (point-min) (point-max)) (fill-region (point-min) (point-max)))" \ --eval "(save-buffer)" --kill || exit 1 |