From: Jan Djärv Date: Fri, 2 Apr 2010 09:44:50 +0000 (+0200) Subject: tmm.el (tmm-get-keymap): Check with symbolp before passing X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~608 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d0b228766f1471ed104d2e038f63cd4627d79b57;p=emacs.git tmm.el (tmm-get-keymap): Check with symbolp before passing value to fboundp, it may not be a symbol. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7a9fae9f412..1bbc73872ab 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-04-02 Jan Djärv + + * tmm.el (tmm-get-keymap): Check with symbolp before passing + value to fboundp, it may not be a symbol. + 2010-03-31 Chong Yidong * cus-edit.el (custom-buffer-sort-alphabetically): Update diff --git a/lisp/tmm.el b/lisp/tmm.el index f4ae3c110d5..97f017e2352 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -452,20 +452,21 @@ It uses the free variable `tmm-table-undef' to keep undefined keys." (unless (assoc event tmm-table-undef) (cond ((if (listp elt) (or (keymapp elt) (eq (car elt) 'lambda)) - (fboundp elt)) + (and (symbolp elt) (fboundp elt))) (setq km elt)) ((if (listp (cdr-safe elt)) (or (keymapp (cdr-safe elt)) (eq (car (cdr-safe elt)) 'lambda)) - (fboundp (cdr-safe elt))) + (and (symbolp (cdr-safe elt)) (fboundp (cdr-safe elt)))) (setq km (cdr elt)) (and (stringp (car elt)) (setq str (car elt)))) ((if (listp (cdr-safe (cdr-safe elt))) (or (keymapp (cdr-safe (cdr-safe elt))) (eq (car (cdr-safe (cdr-safe elt))) 'lambda)) - (fboundp (cdr-safe (cdr-safe elt)))) + (and (symbolp (cdr-safe (cdr-safe elt)) + (fboundp (cdr-safe (cdr-safe elt)))))) (setq km (cddr elt)) (and (stringp (car elt)) (setq str (car elt))) (and str @@ -499,7 +500,8 @@ It uses the free variable `tmm-table-undef' to keep undefined keys." ((if (listp (cdr-safe (cdr-safe (cdr-safe elt)))) (or (keymapp (cdr-safe (cdr-safe (cdr-safe elt)))) (eq (car (cdr-safe (cdr-safe (cdr-safe elt)))) 'lambda)) - (fboundp (cdr-safe (cdr-safe (cdr-safe elt))))) + (and (symbolp (cdr-safe (cdr-safe (cdr-safe elt)))) + (fboundp (cdr-safe (cdr-safe (cdr-safe elt)))))) ; New style of easy-menu (setq km (cdr (cddr elt))) (and (stringp (car elt)) (setq str (car elt)))