tags:

views:

47

answers:

1

When I hit C-x C-e on a numeric expression a second time, the mini-buffer displays the result in octal and hexadecimal. This is documented here

Is there a way to get the result in hex and octal on the first C-x C-e?

+1  A: 

You can get that behavior with this advice. Note, I made it also work for eval-print-last-sexp (aka C-j). Just remove that from the list if you don't want that behavior.

(defadvice eval-expression-print-format (around eepf-tweak-output activate)
  "tweak output when this-command is eval-last-sexp or eval-print-last-sexp"
  (let ((last-command (if (memq this-command '(eval-last-sexp eval-print-last-sexp))
                          this-command
                        last-command)))
    ad-do-it))
Trey Jackson