【问题标题】:emacs nxhtml-mode[No match]emacs nxhtml-mode[不匹配]
【发布时间】:2011-02-21 19:23:27
【问题描述】:

我在安装 nxhtml 时遇到了一些问题,我希望我的 .php 文件看起来更好,我不想回到 netbeans...

我已经下载了 nxhtml,并在其中创建了一个名为“emacs-packages”的文件夹 我在我的 .emacs 文件中添加了这一行:

(load "emacs-packages/nxhtml/autostart22.el") 

每当我尝试 M-x nxhtml-mode 时,我都会得到 [No Match] 作为答案...

我也试过了

(load "emacs-packages/nxhtml/autostart.el")

我在启动时遇到错误,但由于我的版本是 22,我认为第一个更合适

还有其他我应该安装 forst 的软件包才能使用它吗? 我做错了什么?

我在 MacOs 上使用 Carbon emacs 22.3.1

谢谢!

【问题讨论】:

    标签: php emacs dot-emacs carbon-emacs


    【解决方案1】:

    你唯一需要的是

    (load "emacs-packages/nxhtml/autostart.el")
    

    尝试指定完整路径。把光标放在"emacs-packages/nxhtml/autostart.el"上,然后调用M-x ffap,看看能不能做find-file-at-point

    【讨论】:

    • 谢谢,它似乎找到了文件......所以如果路径正确并且这是唯一需要的东西,为什么我会得到 [No Match] ?也许我没有正确使用它?我该如何让它工作?
    • 我从我的 .emacs 中删除了除此行(加载“/usr/local/share/emacs/nxhtml/autostart.el”)之外的所有内容,它可以工作。尝试做同样的事情。也许你安装了一些其他的包来阻止 emacs 加载。你能做 M-x find-function nxhtml-mode 吗?
    • 我什至不能使用 find-function:“可能的补全是:” 1.find-function-at-point 2.find-function-on-key 3.find-function-other-框架 4.find-function-other-window
    【解决方案2】:

    问题已解决,我只是将负载更改为加载文件:

    (load-file "emacs-packages/nxhtml/autostart.el")
    

    这个页面在这里解释了区别http://xahlee.org/emacs/emacs_installing_packages.html

    【讨论】: