From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: master c8a2af3037 1/3: Add new function function-alias-p Date: Thu, 13 Jan 2022 11:41:03 +0100 Message-ID: <87sftr3olc.fsf@gmail.com> References: <164206376686.342.13318619183595442698@vcs2.savannah.gnu.org> <20220113084927.707D2C0DA30@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17542"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 13 11:44:13 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n7xaX-0004T7-JL for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Jan 2022 11:44:13 +0100 Original-Received: from localhost ([::1]:40504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7xaW-0007R8-13 for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Jan 2022 05:44:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7xXY-0004wH-VA for emacs-devel@gnu.org; Thu, 13 Jan 2022 05:41:08 -0500 Original-Received: from [2a00:1450:4864:20::331] (port=55962 helo=mail-wm1-x331.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7xXX-0001sS-36 for emacs-devel@gnu.org; Thu, 13 Jan 2022 05:41:08 -0500 Original-Received: by mail-wm1-x331.google.com with SMTP id c66so3499283wma.5 for ; Thu, 13 Jan 2022 02:41:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=c0a7UykUexLT9GiZekaQ6dK5HvqJH8+n/Oxj0c5qOLk=; b=Zhf9O/6QdrUyAcwFYFab/ZhPqbNwTthOyyuMAyD3Qlp+jNT6q/at+6bWfYdhE7GT9f PdSbRe4zm5PFvyKspu+wqz+s2U1oDqquGl48fOSFeInpOpJOFDNC2rRcR6aM4Dat497L vUT/eLzrkqGdL+ChAdHRURjxFfuJm6/Zql58sz/iLaaSLtmHqoo0qqMvT3gKPjT5MCiC vZPz2AiCuETz1Vhj6sjI1FZIGPaoNHiFDjcq4cAr3nu3Rzc0ZklvqpZy8Bq2/ek/zZQJ X42GgP+DtuSa6Jux4jsPgPg+CuMNEEVxRPLiZqSKN4AUZ56rbQkQrMOFo1j1X7JOWzBw 41gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=c0a7UykUexLT9GiZekaQ6dK5HvqJH8+n/Oxj0c5qOLk=; b=BRMXAKEPsD/Yl4KuZMV5yq3iEf3Qr0lctJ4Z2Uz/hWda9jdGeSfBEDnnVIBSEvBhmn I8kFVpljUX9j593ndZZZ2p8ekAqDtFh3WQDvQW9EP/5BdPhdTf24VEa/UvCU0yYSJlpj AnqoFRSblg3WYQqaUs1uAsN0HkYFZueQSMox/BiEvzIqDareOmyWsbDPpFMLLWy2tpdU 3iPFAiY+gIH0CL3HygtiVFDj35NZfiIbhZVGbxXig+Au0XxRxc90bgiPaX/BXrmgKejK QMRDgGd3M/fNpqHdeUFOVA4xBlSm29HeMxjshSjysUdU6/ZJ9k/uR2oaHHk9qXJMb+G0 flNQ== X-Gm-Message-State: AOAM5328x4zmAOTmCnQPLAV5nUPdOXS8i9knvqAbUK47LmB2QBFupfEv qGoAet4w/KMTMGeDZkmYP9k= X-Google-Smtp-Source: ABdhPJwch6MJPucdZYVXYnPYBEV7a5lo9PDz5hSxMUDMBP7mCzrcjKQTzMdFoSJ7uthSaTCXmWSwrw== X-Received: by 2002:a1c:9d94:: with SMTP id g142mr3220576wme.139.1642070464657; Thu, 13 Jan 2022 02:41:04 -0800 (PST) Original-Received: from rltb ([2a01:e0a:3f3:fb50:da2c:6e12:f0db:3a30]) by smtp.gmail.com with ESMTPSA id b2sm2617863wrd.35.2022.01.13.02.41.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jan 2022 02:41:04 -0800 (PST) Gmane-Reply-To-List: yes In-Reply-To: <20220113084927.707D2C0DA30@vcs2.savannah.gnu.org> (Lars Ingebrigtsen's message of "Thu, 13 Jan 2022 03:49:27 -0500 (EST)") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::331 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=rpluim@gmail.com; helo=mail-wm1-x331.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:284698 Archived-At: >>>>> On Thu, 13 Jan 2022 03:49:27 -0500 (EST), Lars Ingebrigtsen said: Lars> branch: master Lars> commit c8a2af3037c647bf6dd53f53af1b344e284f809b Lars> Author: Lars Ingebrigtsen Lars> Commit: Lars Ingebrigtsen Lars> Add new function function-alias-p =20=20=20=20 Lars> * doc/lispref/functions.texi (Defining Functions): Document i= t. Lars> * lisp/subr.el (function-alias-p): New function (bug#53178). Lars> --- Lars> doc/lispref/functions.texi | 17 +++++++++++++++++ Lars> etc/NEWS | 5 +++++ Lars> lisp/subr.el | 22 ++++++++++++++++++++++ Lars> test/lisp/subr-tests.el | 17 +++++++++++++++++ Lars> 4 files changed, 61 insertions(+) Lars> diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.t= exi Lars> index 96fecc8c89..caf8e3444f 100644 Lars> --- a/doc/lispref/functions.texi Lars> +++ b/doc/lispref/functions.texi Lars> @@ -667,6 +667,23 @@ which file defined the function, just like @= code{defun} Lars> By contrast, in programs that manipulate function definitions fo= r other Lars> purposes, it is better to use @code{fset}, which does not keep s= uch Lars> records. @xref{Function Cells}. Lars> +@end defun Lars> + Lars> +@defun function-alias-p object &optional noerror Lars> +Use the @code{function-alias-p} function to check whether an obj= ect is Lars> +a function alias. If it isn't, this predicate will return Lars> +non-@code{nil}. If it is, the value returned will be a list of = symbol Lars> +representing the function alias chain. For instance, if @code{a= } is Lars> +an alias for @code{b}, and @code{b} is an alias for @code{c}: Lars> + I think that=CA=BCs not correct (and a bit convoluted). How about: Checks whether @var{object} is a function alias. If it is, it returns a list of symbols representing the function alias chain, else @code{nil}. For instance, if @code{a} is an alias for @code{b}, and @code{b} is an alias for @code{c}: Robert --=20