From 98a8938cdd30115781e81c091a759d188f7fd968 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 6 Aug 2001 10:41:52 +0000 Subject: [PATCH] (tool-bar-add-item-from-menu): Handle old-style menu definitions. --- lisp/ChangeLog | 11 ++++++++--- lisp/toolbar/tool-bar.el | 12 +++++++++--- src/ChangeLog | 4 ++++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b723d3b4d9..b4da1805df2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,11 +1,16 @@ +2001-08-06 Gerd Moellmann + + * toolbar/tool-bar.el (tool-bar-add-item-from-menu): Handle + old-style menu definitions. + 2001-08-06 Pavel Jan,Bm(Bk * textmodes/makeinfo.el, textmodes/page-ext.el, textmodes/page.el, - textmodes/text-mode.el, textmodes/two-column.el: Keywords added. + * textmodes/text-mode.el, textmodes/two-column.el: Keywords added. * play/studly.el, mail/unrmail.el, emacs-lisp/lucid.el, - emulation/pc-mode.el, diff.el, textmodes/fill.el, abbrev.el, - add-log.el, faces.el, mail/sc.el: specify FSF as Maintainer. + * emulation/pc-mode.el, diff.el, textmodes/fill.el, abbrev.el, + * add-log.el, faces.el, mail/sc.el: Specify FSF as Maintainer. 2001-08-05 Pavel Jan,Bm(Bk diff --git a/lisp/toolbar/tool-bar.el b/lisp/toolbar/tool-bar.el index 86be7b97b96..d3cd8749a2f 100644 --- a/lisp/toolbar/tool-bar.el +++ b/lisp/toolbar/tool-bar.el @@ -1,6 +1,6 @@ ;;; tool-bar.el --- setting up the tool bar ;; -;; Copyright (C) 2000 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;; ;; Author: Dave Love ;; Keywords: mouse frames @@ -164,8 +164,14 @@ function." (setq submap (eval submap))) (unless (image-mask-p image) (setq image (append image '(:mask heuristic)))) - (define-key-after tool-bar-map (vector key) - (append (cdr (assq key (cdr submap))) (list :image image) props))))) + (let ((defn (assq key (cdr submap)))) + (if (eq (cadr defn) 'menu-item) + (define-key-after tool-bar-map (vector key) + (append (cdr defn) (list :image image) props)) + (setq defn (cdr defn)) + (define-key-after tool-bar-map (vector key) + (append `(menu-item ,(car defn) ,(cddr defn)) + (list :image image) props))))))) ;;; Set up some global items. Additions/deletions up for grabs. diff --git a/src/ChangeLog b/src/ChangeLog index 630824d6c4b..9a71e1ee72b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2001-08-06 Pavel Jan,Bm(Bk + + * alloc.c (init_stack): Remove declaration. + 2001-08-03 Gerd Moellmann * keyboard.c (read_key_sequence): Check that key is an integer -- 2.39.2