[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible to conditionally bind variable?
From: |
Rusi |
Subject: |
Re: Possible to conditionally bind variable? |
Date: |
Thu, 11 Sep 2014 20:59:30 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Friday, September 12, 2014 9:25:46 AM UTC+5:30, Rusi wrote:
> On Thursday, September 11, 2014 6:04:33 PM UTC+5:30, Stefan Monnier wrote:
> > (defun go-or-make-agenda (&optional new-frame)
> > (interactive "P")
> > (let ((buffer "\*Org Agenda\*")
> > (some-other-buffer "*scratch*"))
> > (funcall (if new-frame 'switch-to-buffer-other-frame
> > 'switch-to-buffer)
> > (if (get-buffer buffer) buffer some-other-buffer))))
> Seeing this beautiful code, cant help making the remark:
> This is called functional programming; guys like Stefan do it
> guys like talk about it.
that should have been "guys like me talk about it." :-)