Emacs:如何在文本终端中启用突出显示的断点(emacs -nw) [英] Emacs: How to enable highlighting breakpoints in a text terminal (emacs -nw)

查看:179
本文介绍了Emacs:如何在文本终端中启用突出显示的断点(emacs -nw)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Emacs在文本模式下不显示断点。
我尝试整合此处这里,但是失败了(我不是一个lisp程序员)。

Emacs doesn't show breakpoints in text mode. I tried integrating the suggestions here and here, but failed (I am not a lisp programmer).

我试过:

(require 'gdb-mi)
(setq default-text-properties '(foo 1111))

(defun set_breakpt_cmds ()
  "set breakpoint and indicate on editor"
  (interactive)
  (gud-break)
  (gdb-put-breakpoint-icon "false" (get-text-property 1 'foo)))

(global-set-key (kbd "<f12>") 'set_breakpt_cmds)

由此产生的错误是

参数数目错误:(lambda(arg)设置当前行的断点(interactivep)(if(not gud-running))(gud-calldbstop \
at%l in%farg))),0

注意:类似的问题是(遵循)。但是,解决方案并不适合我,因为我想要从 .emacs 文件中调用修复程序。这样一来,当我设置一个新的linux框时,更容易复制我的emacs配置。

Note: A similar issue is this (following this). However the solution there doesn't fit me because I would like to be able to call the fix from .emacs file. This way it is easier to duplicate my emacs configuration when I setup a new linux box.

谢谢

推荐答案

你所得到的错误来自于 gud-break 期望一个参数(不使用),所以只需使用(gud-break 1)

The error you get comes from the fact that gud-break expects an argument (which isn't used), so just use (gud-break 1).

消息如下:


  • 错误是错误的参数数量

  • 当调用(lambda(arg)...)(在这里我们看到只有一个参数是预期的)

  • 它被调用了 0 参数。

  • the error is of kind wrong number of arguments
  • when calling (lambda (arg) ...) (where we see that exactly one argument is expected)
  • and it was called with 0 arguments.

这篇关于Emacs:如何在文本终端中启用突出显示的断点(emacs -nw)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆