gpt4 book ai didi

Windows 上的 Emacs 用于 C++ 开发配置?

转载 作者:行者123 更新时间:2023-12-01 05:45:11 30 4
gpt4 key购买 nike

有没有人设置 cygwin 和一些 emacs 在 64 位 Windows 7 下运行良好?

我最近尝试下载 cygwin,默认情况下甚至 dired 都不可靠,有奇怪的 shell 提示字符,我收到很多警告,在一种情况下 C-c 被读为 C-g 并导致各种错误。 (xemacs 和 emacs 都没有为我工作,我所说的“工作”是指 dired 和 shell 工作,并且没有警告)。

我只是想让常用的 emacs 开发工具:gdb-mode、shell-mode、编译、标签搜索正常工作。

我希望最近使用 cygwin 完成此操作的人可以共享任何相关的 shell 文件、emacs 文件、环境变量等,以使这一切正常进行。所有这些东西都应该开箱即用吗?

最佳答案

您应该查看 ntemacs,在您的 .emacs 中使用此代码,一切都与 cygwin 一起运行良好:

;; -- sets up cygwin
(let* ((cygwin-root "c:/cygwin")
(cygwin-bin (concat cygwin-root "/bin")))
(when (and (eq 'windows-nt system-type)
(file-readable-p cygwin-root))
(setq exec-path (cons cygwin-bin exec-path))
(setenv "PATH" (concat cygwin-bin ";" (getenv "PATH")))
(setq shell-file-name "bash")
(setenv "SHELL" shell-file-name)
(setq explicit-shell-file-name shell-file-name)
(add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)))

关于Windows 上的 Emacs 用于 C++ 开发配置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2815656/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com