【问题标题】:How to get C-x C-e to display the result in octal and hexadecimal by default?如何让 C-x C-e 默认以八进制和十六进制显示结果?
【发布时间】:2010-06-24 18:34:06
【问题描述】:

当我第二次在数值表达式上点击 C-x C-e 时,迷你缓冲区会以八进制和十六进制显示结果。这是记录在here

有没有办法在第一个 C-x C-e 上获得十六进制和八进制的结果?

【问题讨论】:

    标签: emacs elisp


    【解决方案1】:

    您可以通过此建议获得该行为。注意,我让它也适用于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))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-03-11
      • 1970-01-01
      • 2021-06-08
      • 2011-09-12
      • 2016-09-04
      • 2018-01-26
      • 2011-08-21
      相关资源
      最近更新 更多