changeset 34541:99cd5704dacb

(easy-menu-current-active-maps): Test if symbol is bound before getting its value.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 14 Dec 2000 10:36:13 +0000
parents e1e4704de6ed
children dd4372cead8d
files lisp/emacs-lisp/easymenu.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/easymenu.el	Thu Dec 14 10:35:22 2000 +0000
+++ b/lisp/emacs-lisp/easymenu.el	Thu Dec 14 10:36:13 2000 +0000
@@ -1,6 +1,6 @@
 ;;; easymenu.el --- support the easymenu interface for defining a menu.
 
-;; Copyright (C) 1994, 1996, 1998 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Keywords: emulations
 ;; Author: rms
@@ -544,7 +544,9 @@
 (defun easy-menu-current-active-maps ()
   (let ((maps (list (current-local-map) global-map)))
     (dolist (minor minor-mode-map-alist)
-      (if (symbol-value (car minor)) (push (cdr minor) maps)))
+      (when (and (boundp (car minor))
+		 (symbol-value (car minor)))
+	(push (cdr minor) maps)))
     (delq nil maps)))
 
 (defun easy-menu-get-map (map path &optional to-modify)