2

我刚刚安装realgud,以便可以trepan2用于在 emacs 中调试 python。我立即遇到了一个严重的问题:comint缓冲区中的某些颜色太浅以至于几乎看不见:浅蓝色甚至是白色上的黄色。我该如何改变它们?

我尝试在缓冲区中关闭fontlock-mode,但颜色仍然存在。我也尝试过 Mx customize-faces,但我不清楚列出的数百张面孔中的哪一张正在被使用realgud。(实际上有六个名字以“Realgud”开头,但似乎没有一个是相关的。)我翻阅了整个列表,但找不到任何黄色或浅蓝色的。我还尝试将主题更改为具有较暗背景的主题:这使黄色可见,但随后深色消失了。

编辑:按照法律清单的建议,以下是C-u C-x =. 如果我理解正确,这意味着黄色是硬编码的。

             position: 8445 of 9070 (93%), column: 39
            character: 0 (displayed as 0) (codepoint 48, #o60, #x30)
    preferred charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x30
               syntax: w    which means: word
             category: .:Base, a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
          buffer code: #x30
            file code: #x30 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    x:-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1 (#x30)

Character code properties: customize what to show
  name: DIGIT ZERO
  general-category: Nd (Number, Decimal Digit)
  decomposition: (48) ('0')

There is an overlay here:
 From 8437 to 8450
  face                 (foreground-color . "yellow")
  modification-hooks   (ansi-color-freeze-overlay)


There are text properties here:
  field                output
  fontified            t
  front-sticky         (field inhibit-line-move-field-capture)
  inhibit-line-move-field-capture t
  rear-nonsticky       t

[back]

老实说,realgud反正我已经失去了兴趣。虽然增强的想法pdb听起来不错,但trepan2似乎realgud有多个痛苦的缺陷,使它们几乎无法使用。

谢谢。

4

1 回答 1

1

颜色映射来自ansi-term.

这是我的 .emacs 中的内容,但请注意我使用浅色(白色)背景。请注意,虽然主要设置是ansi-term-color-vector,但必须事先进行颜色定义。

(defface term-color-darkgreen
  '((t :foreground "DarkGreen" :background "DarkGreen"))
  "Face used to render dark green color code."
  :group 'term)


(defface term-color-cadetblue
  '((t :foreground "CadetBlue" :background "CadetBAlue"))
  "Face used to render dark cadet blue color code."
  :group 'term)

(defface term-color-purple
  '((t :foreground "Purple" :background "Purple"))
  "Face used to render dark Purple color code."
  :group 'term)

(defface term-color-darkgoldenrod
  '((t :foreground "Darkgoldenrod" :background "Darkgoldenrod"))
  "Face used to render dark Darkgoldenrod color code."
  :group 'term)

(defface term-color-ivory4
  '((t :foreground "Ivory4" :background "Ivory4"))
  "Face used to render dark Ivory4 color code."
  :group 'term)


(setq ansi-term-color-vector
      [term
       term-color-black
       term-color-red
       term-color-darkgreen
       term-color-cadetblue
       term-color-blue
       term-color-purple
       term-color-darkgoldenrod
       term-color-ivory4])
于 2015-04-26T13:32:04.130 回答