无法在 Mac OS 中对 Emacs 包进行字节编译

无法在 Mac OS 中对 Emacs 包进行字节编译

我正在尝试在 AUCTex 中启用预测模式。我已下载以下配置并将其添加到我的.emacs文件中:("~/path/predictive"指向我放置包的目录)。

(add-to-list 'load-path "~/path/predictive")
(autoload 'predictive-mode "predictive" "predictive" t)
(set-default 'predictive-auto-add-to-dict t)
(setq predictive-main-dict 'rpg-dictionary
      predictive-auto-learn t
      predictive-add-to-dict-ask nil
      predictive-use-auto-learn-cache nil
      predictive-which-dict t)

(add-to-list 'load-path "~/path/predictive/latex")
(add-to-list 'load-path "~/path/predictive/texinfo")

当我尝试启用它时,收到以下错误消息:

Warning (emacs): Predictive major-mode setup function predictive-setup-latex failed; latex-mode support disabled

经过几次 Google 搜索,我发现我需要对包进行字节编译。但是,当我尝试这样做时,我收到以下错误:

In toplevel form:
completion-ui-dynamic.el:31:1:Error: Wrong type argument: listp, cons
make: *** [completion-ui-dynamic.elc] Error 1

我在 Mac OS Sierra 中使用 Aquamacs。

答案1

macOS Sierra 附带的 Emacs 22.1.1 无法编译predictive-mode。我能够通过将 Makefile 指向麦金塔-安装 Emacs 25.1.1:

sed -i.orig -e 's|= emacs|= /opt/local/bin/emacs|' Makefile

make clean在使用 Emacs 25.1.1 进行编译之前需要A来删除.elc由 Emacs 22.1.1 生成的损坏文件。

答案2

在 OS High Sierra 上安装预测模式时我遇到了同样的问题。

我实际使用的 emacs 是 mac osX 版的 emacs,它是一个独立的应用程序。我没有使用 macOS 附带的 emacs。我不知道为什么这样做,只是当我想在我的系统上使用 emacs 时,这似乎是最合适的途径。

我通常在 MELPA 上找到所有包裹,所以这对我来说是一个新的过程。

我的解决方案:

从以下位置解压 tarball 后http://www.dr-qubit.org/predictive.html,我打开位于文件夹中的 makefile,并将 emacs 行更改为

EMACS = /Applications/Emacs.app/Contents/MacOS/Emacs

接下来,我make install在预测文件夹中运行了终端。它成功安装,并将我应该添加到文件中的必要行打印到窗口中.emacs。它甚至自定义了这些行以适合我的计算机/用户名的安装目录。

希望这对将来的某人有所帮助。

编辑:附加说明

我还没有找到关于 emacs 自动完成主题的任何好的读者或博客,但其他替代方案似乎是自动完成和公司模式。

相关内容