So I've recently started using gud's M-x gdb
instead of gdb on it's own, as it provides Emacs with some nice IDE features, mainly being able to see where you are in the code, and where you have set breakpoints.
Emacs will place an image to the left of a line if a breakpoint has been set there, as seen here:
What I would like to do is change that image, so that it's no longer a red circle and instead something a bit less... ugly...
I did some digging into the code, and found what I think is where the icons are set/handled. In lisp/progmodes/gdb-mi.el
, we have the following blocks:
(defconst breakpoint-xpm-data
"/* XPM */
static char *magick[] = {
/* columns rows colors chars-per-pixel */
\"10 10 2 1\",
\" c red\",
\"+ c None\",
/* pixels */
\"+++ +++\",
\"++ ++\",
\"+ +\",
\" \",
\" \",
\" \",
\" \",
\"+ +\",
\"++ ++\",
\"+++ +++\",
};"
"XPM data used for breakpoint icon.")
(defconst breakpoint-enabled-pbm-data
"P1
10 10\",
0 0 0 0 1 1 1 1 0 0 0 0
0 0 0 1 1 1 1 1 1 0 0 0
0 0 1 1 1 1 1 1 1 1 0 0
0 1 1 1 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 1 1 1 0
0 0 1 1 1 1 1 1 1 1 0 0
0 0 0 1 1 1 1 1 1 0 0 0
0 0 0 0 1 1 1 1 0 0 0 0"
"PBM data used for enabled breakpoint icon.")
(defconst breakpoint-disabled-pbm-data
"P1
10 10\",
0 0 1 0 1 0 1 0 0 0
0 1 0 1 0 1 0 1 0 0
1 0 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1
0 0 1 0 1 0 1 0 1 0
0 0 0 1 0 1 0 1 0 0"
"PBM data used for disabled breakpoint icon.")
Which I believe are the variable I want to change. However, these are in the Emacs sources and are declared with defconst
, so what could I put in my init.el
to be able to change these and have my icons look a bit nicer? Or at least be able to change their color.