This is a follow-up to How to get C-x C-e to display the result in octal and hexadecimal by default?
Is there a way to get C-x C-e to to display the result in decimal and hexadecimal only?
e.g.
(+ 40 2)
should produce
42 (#x2a)
instead of
42 (#o52, #x2a, ?*)
You just need to rewrite/tweak the routine that creates the printed format for this. Add the following to your .emacs and you’ll be good to go.