문제

Very specific question that I hope is not too dumb.

(setq-default fill-column 120) sets the width of the buffer fill to 120 columns. Default for me otherwise is 74.

This command, when put in my .emacs file, works for all major modes I use (C++, Perl, etc). However, it seems not to affect the Change Log major mode (change-log-mode-hook). Do you know how I can set the fill-column for this mode?

도움이 되었습니까?

해결책

First, you have to set it (I'm just making sure you got this part right):

(defun my-change-log-mode-hook ()
  (setq fill-column 120))

(add-hook 'change-log-mode-hook 'my-change-log-mode-hook)

Secondly, you have to make sure that there is no directory local variables setting that overrides this. For example, when editing the source code of Emacs itself, fill-column will be set to 74 for change log mode and 70 elsewhere, overriding the value you specified in µour hook. These are defined in files named .dir-locals.el and can be place in or above the directory that contains the edited file.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top