From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A8796138727 for ; Sat, 25 Jan 2014 14:17:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A3155E0A82; Sat, 25 Jan 2014 14:17:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 20665E0A82 for ; Sat, 25 Jan 2014 14:17:50 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1282633DA56 for ; Sat, 25 Jan 2014 14:17:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id CFD6118082 for ; Sat, 25 Jan 2014 14:17:47 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1390659212.3e54f804c49b2ebba08f06556ccfad1a3d4bc682.ulm@gentoo> Subject: [gentoo-commits] proj/emacs-tools:ebuild-mode commit in: / X-VCS-Repository: proj/emacs-tools X-VCS-Files: ChangeLog keyword-generation.sh X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 3e54f804c49b2ebba08f06556ccfad1a3d4bc682 X-VCS-Branch: ebuild-mode Date: Sat, 25 Jan 2014 14:17:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9e8df6da-268d-40bf-b05a-331eb7631ad1 X-Archives-Hash: 7986cce6076a3698e97ec6d9ae77dbc4 commit: 3e54f804c49b2ebba08f06556ccfad1a3d4bc682 Author: Ulrich Müller gentoo org> AuthorDate: Sat Jan 25 14:13:32 2014 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sat Jan 25 14:13:32 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=3e54f804 Exclude internal eclass functions. * keyword-generation.sh: Exclude functions that are marked as internal in eclass documentation. --- ChangeLog | 5 +++++ keyword-generation.sh | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 396c7e5..c70c030 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-01-25 Ulrich Müller + + * keyword-generation.sh: Exclude functions that are marked as + internal in eclass documentation. + 2014-01-23 Ulrich Müller * Version 1.25 released. diff --git a/keyword-generation.sh b/keyword-generation.sh index 09f028d..8a70abe 100755 --- a/keyword-generation.sh +++ b/keyword-generation.sh @@ -35,13 +35,20 @@ for (( i = 0; i < ${#ECLASSES[@]}; i++ )); do file=${ECLASSFILES[i]} grep -q "^# @DEAD$" "${file}" && continue - functions=$(env -i bash -c ". ${file}; declare -F" 2>/dev/null \ - | sed 's/.*[[:space:]]//;/^_/d;s/.*/"&"/') + # Get list of functions defined in eclass + fn_all=$(env -i bash -c ". ${file}; declare -F" 2>/dev/null \ + | sed 's/.*[[:space:]]//') + + # Parse eclass documentation for internal functions + fn_internal=$(sed -n '/^# @FUNCTION:/{h;:x;n;/^# @INTERNAL/{g; + s/^# @[^:]*:[[:space:]]*//;p};/^# @/bx}' "${file}") + + functions=$(echo "${fn_all}" | grep -v '^_' | grep -Fvx "${fn_internal}") [[ -z ${functions} ]] && continue { echo "(defvar ebuild-mode-keywords-${eclass%.eclass}" - echo " '(("${functions}")" + echo " '(("$(echo "${functions}" | sed 's/.*/"&"/')")" echo " font-lock-type-face))" echo } >>"${TMPFILE}"