代码之家  ›  专栏  ›  技术社区  ›  sigjuice

如何让c-x c-e默认显示八进制和十六进制的结果?

  •  1
  • sigjuice  · 技术社区  · 15 年前

    当我击中 C-X-C-E 第二次在数值表达式上,迷你缓冲区以八进制和十六进制显示结果。记录在案 here

    有办法在第一个字母上得到十六进制和八进制的结果吗 C-X-C-E ?

    1 回复  |  直到 14 年前
        1
  •  1
  •   Trey Jackson    15 年前

    你可以通过这个建议得到这种行为。注意,我让它也适用于 eval-print-last-sexp (阿卡 C-J )如果你不想这样做,就从列表中删除它。

    (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))