Alex Schroeder <[EMAIL PROTECTED]> writes: > 1. start emacs -q. > 2. load bbdb.el > 3. evaluate the following piece of code: > > (defcustom wiki-directory "~/Wiki" > "Directory where all wikis are stored. > This can be either a string or a list of strings." > :group 'wiki > :type '(choice directory > (repeat :tag "List of directories" directory))) > > 4. M-x customize-option RET wiki-directory RET > 5. choose editable-list from the Value Menu > 6. choose INS > 7. add the string "aa" to the list > 8. choose next INS > 9. add the string "bb" to the list > 10. choose State and select "Set for Current Session" > > You will receive the error: > > Invalid function: (macro lambda (c) (\` (char-or-string-p (\, c)))) When bbdb.el is loaded in Emacs, characterp defined as macro. In Emacs 20, characterp is called if fboundp. This is bad, at least defmacro characterp causes trouble in other packages. The attached patch fixes the bug. I did not check it in because I don't use VM. Please test bbdb/vm-prompt-for-create before check in it. ShengHuo -- (setq gnus-posting-styles '((".*" (signature (format "(setq gnus-posting-styles '%S)" gnus-posting-styles)))))
--- bbdb.el.~1.134.~ Fri Feb 9 08:13:51 2001 +++ bbdb.el Sat Feb 10 00:38:24 2001 @@ -69,9 +69,6 @@ (defmacro with-current-buffer (buf &rest body) `(save-current-buffer (set-buffer ,buf) ,@body))) -(unless (fboundp 'characterp) - (defmacro characterp(c) `(char-or-string-p ,c))) ;; XXX close - (unless (fboundp 'display-message) (defmacro display-message (type mess) `(message ,mess))) --- bbdb-vm.el.~1.78.~ Wed Feb 7 17:12:48 2001 +++ bbdb-vm.el Sat Feb 10 00:40:33 2001 @@ -244,6 +244,10 @@ "Used for inter-function communication between the functions `bbdb/vm-update-records' and `bbdb/vm-prompt-for-create'.") +(if (fboundp 'characterp) + (defalias 'bbdb/vm-characterp 'characterp) + (defalias 'bbdb/vm-characterp 'char-or-string-p)) + ;; This is a hack. The function is called by bbdb-annotate-message-sender and ;; uses the above variable in order to manipulate bbdb/vm-update-records. ;; Some cases are handled with signals in order to keep the changes in @@ -252,7 +256,7 @@ (let ((old-offer-to-create bbdb/vm-offer-to-create)) (when (or (bbdb-invoke-hook-for-value bbdb/prompt-for-create-p) bbdb/vm-offer-to-create) - (when (not (characterp bbdb/vm-offer-to-create)) + (when (not (bbdb/vm-characterp bbdb/vm-offer-to-create)) (message (format "%s is not in the db; add? (y,!,n,s,q)" (or (car bbdb/vm-address) (cadr bbdb/vm-address)))) (setq bbdb/vm-offer-to-create (read-char)))