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 4F2A71392EF for ; Thu, 13 Mar 2014 13:15:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B3ADE0A00; Thu, 13 Mar 2014 13:15: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 AB585E0A00 for ; Thu, 13 Mar 2014 13:15:49 +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 AE20933FB39 for ; Thu, 13 Mar 2014 13:15:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id AC5E6188E9 for ; Thu, 13 Mar 2014 13:15:46 +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: <1394716802.039c9ba08fb383286120aa1d6de8f2861b77f08f.ulm@gentoo> Subject: [gentoo-commits] proj/emacs-tools:eselect-emacs commit in: / X-VCS-Repository: proj/emacs-tools X-VCS-Files: ChangeLog emacs.eselect X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 039c9ba08fb383286120aa1d6de8f2861b77f08f X-VCS-Branch: eselect-emacs Date: Thu, 13 Mar 2014 13:15:46 +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: 12e45dd1-74c6-48bf-8812-cbbf79064e55 X-Archives-Hash: 26b431d2168ee715eacab5821d8353df commit: 039c9ba08fb383286120aa1d6de8f2861b77f08f Author: Ulrich Müller gentoo org> AuthorDate: Thu Mar 13 13:20:02 2014 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Thu Mar 13 13:20:02 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=039c9ba0 Recognise man pages named like the main binary as emacs.1 targets. * emacs.eselect (MANPAGELIST): Now equal to BINARYLIST. (remove_symlinks): Explicitly include "emacs" in for loops. (set_symlinks): Also recognise man pages named like the main binary as possible targets for the emacs.1 symlink. --- ChangeLog | 7 +++++++ emacs.eselect | 20 +++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a079d0c..ce628ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-03-13 Ulrich Müller + + * emacs.eselect (MANPAGELIST): Now equal to BINARYLIST. + (remove_symlinks): Explicitly include "emacs" in for loops. + (set_symlinks): Also recognise man pages named like the main + binary as possible targets for the emacs.1 symlink. + 2014-02-17 Ulrich Müller * Version 1.15 released. diff --git a/emacs.eselect b/emacs.eselect index 2c656b7..524c4c3 100644 --- a/emacs.eselect +++ b/emacs.eselect @@ -26,7 +26,7 @@ VERSION="1.15" # ctags and etags are handled in their own module BINARYLIST="emacsclient b2m ebrowse rcs-checkin grep-changelog" -MANPAGELIST="emacs emacsclient b2m ebrowse rcs-checkin grep-changelog" +MANPAGELIST="${BINARYLIST}" MANPAGELIST_OLD="gfdl" find_targets() { @@ -52,12 +52,11 @@ remove_symlinks() { # Remove existing symlinks to binaries, man pages, # and the env file (own function) local f - rm -f "${EROOT}/usr/bin/emacs" - for f in ${BINARYLIST}; do + for f in emacs ${BINARYLIST}; do rm -f "${EROOT}/usr/bin/${f}" done - for f in ${MANPAGELIST} ${MANPAGELIST_OLD}; do - rm -f "${EROOT}"/usr/share/man/man1/${f}.1* + for f in emacs ${MANPAGELIST} ${MANPAGELIST_OLD}; do + rm -f "${EROOT}/usr/share/man/man1/${f}.1"* done remove_infopath } @@ -77,7 +76,7 @@ set_bin_symlinks() { set_man_symlinks() { # Set symlinks to man pages local target=$1 suffix f i - for f in ${MANPAGELIST}; do + for f in emacs ${MANPAGELIST}; do for i in "${EROOT}/usr/share/man/man1/${f}-${target}.1"*; do if [[ -f ${i} ]]; then # target file exists; determine compression suffix @@ -91,7 +90,7 @@ set_man_symlinks() { set_symlinks() { # Set symlinks to binaries and man pages, update info path - local target=$1 nomain=$2 targets + local target=$1 nomain=$2 targets suffix i # target may be specified by its name or its index if is_number "${target}"; then # numeric index, find the target's name @@ -112,6 +111,13 @@ set_symlinks() { if [[ -z ${nomain} ]]; then ln -s "${target}" "${EROOT}/usr/bin/emacs" \ || die "Couldn't set ${target} ${EROOT}/usr/bin/emacs symlink" + for i in "${EROOT}/usr/share/man/man1/${target}.1"*; do + if [[ -f ${i} ]]; then + suffix=${i##*/"${target}.1"} + ln -s "${target}.1${suffix}" \ + "${EROOT}/usr/share/man/man1/emacs.1${suffix}" + fi + done fi set_bin_symlinks "${target}" set_man_symlinks "${target}"