Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
	autolearn=ham autolearn_force=no version=3.4.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;
        h=from:message-id:date:in-reply-to:comments:references:to:subject
         :mime-version:content-type;
        bh=aNoynNuVPcCPG51TQW9P9C0UFquNTSAiWdaczxPuVn8=;
        b=IeHzlwcRoUjwx5IyGyFiRspIpVmVejrnePk2MaXwJcQJ0yhx12x38JmhvWJSn6G2aG
         ulK9sfrWHyrROjUxV+UuD71com3ypRZdd84oLkPmBQs4arI/m8oxFxFRslK+85jYIinU
         hItFwW/yfq5lD6QFsaQ4RZ+Nk31VjwuGWzQ8XkIQb5oIJUoNE600H0CwZMwKqElB+cPF
         wcsrz3eG2knxXsHrYyh9Wb7N5oKIaNU5Cm/zhQcP0kQ7NUhBvLKwPu/MpVvDAhJYiJCv
         0KP1hsbrz8C357W7INJ76IgCz8jfa2hTChSPqK1LXni8fiVKJGWcY89zxqFrkfhCAn91
         FhHw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:date:in-reply-to:comments
         :references:to:subject:mime-version:content-type;
        bh=aNoynNuVPcCPG51TQW9P9C0UFquNTSAiWdaczxPuVn8=;
        b=Pb3XYlW5rJmf6Eh5kpeitIE4w1qkBqZEqxz5QlP1MV4tBLin/Tt/THU3POE5RwQcNp
         +gK3zOI05GzRWmv+PRh3u69cwVmxUkr7phUwadsSsSvWchy3oLVVrV4QN6ohdsHfAmc1
         Z8gwOUMKlE7Ha/Hs5kG2tCTWaVCIwnSdwhcdzUXfUp5PNd8GPu1BUKD45YxKPT4TIN+O
         ytsJ6HMzV4OC2KlkQZOdlVVSvoEJPS02Rzn6oiVumfV1KUck9uve4TWTZ1mWPa1IpeUB
         ml7bFi4Fmj6hmYUD4IfSh/nVEF1+JoFGWxRsuUyGjSe7y2WiOZo5/oWNoa1gLj4g9Ftu
         k/dA==
X-Gm-Message-State: AG10YOTVMfutt+WLmNQcS4kqbc7kfMSlEYojEAJuYFPBV4K7vMgqOZ9OuFMKaT7e7/XJSQ==
X-Received: by 10.66.101.3 with SMTP id fc3mr51984682pab.2.1454463064680;
        Tue, 02 Feb 2016 17:31:04 -0800 (PST)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160202173200.ZM2203@torch.brasslantern.com>
Date: Tue, 2 Feb 2016 17:32:00 -0800
In-Reply-To: <56B1483C.500@inlv.org>
Comments: In reply to Martijn Dekker <martijn@inlv.org>
        "read-only functions" (Feb  3, 12:22am)
References: <56B1483C.500@inlv.org>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: zsh-workers@zsh.org
Subject: Re: read-only functions
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 37872

On Feb 3, 12:22am, Martijn Dekker wrote:
} Subject: read-only functions
}
} bash and yash have read-only functions using:
} 
} 	readonly -f function_name
} 
} Could this be a feature worth adding to zsh?
} 
} TIA,
} 
} - M.
}-- End of excerpt from Martijn Dekker

On Feb 3, 12:22am, Martijn Dekker wrote:
}
} 	readonly -f function_name
} 
} Could this be a feature worth adding to zsh?

Related question:  Given that presently it doesn't mean that, why does
reaonly even accept the -f option?  All it does is the wrong thing,
i.e., makes "readonly -f" behave like "functions" (it should at least
behave like "functions -r" which is currently an error).

Obviously typeset -r accepts -f because both -r and -f independently do
mean something and in general we haven't rigorously coded for mutually
exclusive options.

Anyway there doesn't seem to be any particular obstacle to applying
the PM_READONLY flag to shfunc nodes.

