]> code.delx.au - gnu-emacs/blobdiff - lisp/linum.el
Protect against changes of interval tree when adding/removing text props.
[gnu-emacs] / lisp / linum.el
index db6e4c49977c6da1dfbf0fa67227926dd23e697f..d9d7e5ad120e5355d66b64eaee9dbbad620d96b9 100644 (file)
@@ -1,6 +1,6 @@
 ;;; linum.el --- display line numbers in the left margin -*- lexical-binding: t -*-
 
-;; Copyright (C) 2008-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2013 Free Software Foundation, Inc.
 
 ;; Author: Markus Triska <markus.triska@gmx.at>
 ;; Maintainer: FSF
@@ -44,7 +44,6 @@
   "Show line numbers in the left margin."
   :group 'convenience)
 
-;;;###autoload
 (defcustom linum-format 'dynamic
   "Format used to display line numbers.
 Either a format string like \"%7d\", `dynamic' to adapt the width
@@ -52,7 +51,9 @@ as needed, or a function that is called with a line number as its
 argument and should evaluate to a string to be shown on that line.
 See also `linum-before-numbering-hook'."
   :group 'linum
-  :type 'sexp)
+  :type '(choice (string :tag "Format string")
+                 (const :tag "Dynamic width" dynamic)
+                 (function :tag "Function")))
 
 (defface linum
   '((t :inherit (shadow default)))
@@ -73,7 +74,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