I was trying to change defconst value for a tabbar image, the following lines are defined in tabbar.el:
(defconst tabbar-scroll-left-button-enabled-image
'((:type pbm :data "\
P2 13 13 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 128 16 48 255 255 255 255 255 255 255
255 144 28 86 128 0 255 255 255 255 255 255 160 44 92 159 135 113 0
255 255 255 255 160 44 97 165 144 129 120 117 0 255 255 176 44 98 175
174 146 127 126 127 128 0 255 255 0 160 184 156 143 136 134 135 137
138 0 255 255 176 32 67 144 146 144 145 146 148 149 0 255 255 255 255
160 42 75 140 154 158 159 160 0 255 255 255 255 255 255 160 40 74 154
170 171 0 255 255 255 255 255 255 255 255 160 41 82 163 0 255 255 255
255 255 255 255 255 255 255 160 32 48 255 255 255 255 255 255 255 255
255 255 255 255 255 255
"))
"Default image for the enabled scroll left button.
A disabled button image will be automatically build from it.")
So first I put the following lines in my init file but it is not working, but they works if I do replace in the original file tabbar.el:
(defconst tabbar-scroll-left-button-enabled-image
'((:type png :file "~/.emacs.d/new-scroll-left.png" :ascent center))
"Default image for the enabled scroll right button.
A disabled button image will be automatically build from it.")
Since I still want to redefine the image in my init file not modify tabbar.el directly, then I tried to append the defcustom found in tabbar.el calling tabbar-scroll-left-button-enabled-image also in the init file:
(defcustom tabbar-scroll-left-button
(cons (cons " <" tabbar-scroll-left-button-enabled-image)
(cons " =" nil))
"The scroll left button.
The variable `tabbar-button-widget' gives details on this widget."
:group 'tabbar
:type tabbar-button-widget
:set '(lambda (variable value)
(custom-set-default variable value)
;; Schedule refresh of button value.
(setq tabbar-scroll-left-button-value nil)))
And I found no other functions are calling this defcustom in tabbar.el. However so far it is still not working. Anyone who is familar with tabbar loading its images can possibly help to explain a little bit?