summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2024-01-08 16:58:26 +0100
committerUlrich Müller <ulm@gentoo.org>2024-01-08 16:58:26 +0100
commit29591228ddb64562a5d2fcecc8468243359609f8 (patch)
tree4baccf6215bcb716118d58cce5118218e9d0f688 /keyword-generation.sh
parentDon't use variables for faces in glep-mode (diff)
downloadebuild-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>
Diffstat (limited to 'keyword-generation.sh')
-rwxr-xr-xkeyword-generation.sh12
1 files changed, 3 insertions, 9 deletions
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