Hello,
Just to mention that the code based on cl-progv which I have supplied does not
work. I don't have any time to investigate why, so if you want to take my
patch, please take the 1st one (that based on lambda).
Vincent.
________________________________
De : Vincent Belaïche <vincent....@hotmail.fr>
Envoyé : jeudi 29 juin 2017 15:05
À : Roland Winkler; BBDB info list
Objet : RE: bbdb-print.el lexical binding breaks bbdb-print-record
Ooops... there was some mistake in the code based on cl-progv which I supplied.
Just to be 100% clear about this alternative solution, it would be as in the
attached patch bug-1.diff.
V.
________________________________
De : Vincent Belaïche <vincent....@hotmail.fr>
Envoyé : jeudi 29 juin 2017 13:24:53
À : Roland Winkler; BBDB info list
Objet : bbdb-print.el lexical binding breaks bbdb-print-record
Hello Roland,
With lexical binding bbdb-print-record makes a void variable error on address
variable.
Attached is a fix. I use a lambda expression to make the binding dynmical so
that bbdb-print-require can be evalled in the correct context. An alternative
fix would have been to use :
(cl-progv '(first-letter name organization mail phone address xfields) (list
first-letter name organization mail phone address xfields)).
Well, to avoid any duplication in this case, it would be better to use some
macro like this:
(defmacro bbdb-do-cl-progv (&rest l)
`(cl-progv (quote ,l) (list ,@l)))
and then in bdbd-print-record:
(bbdb-do-cl-progv first-letter name organization mail phone address
xfields)(list first-letter name organization mail phone address xfields)
Anyway, I prefer the lambda trick, I don't like cl-progv and eval. Probably
lambdas are more portable to old Emacs versions.
Vincent.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/