In the latest Emacs 32.2 pretest, a require of bbdb-gnus leads to a
buffer popping up saying "save-excursion defeated by set-buffer". This
is due to a defadvice in bbdb-com.el, using the "(save-excursion
(set-buffer ..."  construct, which now emits the above warning. This can
be fixed by applying the attached patch.

(BTW: I guess one could get rid of this defadvice-hack by using
`choose-completion-string-functions', which I think was introduced in
Emacs 22.)

Regards,
David

Index: bbdb-com.el
===================================================================
RCS file: /cvsroot/bbdb/bbdb/lisp/bbdb-com.el,v
retrieving revision 1.203
diff -u -r1.203 bbdb-com.el
--- bbdb-com.el	16 Mar 2008 23:05:22 -0000	1.203
+++ bbdb-com.el	23 Feb 2010 14:21:21 -0000
@@ -2272,9 +2272,8 @@
 We need to do this as we are abusing completion and it was not meant to work
 in buffer other than the mini buffer."
   (when bbdb-complete-name-callback-data
-    (save-excursion
-      (set-buffer (car bbdb-complete-name-callback-data))
-      (apply 'delete-region (cdr  bbdb-complete-name-callback-data)))))
+    (with-current-buffer (car bbdb-complete-name-callback-data))
+      (apply 'delete-region (cdr  bbdb-complete-name-callback-data))))
 
 (defcustom bbdb-complete-name-allow-cycling t
   "Whether to allow cycling of email addresses when calling
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to