The limit on the length of lines is 80 columns and this is a hard limit.In this case (and many others), I can heartily agree with this coding style. Longer lines are hard to understand (I use a limit of 100 for C++/Java).
As a small variation on the trick for highlighting "TODO", "FIXME" and friends, we can also highlight lines that are too long:
(add-hook 'c-mode-hook (lambda () (font-lock-add-keywords nil '(("^[^\n]\\{80\\}\\(.*\\)$" 1 font-lock-warning-face t)))))
No comments:
Post a Comment