[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] replace letf with cl-letf in org-mime
From: |
Eric Abrahamsen |
Subject: |
Re: [O] replace letf with cl-letf in org-mime |
Date: |
Sun, 22 Mar 2015 22:30:41 +0800 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Nicolas Goaziou <address@hidden> writes:
> Hello,
>
> Eric Abrahamsen <address@hidden> writes:
>
>> It's amazing what an effect barky compiler errors can have.
>
> Thanks. However, `cl-flet' is not supported in Emacs 23 so it's not an
> option for Org 8.3.
Oh, okay -- I guess I'd never really been aware of what Emacs version we
were maintaining compatibility with. That's good to know. I'll do
another version of this in the morning.
> OTOH, most uses of `flet' can be replaced with a plain `lambda' and
> funcalls.
>
>> - (flet ((mp (p) (org-entry-get nil p org-mime-use-property-inheritance)))
>> + (cl-flet ((mp (p) (org-entry-get nil p
>> org-mime-use-property-inheritance)))
>> (let* ((file (buffer-file-name (current-buffer)))
>> (subject (or (mp "MAIL_SUBJECT") (nth 4 (org-heading-components))))
>> (to (mp "MAIL_TO"))
>
> (let* ((mp (lambda (p) (org-entry-get nil p
> org-mime-use-property-inheritance))))
> (file (buffer-file-name (current-buffer)))
> (subject (or (funcall mp "MAIL_SUBJECT") (nth 4
> (org-heading-components))))
> (to (funcall mp "MAIL_TO"))
> ...)
>
>
> Regards,