From c46e5ba97a3189e9877f69414e4af58b2da1e6bc Mon Sep 17 00:00:00 2001 From: Peng Li Date: Tue, 11 Aug 2015 22:03:02 +0800 Subject: [PATCH] emacs - change face of current line number --- emacs.d/config/init-linum.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/emacs.d/config/init-linum.el b/emacs.d/config/init-linum.el index 684339f..98b1af9 100644 --- a/emacs.d/config/init-linum.el +++ b/emacs.d/config/init-linum.el @@ -1,16 +1,18 @@ ;; refer to https://github.com/aaronbieber/dotfiles/blob/master/configs/emacs.d/lisp/init-linum.el -;;; Stuff for line numbers. +;; Stuff for line numbers. (defface linum-current - '((t (:inherit linum :weight bold :underline "#555"))) +; '((t (:inherit linum :weight bold :underline "#555"))) + '((t (:inherit linum :weight bold :foreground "Yellow"))) "The current line number.") (defun my-linum-get-format-string () - (let* ((width (max 4 (1+ (length (number-to-string + (let* ((width (min 4 (1+ (length (number-to-string (count-lines (point-min) (point-max))))))) (format (concat "%" (number-to-string width) "d ")) (current-line-format (concat "%-" (number-to-string width) "d "))) (setq my-linum-format-string format) - (setq my-linum-current-line-format-string current-line-format))) +; (setq my-linum-current-line-format-string current-line-format))) + (setq my-linum-current-line-format-string format))) (defvar my-linum-current-line-number 0) -- 2.11.0