From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: replace letf with cl-letf in org-mime Date: Sun, 22 Mar 2015 22:30:41 +0800 Message-ID: <87oanlm7e6.fsf@ericabrahamsen.net> References: <87wq29m8zm.fsf@ericabrahamsen.net> <87iodt2k3i.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZguB-0005L6-5L for emacs-orgmode@gnu.org; Sun, 22 Mar 2015 10:31:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YZgu6-0005yf-65 for emacs-orgmode@gnu.org; Sun, 22 Mar 2015 10:31:07 -0400 Received: from plane.gmane.org ([80.91.229.3]:60844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZgu5-0005yb-Vy for emacs-orgmode@gnu.org; Sun, 22 Mar 2015 10:31:02 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YZgtx-0002oz-F2 for emacs-orgmode@gnu.org; Sun, 22 Mar 2015 15:30:55 +0100 Received: from 123.123.17.56 ([123.123.17.56]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Mar 2015 15:30:53 +0100 Received: from eric by 123.123.17.56 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Mar 2015 15:30:53 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Hello, > > Eric Abrahamsen 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,