changeset 29632:96d83d5a48b3

(Vline_number_display_limit): Renamed from line_number_display_limit. (syms_of_xdisp): Use DEFVAR_LISP for line-number-display-limit. Extend documentation string. Initialize Vline_number_display_limit to nil meaning no limit. (decode_mode_spec): Use Vline_number_display_limit with its new meaning.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 13 Jun 2000 22:10:01 +0000
parents d91cfeea29c6
children 98e1c27ffe84
files src/xdisp.c
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Tue Jun 13 21:35:42 2000 +0000
+++ b/src/xdisp.c	Tue Jun 13 22:10:01 2000 +0000
@@ -442,7 +442,7 @@
 
 /* Maximum buffer size for which to display line numbers.  */
 
-static int line_number_display_limit;
+Lisp_Object Vline_number_display_limit;
 
 /* line width to consider when repostioning for line number display */
 
@@ -12282,7 +12282,8 @@
 	  w->base_line_pos = Qnil;
 
 	/* If the buffer is very big, don't waste time.  */
-	if (BUF_ZV (b) - BUF_BEGV (b) > line_number_display_limit)
+	if (!INTEGERP (Vline_number_display_limit)
+	    && BUF_ZV (b) - BUF_BEGV (b) > XINT (Vline_number_display_limit))
 	  {
 	    w->base_line_pos = Qnil;
 	    w->base_line_number = Qnil;
@@ -13038,13 +13039,14 @@
     "*Non-nil means use inverse video for the mode line.");
   mode_line_inverse_video = 1;
 
-  DEFVAR_INT ("line-number-display-limit", &line_number_display_limit,
+  DEFVAR_LISP ("line-number-display-limit", &Vline_number_display_limit,
     "*Maximum buffer size for which line number should be displayed.\n\
 If the buffer is bigger than this, the line number does not appear\n\
-in the mode line.");
-  line_number_display_limit = 1000000;
-
-  DEFVAR_INT ("line-number-display-limit-width", &line_number_display_limit_width,
+in the mode line.  A value of nil means no limit.");
+  Vline_number_display_limit = Qnil;
+
+  DEFVAR_INT ("line-number-display-limit-width",
+	      &line_number_display_limit_width,
     "*Maximum line width (in characters) for line number display.\n\
 If the average length of the lines near point is bigger than this, then the\n\
 line number may be omitted from the mode line.");