[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : Re: Is this a bug in while-let or do I missunderstand i
From: |
Alfred M. Szmidt |
Subject: |
Re: [External] : Re: Is this a bug in while-let or do I missunderstand it? |
Date: |
Sat, 09 Nov 2024 13:18:41 -0500 |
I'm not saying no one should use, or Elisp
shouldn't provide, if/and/when/while-let[*]
thingies. I'm just saying (1) I don't find
them helpful, personally (I don't use them),
and (more importantly) (2) if we provide them
then their doc needs to be very specific about
what _exactly_ they do, and when (if not also
how).
Agreed. I was looking of the usages of WHILE-LET in Emacs, and each
time it is used it is quite confusing. For example this:
(while-let ((b)
((< b end))
(e (next-single-property-change (1+ b) 'erc--msg nil end)))
(save-restriction
(narrow-to-region b e)
(funcall fn))
(setq b e))
If the bindings are to be reevaluated on each iteration, shouldn't B
always be NIL, and that it would end up with (< NIL end) would be on
each iteration causing an error?
How can (< b end) even be a spec binding here -- shouldn't that be an
error?
The exapanded code looks like this:
(catch 'done39
(while t
(let* ((s (and t b))
(s (and s (< b end)))
(e (and s (next-single-property-change ... ... nil end))))
(if e
(progn
(save-restriction (narrow-to-region b e) (funcall fn))
(setq b e))
(throw 'done39 nil)))))
- Sv: Is this a bug in while-let or do I missunderstand it?, (continued)
- Sv: Is this a bug in while-let or do I missunderstand it?, arthur miller, 2024/11/09
- Re: Is this a bug in while-let or do I missunderstand it?, Yuri Khan, 2024/11/09
- Sv: Is this a bug in while-let or do I missunderstand it?, arthur miller, 2024/11/09
- Re: Is this a bug in while-let or do I missunderstand it?, Yuri Khan, 2024/11/09
- Sv: Is this a bug in while-let or do I missunderstand it?, arthur miller, 2024/11/09
- Re: Is this a bug in while-let or do I missunderstand it?, Alfred M. Szmidt, 2024/11/09
- Re: Is this a bug in while-let or do I missunderstand it?, Eli Zaretskii, 2024/11/09
- Re: Is this a bug in while-let or do I missunderstand it?, Eli Zaretskii, 2024/11/09
- Re: Is this a bug in while-let or do I missunderstand it?, Andreas Schwab, 2024/11/09
- RE: [External] : Re: Is this a bug in while-let or do I missunderstand it?, Drew Adams, 2024/11/09
- Re: [External] : Re: Is this a bug in while-let or do I missunderstand it?,
Alfred M. Szmidt <=
- Re: [External] : Re: Is this a bug in while-let or do I missunderstand it?, Jens Schmidt, 2024/11/09
- Re: [External] : Re: Is this a bug in while-let or do I missunderstand it?, Alfred M. Szmidt, 2024/11/09
- Re: [External] : Re: Is this a bug in while-let or do I missunderstand it?, Joost Kremers, 2024/11/09
- Re: [External] : Re: Is this a bug in while-let or do I missunderstand it?, Alfred M. Szmidt, 2024/11/10
- Re: Better documentation for non-binding clauses of if-let and friends, Jens Schmidt, 2024/11/10
- Re: Better documentation for non-binding clauses of if-let and friends, Sean Whitton, 2024/11/10
- Re: Better documentation for non-binding clauses of if-let and friends, Jens Schmidt, 2024/11/10
- Re: Better documentation for non-binding clauses of if-let and friends, Alfred M. Szmidt, 2024/11/11
- Re: Better documentation for non-binding clauses of if-let and friends, Alfred M. Szmidt, 2024/11/11
- Sv: [External] : Re: Is this a bug in while-let or do I missunderstand it?, arthur miller, 2024/11/10