• Mark Oteiza's avatar
    Implement and-let* · 4612b2a2
    Mark Oteiza authored
    This also includes changes to if-let and when-let.  The single tuple
    special case is ambiguous, and binding a symbol to nil is not as
    useful as binding it to its value outside the lexical scope of the
    binding.  (Bug#28254)
    * etc/NEWS: Mention.
    * lisp/emacs-lisp/subr-x.el (internal--listify):
    (internal--build-binding-value-form): Extend to account for
    solitary symbols and (EXPR) items in binding varlist.
    (if-let*, when-let*): Nix single tuple case and incumbent
    bind-symbol-to-nil behavior.
    (and-let*): New macro.
    (if-let, when-let): Mark obsolete.  Redefine in terms of if-let*, so
    they implicitly gain the new features without breaking existing code.
    * test/lisp/emacs-lisp/subr-x-tests.el: Adjust tests for: lack of
    single-tuple special case, lack of binding solitary symbols to nil,
    and the introduction of uninterned symbols for (EXPR) bindings.  Add
    SRFI-2 test suite adapted to Elisp.
NEWS 64.4 KB