[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Evil defvars in org.el
From: |
Bastien |
Subject: |
Re: Evil defvars in org.el |
Date: |
Fri, 27 Apr 2012 08:07:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Chong Yidong <address@hidden> writes:
> org.el (and org-agenda.el, and maybe others) have defvars like this:
>
> (defvar entry)
> (defvar date)
>
> This is going to blow up in someone's face, because it makes `entry' and
> `date' unusable as lexical variables, even though those are very common
> variable names. That is to say, loading Org mode would change the
> behavior of packages using lexical binding in some unpredictable way.
Yes, this is bugging me too.
> Why does org need to do this?
>From latest calendar.el in Emacs:
;; A note on free variables:
;; The calendar passes around a few dynamically bound variables, which
;; unfortunately have rather common names. They are meant to be
;; available for external functions, so the names can't be changed.
;; displayed-month, displayed-year: bound in calendar-generate, the
;; central month of the 3 month calendar window
;; original-date, number: bound in diary-list-entries, the arguments
;; with which that function was called.
;; date, entry: bound in diary-list-sexp-entries (qv)
^^^^ ^^^^^
Org uses those two free variables in several places.
> Could you try to clean it up?
I would love too. Is there anything I can do without messing up with
Calendar's code?
--
Bastien
- Evil defvars in org.el, Chong Yidong, 2012/04/26
- Re: Evil defvars in org.el,
Bastien <=
- Re: Evil defvars in org.el, Bastien, 2012/04/27
- Re: Evil defvars in org.el, Glenn Morris, 2012/04/27
- RE: Evil defvars in org.el, Drew Adams, 2012/04/27
- Re: Evil defvars in org.el, Miles Bader, 2012/04/27
- RE: Evil defvars in org.el, Drew Adams, 2012/04/27
- Re: Evil defvars in org.el, Miles Bader, 2012/04/27
- Re: Evil defvars in org.el, Chong Yidong, 2012/04/27