【问题标题】:Set up PSGML Mode on Emacs 24在 Emacs 24 上设置 PSGML 模式
【发布时间】:2013-10-05 02:31:25
【问题描述】:

我正在拼命尝试为 Emacs 24 设置 PSGML/XML 模式。我按照这个解释做了一切:http://www.lysator.liu.se/~lenst/about_psgml/psgml.html

我在解压主模式的最新包后做了./configure./make./make install,并将整个目录移动到我的.emacs.d目录的子目录中,该目录由emacs找到。

我在 .emacs 文件中添加了以下内容:

    (autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t)
    (autoload 'xml-mode "psgml" "Major mode to edit XML files." t)

但是,当运行 M-x xml-mode 时没有任何变化,当我运行 M-x sgml-mode 时,我得到一个 SGML 菜单条目,但所有语法高亮/缩进/... 都消失了。当我从 SGML 菜单运行任一命令时,我都会收到如下错误:

Eager macro-expansion failure: (invalid-function (\` (null (sgml-state-reqs ((\, s))))))
Eager macro-expansion failure: (invalid-function (\` (defmacro ((\, (intern (format     "sgml-eltype-%s" n)))) (et) (list (quote get) et (quote (quote ((\, n))))))))
Loading `psgml-parse': old-style backquotes detected!
cons: Invalid function: (\` (defmacro ((\, (intern (format "sgml-eltype-%s" n)))) (et)   (list (quote get) et (quote (quote ((\, n)))))))

我在一个格式良好的 GML 文件上使用了所有这些。

谁能帮助我或推荐另一种支持自动缩进/隐藏元素/等的 XML 主要模式?提前非常感谢,任何帮助表示赞赏!

【问题讨论】:

  • 我已经很久没有使用它了,但是在这里,the Wiki page 说这是一个已知问题,并且有人已经修复了它并将修复程序上传到其他地方。你能试试吗?
  • 感谢您的提示,尽管我确实在某个时候访问过它,但我在 wiki 页面上完全忽略了这一点。它现在似乎起作用了。如果你碰巧在德国卡尔斯鲁厄,我会给你买啤酒;)
  • 呵呵,谁知道呢,也许有一天;)干杯!

标签: xml emacs gml sgml major-mode


【解决方案1】:

正如 wvxvw 评论的那样,修复旧式宏将使其正常工作 - 顺便说一句,仍然是我首选的 Emacs ml-library。试试这个

http://sourceforge.net/projects/psgml/

【讨论】:

    猜你喜欢
    • 2012-03-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-07
    • 2015-02-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多