X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/cce7d53002e8abc346b67ea4100507b0e7c4d68e..22bcf2046977620a7f37bbd4dff4be4a4fffc0ed:/lisp/linum.el diff --git a/lisp/linum.el b/lisp/linum.el index 11e6a7f8b4..4e58a1b711 100644 --- a/lisp/linum.el +++ b/lisp/linum.el @@ -1,4 +1,4 @@ -;;; linum.el --- display line numbers in the left margin +;;; linum.el --- display line numbers in the left margin -*- lexical-binding: t -*- ;; Copyright (C) 2008-2011 Free Software Foundation, Inc. @@ -73,7 +73,12 @@ and you have to scroll or press \\[recenter-top-bottom] to update the numbers." ;;;###autoload (define-minor-mode linum-mode - "Toggle display of line numbers in the left margin." + "Toggle display of line numbers in the left margin (Linum mode). +With a prefix argument ARG, enable Linum mode if ARG is positive, +and disable it otherwise. If called from Lisp, enable the mode +if ARG is omitted or nil. + +Linum mode is a buffer-local minor mode." :lighter "" ; for desktop.el (if linum-mode (progn @@ -174,14 +179,14 @@ and you have to scroll or press \\[recenter-top-bottom] to update the numbers." (setq line (1+ line))) (set-window-margins win width (cdr (window-margins win))))) -(defun linum-after-change (beg end len) +(defun linum-after-change (beg end _len) ;; update overlays on deletions, and after newlines are inserted (when (or (= beg end) (= end (point-max)) (string-match-p "\n" (buffer-substring-no-properties beg end))) (linum-update-current))) -(defun linum-after-scroll (win start) +(defun linum-after-scroll (win _start) (linum-update (window-buffer win))) ;; (defun linum-after-size (frame)