emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master c8a2af3037 1/3: Add new function function-alias-p


From: Robert Pluim
Subject: Re: master c8a2af3037 1/3: Add new function function-alias-p
Date: Thu, 13 Jan 2022 11:41:03 +0100

>>>>> On Thu, 13 Jan 2022 03:49:27 -0500 (EST), Lars Ingebrigtsen 
>>>>> <larsi@gnus.org> said:

    Lars> branch: master
    Lars> commit c8a2af3037c647bf6dd53f53af1b344e284f809b
    Lars> Author: Lars Ingebrigtsen <larsi@gnus.org>
    Lars> Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Lars>     Add new function function-alias-p
    
    Lars>     * doc/lispref/functions.texi (Defining Functions): Document it.
    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.texi
    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 for 
other
    Lars>  purposes, it is better to use @code{fset}, which does not keep such
    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 object 
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ʼs 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
-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]