【问题标题】:fill-column setting in tuareg mode not working图阿雷格模式下的填充列设置不起作用
【发布时间】:2014-10-03 01:41:34
【问题描述】:

我在 ~/.emacs 中有以下设置

(defun my-fillcol-hook ()
   (longlines-mode t)
   (setq-default fill-column 80))                                                                                                                                                                                 

(add-hook 'c-mode-hook 'my-fillcol-hook)
(add-hook 'c++-mode-hook 'my-fillcol-hook)
(add-hook 'tuareg-mode-hook 'my-fillcol-hook)

填充列在 C 模式和 C++ 模式中按预期设置,但在 tuareg 模式中没有。我无法找出为什么填充列没有设置为 tuareg 模式。提前感谢您的帮助。

【问题讨论】:

  • 请参阅上面的线程以了解设置fill-column 的方法。 FWIW,setq-default 应该在模式挂钩的外部,在模式挂钩内部有一个常规的setq。如果你做的是前者,那么每次你进入该特定模式的缓冲区时,你基本上都会重置默认值。

标签: emacs tuareg


【解决方案1】:

setq-default 更改 global 值,而 tuareg-mode 显然设置了优先的缓冲区本地值。 IOW 你想使用setq-local 或只是setq

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-29
    • 1970-01-01
    • 2012-11-14
    • 2011-07-19
    相关资源
    最近更新 更多