Emacs: set the fill column in change log mode

A very specific question, which I hope is not too dumb.

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

This command, when it is placed in my .emacs file, works for all the main modes that I use (C ++, Perl, etc.). However, this does not seem to affect the main change-log-mode-hook ( change-log-mode-hook ). Do you know how I can set fill-column for this mode?

+4
source share
1 answer

First, you must install it (I just made sure you understood this part correctly):

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

Secondly, you need to make sure that there is no local directory variable parameter that overrides this. For example, when editing Emacs source code, fill-column will be set to 74 for change log mode and 70 elsewhere, overriding the value you specified in the μour hook. They are defined in files named .dir-locals.el and may be located in or above the directory that contains the edited file.

+6
source

Source: https://habr.com/ru/post/1344542/


All Articles