How to overcome the lack of local variable for emacs lisp closure

前端 未结 4 1771
忘了有多久
忘了有多久 2021-02-08 02:53

I\'m now studying Emacs Lisp from the reference manual and Common Lisp from a LISP Book.

from the Common Lisp book

>> (setf power-of-two
     (let          


        
4条回答
  •  北恋
    北恋 (楼主)
    2021-02-08 03:09

    Emacs24 from bzr now supports lexical binding out of the box; it just isn't activated by default since there are many packages which still deliberately or inadvertently depend on dynamical scoping. Your above code should work just fine in Emacs24 in a buffer where the variable 'lexical-binding' is set to 't'.

提交回复
热议问题