[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Undefined behavior for the function ‘last’ or an error?
From: |
Drew Adams |
Subject: |
RE: [External] : Undefined behavior for the function ‘last’ or an error? |
Date: |
Mon, 1 Apr 2024 19:25:27 +0000 |
> > IMO this should be fixed. Someone(TM) will
> > maybe say it's intentional (but then it
> > should be doc'd).
>
> Also, if it is intentional, then it should be documented why it is
> inconsistent with how the related functions ‘butlast’ and ‘nbutlast’
> behave so that users do not expect those two functions to accept
> non-lists as an argument.
>
> Also, checking a few other list functions, ‘nthcdr’, ‘take’, and
> ‘ntake’, there is a similar inconsistent result that might be
> intentional or not. The behavior of ‘nthcdr’ is unexpected, while the
> behavior of ‘take’ and ‘ntake’ are unpredictable because these are
> Emacs-Lisp-specific functions.
I suggest you do: `M-x report-emacs-bug'.
Thanks for uncovering this.