changeset 107742:db1729fac410

tmm.el (tmm-get-keymap): Check with symbolp before passing value to fboundp, it may not be a symbol.
author Jan D. <jan.h.d@swipnet.se>
date Fri, 02 Apr 2010 11:44:50 +0200
parents 0e10810ea0f9
children df7bafcc5fb7
files lisp/ChangeLog lisp/tmm.el
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Apr 01 08:50:44 2010 +0200
+++ b/lisp/ChangeLog	Fri Apr 02 11:44:50 2010 +0200
@@ -1,3 +1,8 @@
+2010-04-02  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* tmm.el (tmm-get-keymap): Check with symbolp before passing
+	value to fboundp, it may not be a symbol.
+
 2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
 
 	* cus-edit.el (custom-buffer-sort-alphabetically): Update
--- a/lisp/tmm.el	Thu Apr 01 08:50:44 2010 +0200
+++ b/lisp/tmm.el	Fri Apr 02 11:44:50 2010 +0200
@@ -452,20 +452,21 @@
       (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 @@
 	      ((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)))