GNU bug report logs - #63311
30.0.50; [PATCH] smtpmail-send-it split

Previous Next

Package: emacs;

Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>

Date: Fri, 5 May 2023 15:10:01 UTC

Severity: wishlist

Tags: patch

Found in version 30.0.50

Full log


Message #38 received at 63311 <at> debbugs.gnu.org (full text, mbox):

From: Ruijie Yu <ruijie <at> netyu.xyz>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 63311 <at> debbugs.gnu.org
Subject: Re: bug#63311: 30.0.50; [PATCH] smtpmail-send-it split
Date: Fri, 12 May 2023 15:10:21 +0800
Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> writes:

> BTW, do you know a more elisp way of defining a function than
> "(let ((f #'(lambda…))))" form?

First of all, I believe you can always get rid of the function quote
because λ is a self-evaluating form.  Not quite sure if
`lexical-binding' makes a difference here though.

Option 1:

```emacs-lisp
(eval-when-compile (require 'cl-macs))
(cl-flet ((f (arg) 'expressions))
  (f arg))
```

Option 2:

```emacs-lisp
(eval-when-compile (require 'cl-macs))
(cl-letf (((symbol-function 'f)
           (lambda (arg) 'expression)))
  (f arg))
```

-- 
Best,


RY




This bug report was last modified 1 year and 220 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.