[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 23.0.50; tool bar icons disappear in customize buffers
From: |
martin rudalics |
Subject: |
Re: 23.0.50; tool bar icons disappear in customize buffers |
Date: |
Fri, 04 Jan 2008 19:28:52 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
Is the following code in `cus-edit.el' correct? Is this code
evaluated at compile time (when `display-graphic-p' returns nil?)?
(defvar tool-bar-map)
(defvar custom-tool-bar-map
(if (display-graphic-p)
(let ((map (make-sparse-keymap)))
(mapc
(lambda (arg)
(tool-bar-local-item-from-menu
(nth 1 arg) (nth 4 arg) map custom-mode-map))
custom-commands)
map)))
I can't tell because tool-bars are displayed here. But you could verify
your claim by using something like the untested patch I attached.
*** cus-edit.el.~1.337.~ Thu Nov 22 17:49:48 2007
--- cus-edit.el Fri Jan 4 19:25:34 2008
***************
*** 4459,4473 ****
custom-commands)))
(defvar tool-bar-map)
! (defvar custom-tool-bar-map
! (if (display-graphic-p)
! (let ((map (make-sparse-keymap)))
! (mapc
! (lambda (arg)
! (tool-bar-local-item-from-menu
! (nth 1 arg) (nth 4 arg) map custom-mode-map))
! custom-commands)
! map)))
;;; The Custom Mode.
--- 4459,4465 ----
custom-commands)))
(defvar tool-bar-map)
! (defvar custom-tool-bar-map nil)
;;; The Custom Mode.
***************
*** 4528,4534 ****
if that value is non-nil."
(use-local-map custom-mode-map)
(easy-menu-add Custom-mode-menu)
! (set (make-local-variable 'tool-bar-map) custom-tool-bar-map)
(make-local-variable 'custom-options)
(make-local-variable 'custom-local-buffer)
(make-local-variable 'widget-documentation-face)
--- 4520,4535 ----
if that value is non-nil."
(use-local-map custom-mode-map)
(easy-menu-add Custom-mode-menu)
! (when (display-graphic-p)
! (set (make-local-variable 'tool-bar-map)
! (or custom-tool-bar-map
! (let ((map (make-sparse-keymap)))
! (mapc
! (lambda (arg)
! (tool-bar-local-item-from-menu
! (nth 1 arg) (nth 4 arg) map custom-mode-map))
! custom-commands)
! (setq custom-tool-bar-map map)))))
(make-local-variable 'custom-options)
(make-local-variable 'custom-local-buffer)
(make-local-variable 'widget-documentation-face)