Emacs: Activate linum on prog-mode and text-mode
parent
016a152ca0
commit
0a22167237
|
@ -68,7 +68,10 @@
|
|||
(define-key mickey-minor-mode-map (kbd "C-x M-p") (lambda () (interactive) (narrow-to-page -1)))
|
||||
|
||||
;; Line numbers
|
||||
(add-hook 'find-file-hook (lambda () (linum-mode 1)))
|
||||
;; Adding to `find-file-hook' ensures it will work for every file, regardless of
|
||||
;; the mode, but it won't work for buffers without files nor on mode change.
|
||||
(add-hook 'prog-mode-hook 'linum-mode)
|
||||
(add-hook 'text-mode-hook 'linum-mode)
|
||||
;; Emacs-nox does not display a fringe after the linum: Setting linum-format in
|
||||
;; linum-before-numbering-hook is not the right approach as it will change the
|
||||
;; type of linum-format in the middle. See linum-update-window.
|
||||
|
|
Loading…
Reference in New Issue