Mercurial > emacs
comparison src/xdisp.c @ 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 | e89a3b5d7c13 |
children | ac38155fbce6 |
comparison
equal
deleted
inserted
replaced
29631:d91cfeea29c6 | 29632:96d83d5a48b3 |
---|---|
440 | 440 |
441 int line_number_displayed; | 441 int line_number_displayed; |
442 | 442 |
443 /* Maximum buffer size for which to display line numbers. */ | 443 /* Maximum buffer size for which to display line numbers. */ |
444 | 444 |
445 static int line_number_display_limit; | 445 Lisp_Object Vline_number_display_limit; |
446 | 446 |
447 /* line width to consider when repostioning for line number display */ | 447 /* line width to consider when repostioning for line number display */ |
448 | 448 |
449 static int line_number_display_limit_width; | 449 static int line_number_display_limit_width; |
450 | 450 |
12280 /* But do forget it, if the window shows a different buffer now. */ | 12280 /* But do forget it, if the window shows a different buffer now. */ |
12281 else if (BUFFERP (w->base_line_pos)) | 12281 else if (BUFFERP (w->base_line_pos)) |
12282 w->base_line_pos = Qnil; | 12282 w->base_line_pos = Qnil; |
12283 | 12283 |
12284 /* If the buffer is very big, don't waste time. */ | 12284 /* If the buffer is very big, don't waste time. */ |
12285 if (BUF_ZV (b) - BUF_BEGV (b) > line_number_display_limit) | 12285 if (!INTEGERP (Vline_number_display_limit) |
12286 && BUF_ZV (b) - BUF_BEGV (b) > XINT (Vline_number_display_limit)) | |
12286 { | 12287 { |
12287 w->base_line_pos = Qnil; | 12288 w->base_line_pos = Qnil; |
12288 w->base_line_number = Qnil; | 12289 w->base_line_number = Qnil; |
12289 goto no_value; | 12290 goto no_value; |
12290 } | 12291 } |
13036 | 13037 |
13037 DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video, | 13038 DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video, |
13038 "*Non-nil means use inverse video for the mode line."); | 13039 "*Non-nil means use inverse video for the mode line."); |
13039 mode_line_inverse_video = 1; | 13040 mode_line_inverse_video = 1; |
13040 | 13041 |
13041 DEFVAR_INT ("line-number-display-limit", &line_number_display_limit, | 13042 DEFVAR_LISP ("line-number-display-limit", &Vline_number_display_limit, |
13042 "*Maximum buffer size for which line number should be displayed.\n\ | 13043 "*Maximum buffer size for which line number should be displayed.\n\ |
13043 If the buffer is bigger than this, the line number does not appear\n\ | 13044 If the buffer is bigger than this, the line number does not appear\n\ |
13044 in the mode line."); | 13045 in the mode line. A value of nil means no limit."); |
13045 line_number_display_limit = 1000000; | 13046 Vline_number_display_limit = Qnil; |
13046 | 13047 |
13047 DEFVAR_INT ("line-number-display-limit-width", &line_number_display_limit_width, | 13048 DEFVAR_INT ("line-number-display-limit-width", |
13049 &line_number_display_limit_width, | |
13048 "*Maximum line width (in characters) for line number display.\n\ | 13050 "*Maximum line width (in characters) for line number display.\n\ |
13049 If the average length of the lines near point is bigger than this, then the\n\ | 13051 If the average length of the lines near point is bigger than this, then the\n\ |
13050 line number may be omitted from the mode line."); | 13052 line number may be omitted from the mode line."); |
13051 line_number_display_limit_width = 200; | 13053 line_number_display_limit_width = 200; |
13052 | 13054 |