GNU bug report logs -
#67669
29.1; Drop text suggesting using `and' to replace `if'
Previous Next
Reported by: Xiyue Deng <manphiz <at> gmail.com>
Date: Wed, 6 Dec 2023 21:48:01 UTC
Severity: normal
Found in version 29.1
Done: Xiyue Deng <manphiz <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Xiyue Deng <manphiz <at> gmail.com>
> Date: Wed, 06 Dec 2023 13:47:02 -0800
>
>
> In section "the `kill-new' function" - the third last paragraph to be
> precise - there are some texts in parentheses that discusses potentially
> using an `and' to replace the `if' statement being discussed. It looks
> like to be referring to an earlier version of the code example[1] before
> using the version from Emacs 22. Meanwhile, it looks like relying on
> the side effect of `and' to emulate an `if' may not be a good idea
> nowadays. So is it OK to drop this advice?
AFAIU, the relevant fragment is:
The expression looks like this:
(if interprogram-cut-function
(funcall interprogram-cut-function string (not replace))))
If an ‘interprogram-cut-function’ exists, then Emacs executes
‘funcall’, which in turn calls its first argument as a function and
passes the remaining arguments to it. (Incidentally, as far as I can
see, this ‘if’ expression could be replaced by an ‘and’ expression
similar to the one in the first part of the function.)
I don't see anything wrong here. Can you elaborate on why you think
the text in parentheses is inaccurate or incorrect or unclear?
Thanks.
This bug report was last modified 1 year and 224 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.