默认情况下如何获取C-x C-e以八进制和十六进制显示结果? [英] How to get C-x C-e to display the result in octal and hexadecimal by default?
本文介绍了默认情况下如何获取C-x C-e以八进制和十六进制显示结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我第二次在数字表达式上按下 C-x C-e 时,迷你缓冲区以八进制和十六进制显示结果。记录在此处
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
有没有办法在第一个 Cx Ce 上以十六进制和八进制形式获得结果?
Is there a way to get the result in hex and octal on the first C-x C-e?
推荐答案
您可以通过此建议获得该行为。请注意,我也将其用于 eval-print-last-sexp
(又名 C-j )。只需将其从列表中删除即可。
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))
这篇关于默认情况下如何获取C-x C-e以八进制和十六进制显示结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文