[Top][All Lists]

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

Re: if-let/if-let*/and-let/..

From: Michael Heerdegen
Subject: Re: if-let/if-let*/and-let/..
Date: Tue, 13 Feb 2018 21:54:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Mark Oteiza <address@hidden> writes:

> If we are ok with breaking code that depends on the special case (SYMBOL
> VALUEFORM) semantics that the original if-let and when-let had, that is:
>   (when-let (a 1) a)
> then we could just make them aliases--they are separate from the
> {if,when}-let* simply to avoid breaking code.

Ah, that was the reason.  I'm not sure whether breaking this would be
less bad than what we have currently.

BTW, these forms don't seem to be used inside Emacs, but two files in
Gnu Elpa use them:

#+begin_src emacs-lisp
;;; *** /home/micha/software/elpa/packages/ebdb/ebdb.el  (1 match)

;;;; Line 5461
(cl-defmethod ebdb-record-search ((record ebdb-record)
                                  (_type (subclass ebdb-field-notes))
                                  (regexp string))
  (if-let (notes (slot-value record 'notes))
      (ebdb-field-search notes regexp)))

;;; *** /home/micha/software/elpa/packages/yasnippet/yasnippet-debug.el  (8 

;;;; Line 76
(when-let (color-ov (gethash location yas-debug-live-indicators)) ..4..)
;;;; Line 173
(when-let (overlay (yas--snippet-control-overlay snippet)) ..4..)
;;;; Line 177
(when-let (active-field (yas--snippet-active-field snippet)) ..7..)
;;;; Line 184
(when-let (exit (yas--snippet-exit snippet)) ..4..)
;;;; Line 298
(when-let (mode (cl-member "-M:" options :test #'string-prefix-p)) ..2..)
;;;; Line 300
(when-let (mode (cl-member "-M." options :test #'string-prefix-p)) ..4..)
;;;; Line 306
(when-let (snippet-file (cl-member "-S:" options :test #'string-prefix-p)) 
;;;; Line 321
(when-let (verbosity (car (or (member "-v" options) (member "-vv" options)))) 


reply via email to

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