diff options
| author | Jimmy Aguilar Mena | 2019-05-03 19:27:59 +0200 |
|---|---|---|
| committer | Jimmy Aguilar Mena | 2019-05-05 16:27:37 +0200 |
| commit | a336300ccf024824fbf50298623e04f369952670 (patch) | |
| tree | 72671b0528a1091d635fc0cb605607ec07f5fbf3 | |
| parent | 5b842bd7820b952d65c480b856354a67d26f5b57 (diff) | |
| download | emacs-a336300ccf024824fbf50298623e04f369952670.tar.gz emacs-a336300ccf024824fbf50298623e04f369952670.zip | |
;Corrected display-fill-column-indicator mode.
Small corrections in the documentation and code format to merge into master.
| -rw-r--r-- | doc/emacs/display.texi | 7 | ||||
| -rw-r--r-- | etc/NEWS | 25 | ||||
| -rw-r--r-- | lisp/cus-start.el | 11 | ||||
| -rw-r--r-- | lisp/display-fill-column-indicator.el | 10 | ||||
| -rw-r--r-- | lisp/faces.el | 10 | ||||
| -rw-r--r-- | src/xdisp.c | 93 |
6 files changed, 69 insertions, 87 deletions
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index e1467a3e0be..34215699b42 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi | |||
| @@ -1181,10 +1181,11 @@ When the mode is enabled through the functions | |||
| 1181 | @code{display-fill-column-indicator-mode} or | 1181 | @code{display-fill-column-indicator-mode} or |
| 1182 | @code{global-display-fill-column-indicator-mode}, the initialization | 1182 | @code{global-display-fill-column-indicator-mode}, the initialization |
| 1183 | functions check if this variable is @code{non-nil}, otherwise the | 1183 | functions check if this variable is @code{non-nil}, otherwise the |
| 1184 | initialization tries to set it to U+2502 or '|'. | 1184 | initialization tries to set it to U+2502 or @sampl{|}. |
| 1185 | 1185 | ||
| 1186 | @item fill-column-face | 1186 | @item fill-column-indicator |
| 1187 | Specifies the face used to display the indicator it inherits its | 1187 | @vindex fill-column-indicator |
| 1188 | Specifies the face used to display the indicator. It inherits its | ||
| 1188 | default values from shadow and the default face. | 1189 | default values from shadow and the default face. |
| 1189 | @end table | 1190 | @end table |
| 1190 | 1191 | ||
| @@ -340,7 +340,7 @@ longer. | |||
| 340 | ** Multicolor fonts such as "Noto Color Emoji" can be displayed on | 340 | ** Multicolor fonts such as "Noto Color Emoji" can be displayed on |
| 341 | Emacs configured with Cairo drawing and linked with cairo >= 1.16.0. | 341 | Emacs configured with Cairo drawing and linked with cairo >= 1.16.0. |
| 342 | 342 | ||
| 343 | --- | 343 | +++ |
| 344 | ** Emacs now optionally displays a fill column indicator. | 344 | ** Emacs now optionally displays a fill column indicator. |
| 345 | 345 | ||
| 346 | This is similar to what 'fill-column-indicator' package provides, but | 346 | This is similar to what 'fill-column-indicator' package provides, but |
| @@ -354,28 +354,7 @@ The indicator is not displayed at all in minibuffer windows and | |||
| 354 | in tooltips, as it is not useful there. | 354 | in tooltips, as it is not useful there. |
| 355 | 355 | ||
| 356 | There are 2 new buffer local variables and 1 face to customize this | 356 | There are 2 new buffer local variables and 1 face to customize this |
| 357 | mode: | 357 | mode they are described in the manual "(emacs) Display". |
| 358 | |||
| 359 | *** 'display-fill-column-indicator-column' is the column where the | ||
| 360 | indicator should be set. It can take positive numerical values for | ||
| 361 | the column or the special value t. Any other value disables the | ||
| 362 | indicator. The default value is t. | ||
| 363 | |||
| 364 | When the value is t it means that the variable 'fill-column' will | ||
| 365 | be used. | ||
| 366 | |||
| 367 | *** 'display-fill-column-indicator-char' is the character used for the | ||
| 368 | indicator. This character can be any valid char including unicode | ||
| 369 | ones if the user's font supports them. | ||
| 370 | |||
| 371 | When the mode is enabled throw the functions | ||
| 372 | 'display-fill-column-indicator-mode' and | ||
| 373 | 'global-display-fill-column-indicator-mode', they check if there | ||
| 374 | is a value non-nil for this variable, otherwise the initialization | ||
| 375 | tries to set it to U+2502 or '|'. | ||
| 376 | |||
| 377 | *** 'fill-column-face' is the face used to display the indicator it | ||
| 378 | inherits it default values from shadow and the default faces. | ||
| 379 | 358 | ||
| 380 | 359 | ||
| 381 | * Editing Changes in Emacs 27.1 | 360 | * Editing Changes in Emacs 27.1 |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index b935776a2df..4c4d5ebb16d 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -650,11 +650,14 @@ since it could result in memory overflow and make Emacs crash." | |||
| 650 | "26.1") | 650 | "26.1") |
| 651 | 651 | ||
| 652 | (display-fill-column-indicator display-fill-column-indicator | 652 | (display-fill-column-indicator display-fill-column-indicator |
| 653 | (choice | 653 | boolean "27.1") |
| 654 | (const :tag "Off (nil)" :value nil) | ||
| 655 | (const :tag "On (t)" :value t)) | ||
| 656 | "27.1") | ||
| 657 | (display-fill-column-indicator-column display-fill-column-indicator | 654 | (display-fill-column-indicator-column display-fill-column-indicator |
| 655 | (choice | ||
| 656 | (const :tag "Use fill-column variable" | ||
| 657 | :value t) | ||
| 658 | (const :tag "Fixed column number" | ||
| 659 | :value 70 | ||
| 660 | :format "%v")) | ||
| 658 | integer "27.1") | 661 | integer "27.1") |
| 659 | (display-fill-column-indicator-character display-fill-column-indicator | 662 | (display-fill-column-indicator-character display-fill-column-indicator |
| 660 | character "27.1") | 663 | character "27.1") |
diff --git a/lisp/display-fill-column-indicator.el b/lisp/display-fill-column-indicator.el index f6b7352c21b..6d5f5a9f894 100644 --- a/lisp/display-fill-column-indicator.el +++ b/lisp/display-fill-column-indicator.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; display-fill-column-indicator.el --- interface for display-fill-column-indicator -*- lexical-binding: t -*- | 1 | ;;; display-fill-column-indicator.el --- interface for display-fill-column-indicator -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2017-2019 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Maintainer: emacs-devel@gnu.org | 5 | ;; Maintainer: emacs-devel@gnu.org |
| 6 | ;; Keywords: convenience | 6 | ;; Keywords: convenience |
| @@ -37,18 +37,18 @@ | |||
| 37 | ;;; Code: | 37 | ;;; Code: |
| 38 | 38 | ||
| 39 | (defgroup display-fill-column-indicator nil | 39 | (defgroup display-fill-column-indicator nil |
| 40 | "Display a fill column indicator in th buffer." | 40 | "Display a fill column indicator in the buffer." |
| 41 | :group 'convenience | 41 | :group 'convenience |
| 42 | :group 'display) | 42 | :group 'display) |
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | ;;;###autoload | 45 | ;;;###autoload |
| 46 | (define-minor-mode display-fill-column-indicator-mode | 46 | (define-minor-mode display-fill-column-indicator-mode |
| 47 | "Toggle display fill column indicator. | 47 | "Toggle display of fill-column indicator. |
| 48 | This uses `display-fill-column-indicator' internally. | 48 | This uses `display-fill-column-indicator' internally. |
| 49 | 49 | ||
| 50 | To change the position of the column displayed by default, | 50 | To change the position of the column displayed by default |
| 51 | customize `display-fill-column-indicator-column' you can change the | 51 | customize `display-fill-column-indicator-column'. You can change the |
| 52 | character for the indicator setting `display-fill-column-indicator-character'." | 52 | character for the indicator setting `display-fill-column-indicator-character'." |
| 53 | :lighter nil | 53 | :lighter nil |
| 54 | (if display-fill-column-indicator-mode | 54 | (if display-fill-column-indicator-mode |
diff --git a/lisp/faces.el b/lisp/faces.el index 121cf7ef1d2..b9332790642 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -2501,15 +2501,11 @@ unwanted effects." | |||
| 2501 | :group 'display-line-numbers) | 2501 | :group 'display-line-numbers) |
| 2502 | 2502 | ||
| 2503 | ;; Definition stolen from display-line-numbers. | 2503 | ;; Definition stolen from display-line-numbers. |
| 2504 | (defface fill-column-face | 2504 | (defface fill-column-indicator |
| 2505 | '((t :inherit (shadow default))) | 2505 | '((t :inherit (shadow default))) |
| 2506 | "Face for displaying fill column indicator line. | 2506 | "Face for displaying fill column indicator. |
| 2507 | This face is used when `display-fill-column-indicator-mode' is | 2507 | This face is used when `display-fill-column-indicator-mode' is |
| 2508 | non-nil. | 2508 | non-nil." |
| 2509 | |||
| 2510 | If you customize the font of this face, make sure it is a | ||
| 2511 | monospaced font, otherwise the line's characters will not line | ||
| 2512 | up horizontally." | ||
| 2513 | :version "27.1" | 2509 | :version "27.1" |
| 2514 | :group 'basic-faces | 2510 | :group 'basic-faces |
| 2515 | :group 'display-fill-column-indicator) | 2511 | :group 'display-fill-column-indicator) |
diff --git a/src/xdisp.c b/src/xdisp.c index 080c40c3f38..17827481447 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -379,11 +379,14 @@ static Lisp_Object list_of_error; | |||
| 379 | || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t')))) \ | 379 | || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t')))) \ |
| 380 | 380 | ||
| 381 | /* Test all the conditions needed to print the fill column indicator. */ | 381 | /* Test all the conditions needed to print the fill column indicator. */ |
| 382 | #define FILL_COLUMN_INDICATOR_NEEDED(it) \ | 382 | #define FILL_COLUMN_INDICATOR_NEEDED(it) \ |
| 383 | !NILP (Vdisplay_fill_column_indicator) \ | 383 | Vdisplay_fill_column_indicator \ |
| 384 | && (it->continuation_lines_width == 0) \ | 384 | && (it->continuation_lines_width == 0) \ |
| 385 | && (!NILP (Vdisplay_fill_column_indicator_column)) \ | 385 | && (!NILP (Vdisplay_fill_column_indicator_column)) \ |
| 386 | && FIXNATP (Vdisplay_fill_column_indicator_character) | 386 | && FIXNATP (Vdisplay_fill_column_indicator_character) \ |
| 387 | && ((EQ (Vdisplay_fill_column_indicator_column, Qt) \ | ||
| 388 | && FIXNATP (BVAR (current_buffer, fill_column))) \ | ||
| 389 | || (FIXNATP (Vdisplay_fill_column_indicator_column))) | ||
| 387 | 390 | ||
| 388 | /* True means print newline to stdout before next mini-buffer message. */ | 391 | /* True means print newline to stdout before next mini-buffer message. */ |
| 389 | 392 | ||
| @@ -20168,17 +20171,16 @@ append_space_for_newline (struct it *it, bool default_face_p) | |||
| 20168 | 20171 | ||
| 20169 | /* Corner case for when display-fill-column-indicator-mode | 20172 | /* Corner case for when display-fill-column-indicator-mode |
| 20170 | is active and the extra character should be added in the | 20173 | is active and the extra character should be added in the |
| 20171 | same place than the line */ | 20174 | same place than the line. */ |
| 20172 | if ((it->w->pseudo_window_p == 0) | 20175 | if ((it->w->pseudo_window_p == 0) |
| 20173 | && FILL_COLUMN_INDICATOR_NEEDED(it)) | 20176 | && FILL_COLUMN_INDICATOR_NEEDED(it)) |
| 20174 | { | 20177 | { |
| 20175 | int fill_column_indicator_column = -1; | 20178 | int fill_column_indicator_column = -1; |
| 20176 | 20179 | ||
| 20177 | if (EQ (Vdisplay_fill_column_indicator_column, Qt) | 20180 | if (EQ (Vdisplay_fill_column_indicator_column, Qt)) |
| 20178 | && FIXNATP (BVAR (current_buffer, fill_column))) | ||
| 20179 | fill_column_indicator_column = | 20181 | fill_column_indicator_column = |
| 20180 | XFIXNAT (BVAR (current_buffer, fill_column)); | 20182 | XFIXNAT (BVAR (current_buffer, fill_column)); |
| 20181 | else if (FIXNATP (Vdisplay_fill_column_indicator_column)) | 20183 | else |
| 20182 | fill_column_indicator_column = | 20184 | fill_column_indicator_column = |
| 20183 | XFIXNAT (Vdisplay_fill_column_indicator_column); | 20185 | XFIXNAT (Vdisplay_fill_column_indicator_column); |
| 20184 | 20186 | ||
| @@ -20198,7 +20200,7 @@ append_space_for_newline (struct it *it, bool default_face_p) | |||
| 20198 | it->c = it->char_to_display = | 20200 | it->c = it->char_to_display = |
| 20199 | XFIXNAT (Vdisplay_fill_column_indicator_character); | 20201 | XFIXNAT (Vdisplay_fill_column_indicator_character); |
| 20200 | it->face_id = | 20202 | it->face_id = |
| 20201 | merge_faces (it->w, Qfill_column_face, | 20203 | merge_faces (it->w, Qfill_column_indicator, |
| 20202 | 0, DEFAULT_FACE_ID); | 20204 | 0, DEFAULT_FACE_ID); |
| 20203 | face = FACE_FROM_ID(it->f, it->face_id); | 20205 | face = FACE_FROM_ID(it->f, it->face_id); |
| 20204 | goto produce_glyphs; | 20206 | goto produce_glyphs; |
| @@ -20221,8 +20223,8 @@ append_space_for_newline (struct it *it, bool default_face_p) | |||
| 20221 | set. */ | 20223 | set. */ |
| 20222 | if (it->glyph_row->reversed_p | 20224 | if (it->glyph_row->reversed_p |
| 20223 | /* But if the appended newline glyph goes all the way to | 20225 | /* But if the appended newline glyph goes all the way to |
| 20224 | the end of the row, there will be no stretch glyph, | 20226 | the end of the row, there will be no stretch glyph, |
| 20225 | so leave the box flag set. */ | 20227 | so leave the box flag set. */ |
| 20226 | && saved_x + FRAME_COLUMN_WIDTH (it->f) < it->last_visible_x) | 20228 | && saved_x + FRAME_COLUMN_WIDTH (it->f) < it->last_visible_x) |
| 20227 | it->end_of_box_run_p = false; | 20229 | it->end_of_box_run_p = false; |
| 20228 | 20230 | ||
| @@ -20376,7 +20378,7 @@ extend_face_to_end_of_line (struct it *it) | |||
| 20376 | && !face->stipple | 20378 | && !face->stipple |
| 20377 | #endif | 20379 | #endif |
| 20378 | && !it->glyph_row->reversed_p | 20380 | && !it->glyph_row->reversed_p |
| 20379 | && NILP (Vdisplay_fill_column_indicator)) | 20381 | && !Vdisplay_fill_column_indicator) |
| 20380 | return; | 20382 | return; |
| 20381 | 20383 | ||
| 20382 | /* Set the glyph row flag indicating that the face of the last glyph | 20384 | /* Set the glyph row flag indicating that the face of the last glyph |
| @@ -20431,17 +20433,16 @@ extend_face_to_end_of_line (struct it *it) | |||
| 20431 | 20433 | ||
| 20432 | /* Display fill column indicator if not in modeline or | 20434 | /* Display fill column indicator if not in modeline or |
| 20433 | toolbar and display fill column indicator mode is | 20435 | toolbar and display fill column indicator mode is |
| 20434 | active */ | 20436 | active. */ |
| 20435 | if ((it->w->pseudo_window_p == 0) | 20437 | if ((it->w->pseudo_window_p == 0) |
| 20436 | && FILL_COLUMN_INDICATOR_NEEDED(it)) | 20438 | && FILL_COLUMN_INDICATOR_NEEDED(it)) |
| 20437 | { | 20439 | { |
| 20438 | int fill_column_indicator_column = -1; | 20440 | int fill_column_indicator_column = -1; |
| 20439 | 20441 | ||
| 20440 | if (EQ (Vdisplay_fill_column_indicator_column, Qt) | 20442 | if (EQ (Vdisplay_fill_column_indicator_column, Qt)) |
| 20441 | && FIXNATP (BVAR (current_buffer, fill_column))) | ||
| 20442 | fill_column_indicator_column = | 20443 | fill_column_indicator_column = |
| 20443 | XFIXNAT (BVAR (current_buffer, fill_column)); | 20444 | XFIXNAT (BVAR (current_buffer, fill_column)); |
| 20444 | else if (FIXNATP (Vdisplay_fill_column_indicator_column)) | 20445 | else |
| 20445 | fill_column_indicator_column = | 20446 | fill_column_indicator_column = |
| 20446 | XFIXNAT (Vdisplay_fill_column_indicator_column); | 20447 | XFIXNAT (Vdisplay_fill_column_indicator_column); |
| 20447 | 20448 | ||
| @@ -20466,7 +20467,7 @@ extend_face_to_end_of_line (struct it *it) | |||
| 20466 | Lisp_Object save_object = it->object; | 20467 | Lisp_Object save_object = it->object; |
| 20467 | 20468 | ||
| 20468 | /* The stretch width needs to considet the latter | 20469 | /* The stretch width needs to considet the latter |
| 20469 | added glyph */ | 20470 | added glyph. */ |
| 20470 | const int stretch_width = | 20471 | const int stretch_width = |
| 20471 | column_x - it->current_x - char_width; | 20472 | column_x - it->current_x - char_width; |
| 20472 | 20473 | ||
| @@ -20474,34 +20475,35 @@ extend_face_to_end_of_line (struct it *it) | |||
| 20474 | it->avoid_cursor_p = true; | 20475 | it->avoid_cursor_p = true; |
| 20475 | it->object = Qnil; | 20476 | it->object = Qnil; |
| 20476 | 20477 | ||
| 20477 | /* Only generate a stretch glysph if there is distance | 20478 | /* Only generate a stretch glyph if there is distance |
| 20478 | between current_x and and the indicator position */ | 20479 | between current_x and and the indicator position. */ |
| 20479 | if (stretch_width > 0) | 20480 | if (stretch_width > 0) |
| 20480 | { | 20481 | { |
| 20481 | int stretch_ascent = (((it->ascent + it->descent) | 20482 | int stretch_ascent = (((it->ascent + it->descent) |
| 20482 | * FONT_BASE (font)) / FONT_HEIGHT (font)); | 20483 | * FONT_BASE (font)) / FONT_HEIGHT (font)); |
| 20483 | append_stretch_glyph (it, Qnil, stretch_width, | 20484 | append_stretch_glyph (it, Qnil, stretch_width, |
| 20484 | it->ascent + it->descent, | 20485 | it->ascent + it->descent, |
| 20485 | stretch_ascent); | 20486 | stretch_ascent); |
| 20486 | } | 20487 | } |
| 20487 | 20488 | ||
| 20488 | /* Generate the glysph indicator only if | 20489 | /* Generate the glyph indicator only if |
| 20489 | append_space_for_newline didn't already. */ | 20490 | append_space_for_newline didn't already. */ |
| 20490 | if (it->current_x < column_x) | 20491 | if (it->current_x < column_x) |
| 20491 | { | 20492 | { |
| 20492 | it->char_to_display = | 20493 | it->char_to_display = |
| 20493 | XFIXNAT (Vdisplay_fill_column_indicator_character); | 20494 | XFIXNAT (Vdisplay_fill_column_indicator_character); |
| 20494 | it->face_id = | 20495 | it->face_id = |
| 20495 | merge_faces (it->w, Qfill_column_face, | 20496 | merge_faces (it->w, Qfill_column_indicator, |
| 20496 | 0, DEFAULT_FACE_ID); | 20497 | 0, DEFAULT_FACE_ID); |
| 20497 | PRODUCE_GLYPHS (it); | 20498 | PRODUCE_GLYPHS (it); |
| 20498 | } | 20499 | } |
| 20499 | 20500 | ||
| 20500 | /* Restore the face after the indicator was generated */ | 20501 | /* Restore the face after the indicator was generated. */ |
| 20501 | it->face_id = saved_face_id; | 20502 | it->face_id = saved_face_id; |
| 20502 | 20503 | ||
| 20503 | /* If there is space after the indicator generate an | 20504 | /* If there is space after the indicator generate an |
| 20504 | extra empty glysph to restore the face. */ | 20505 | extra empty glyph to restore the face. Issue was |
| 20506 | observed in X systems. */ | ||
| 20505 | it->char_to_display = ' '; | 20507 | it->char_to_display = ' '; |
| 20506 | PRODUCE_GLYPHS (it); | 20508 | PRODUCE_GLYPHS (it); |
| 20507 | 20509 | ||
| @@ -20514,14 +20516,13 @@ extend_face_to_end_of_line (struct it *it) | |||
| 20514 | } | 20516 | } |
| 20515 | } | 20517 | } |
| 20516 | #ifdef HAVE_WINDOW_SYSTEM | 20518 | #ifdef HAVE_WINDOW_SYSTEM |
| 20517 | |||
| 20518 | if (it->glyph_row->reversed_p) | 20519 | if (it->glyph_row->reversed_p) |
| 20519 | { | 20520 | { |
| 20520 | /* Prepend a stretch glyph to the row, such that the | 20521 | /* Prepend a stretch glyph to the row, such that the |
| 20521 | rightmost glyph will be drawn flushed all the way to the | 20522 | rightmost glyph will be drawn flushed all the way to the |
| 20522 | right margin of the window. The stretch glyph that will | 20523 | right margin of the window. The stretch glyph that will |
| 20523 | occupy the empty space, if any, to the left of the | 20524 | occupy the empty space, if any, to the left of the |
| 20524 | glyphs. */ | 20525 | glyph. */ |
| 20525 | struct font *font = face->font ? face->font : FRAME_FONT (f); | 20526 | struct font *font = face->font ? face->font : FRAME_FONT (f); |
| 20526 | struct glyph *row_start = it->glyph_row->glyphs[TEXT_AREA]; | 20527 | struct glyph *row_start = it->glyph_row->glyphs[TEXT_AREA]; |
| 20527 | struct glyph *row_end = row_start + it->glyph_row->used[TEXT_AREA]; | 20528 | struct glyph *row_end = row_start + it->glyph_row->used[TEXT_AREA]; |
| @@ -20635,18 +20636,19 @@ extend_face_to_end_of_line (struct it *it) | |||
| 20635 | else | 20636 | else |
| 20636 | it->face_id = face->id; | 20637 | it->face_id = face->id; |
| 20637 | 20638 | ||
| 20638 | /* Display fill-column-line if needed. */ | 20639 | /* Display fill-column indicator if needed. */ |
| 20639 | if (FILL_COLUMN_INDICATOR_NEEDED(it)) | 20640 | if (FILL_COLUMN_INDICATOR_NEEDED(it)) |
| 20640 | { | 20641 | { |
| 20641 | int fill_column_indicator_column = -1; | 20642 | int fill_column_indicator_column = -1; |
| 20642 | 20643 | ||
| 20643 | /* Vdisplay_fill_column_indicator_column accepts the special | 20644 | /* Vdisplay_fill_column_indicator_column accepts the special |
| 20644 | value t to use the default fill-column variable. */ | 20645 | value t to use the default fill-column variable. The |
| 20645 | if (EQ (Vdisplay_fill_column_indicator_column, Qt) | 20646 | conditions are all defined in the macro |
| 20646 | && FIXNATP (BVAR (current_buffer, fill_column))) | 20647 | FILL_COLUMN_INDICATOR_NEEDED. */ |
| 20648 | if (EQ (Vdisplay_fill_column_indicator_column, Qt)) | ||
| 20647 | fill_column_indicator_column = | 20649 | fill_column_indicator_column = |
| 20648 | XFIXNAT (BVAR (current_buffer, fill_column)) + it->lnum_pixel_width; | 20650 | XFIXNAT (BVAR (current_buffer, fill_column)) + it->lnum_pixel_width; |
| 20649 | else if (FIXNATP (Vdisplay_fill_column_indicator_column)) | 20651 | else |
| 20650 | fill_column_indicator_column = | 20652 | fill_column_indicator_column = |
| 20651 | XFIXNAT (Vdisplay_fill_column_indicator_column) + it->lnum_pixel_width; | 20653 | XFIXNAT (Vdisplay_fill_column_indicator_column) + it->lnum_pixel_width; |
| 20652 | 20654 | ||
| @@ -20656,7 +20658,7 @@ extend_face_to_end_of_line (struct it *it) | |||
| 20656 | { | 20658 | { |
| 20657 | const int saved_face = it->face_id; | 20659 | const int saved_face = it->face_id; |
| 20658 | it->face_id = | 20660 | it->face_id = |
| 20659 | merge_faces (it->w, Qfill_column_face, 0, DEFAULT_FACE_ID); | 20661 | merge_faces (it->w, Qfill_column_indicator, 0, DEFAULT_FACE_ID); |
| 20660 | it->c = it->char_to_display = | 20662 | it->c = it->char_to_display = |
| 20661 | XFIXNAT (Vdisplay_fill_column_indicator_character); | 20663 | XFIXNAT (Vdisplay_fill_column_indicator_character); |
| 20662 | PRODUCE_GLYPHS (it); | 20664 | PRODUCE_GLYPHS (it); |
| @@ -32839,8 +32841,8 @@ be let-bound around code that needs to disable messages temporarily. */); | |||
| 32839 | /* Name of a text property which disables line-number display. */ | 32841 | /* Name of a text property which disables line-number display. */ |
| 32840 | DEFSYM (Qdisplay_line_numbers_disable, "display-line-numbers-disable"); | 32842 | DEFSYM (Qdisplay_line_numbers_disable, "display-line-numbers-disable"); |
| 32841 | 32843 | ||
| 32842 | /* Names of the face used to display fill column indicator character. */ | 32844 | /* Name of the face used to display fill column indicator character. */ |
| 32843 | DEFSYM (Qfill_column_face, "fill-column-face"); | 32845 | DEFSYM (Qfill_column_indicator, "fill-column-indicator"); |
| 32844 | 32846 | ||
| 32845 | /* Name and number of the face used to highlight escape glyphs. */ | 32847 | /* Name and number of the face used to highlight escape glyphs. */ |
| 32846 | DEFSYM (Qescape_glyph, "escape-glyph"); | 32848 | DEFSYM (Qescape_glyph, "escape-glyph"); |
| @@ -33414,25 +33416,26 @@ either `relative' or `visual'. */); | |||
| 33414 | DEFSYM (Qdisplay_line_numbers_widen, "display-line-numbers-widen"); | 33416 | DEFSYM (Qdisplay_line_numbers_widen, "display-line-numbers-widen"); |
| 33415 | Fmake_variable_buffer_local (Qdisplay_line_numbers_widen); | 33417 | Fmake_variable_buffer_local (Qdisplay_line_numbers_widen); |
| 33416 | 33418 | ||
| 33417 | DEFVAR_LISP ("display-fill-column-indicator", Vdisplay_fill_column_indicator, | 33419 | DEFVAR_BOOL ("display-fill-column-indicator", Vdisplay_fill_column_indicator, |
| 33418 | doc: /* Non-nil means display the fill column indicator. */); | 33420 | doc: /* Non-nil means display the fill column indicator. */); |
| 33419 | Vdisplay_fill_column_indicator = Qnil; | 33421 | Vdisplay_fill_column_indicator = false; |
| 33420 | DEFSYM (Qdisplay_fill_column_indicator, "display-fill-column-indicator"); | 33422 | DEFSYM (Qdisplay_fill_column_indicator, "display-fill-column-indicator"); |
| 33421 | Fmake_variable_buffer_local (Qdisplay_fill_column_indicator); | 33423 | Fmake_variable_buffer_local (Qdisplay_fill_column_indicator); |
| 33422 | 33424 | ||
| 33423 | DEFVAR_LISP ("display-fill-column-indicator-column", Vdisplay_fill_column_indicator_column, | 33425 | DEFVAR_LISP ("display-fill-column-indicator-column", Vdisplay_fill_column_indicator_column, |
| 33424 | doc: /* Column for indicator when `display-fill-column-indicator' is non-nil. | 33426 | doc: /* Column for indicator when `display-fill-column-indicator' |
| 33425 | The default value is t which means that the indicator will use the `fill-column' variable. | 33427 | is non-nil. The default value is t which means that the indicator |
| 33426 | If a numeric value is set, the indicator will be drawn in that column | 33428 | will use the `fill-column' variable. If it is set to an integer the |
| 33427 | independently of the `fill-column' value. */); | 33429 | indicator will be drawn in that column. */); |
| 33428 | Vdisplay_fill_column_indicator_column = Qt; | 33430 | Vdisplay_fill_column_indicator_column = Qt; |
| 33429 | DEFSYM (Qdisplay_fill_column_indicator_column, "display-fill-column-indicator-column"); | 33431 | DEFSYM (Qdisplay_fill_column_indicator_column, "display-fill-column-indicator-column"); |
| 33430 | Fmake_variable_buffer_local (Qdisplay_fill_column_indicator_column); | 33432 | Fmake_variable_buffer_local (Qdisplay_fill_column_indicator_column); |
| 33431 | 33433 | ||
| 33432 | DEFVAR_LISP ("display-fill-column-indicator-character", Vdisplay_fill_column_indicator_character, | 33434 | DEFVAR_LISP ("display-fill-column-indicator-character", Vdisplay_fill_column_indicator_character, |
| 33433 | doc: /* Character to draw the indicator when `display-fill-column-indicator' is non-nil. | 33435 | doc: /* Character to draw the indicator when |
| 33434 | The default is U+2502 but a good alternative is (ascii 124) if | 33436 | `display-fill-column-indicator' is non-nil. The default is U+2502 but |
| 33435 | the font in fill-column-face does not support Unicode characters. */); | 33437 | a good alternative is (ascii 124) if the font in fill-column-indicator |
| 33438 | face does not support Unicode characters. */); | ||
| 33436 | Vdisplay_fill_column_indicator_character = Qnil; | 33439 | Vdisplay_fill_column_indicator_character = Qnil; |
| 33437 | DEFSYM (Qdisplay_fill_column_indicator_character, "display-fill-column-indicator-character"); | 33440 | DEFSYM (Qdisplay_fill_column_indicator_character, "display-fill-column-indicator-character"); |
| 33438 | Fmake_variable_buffer_local (Qdisplay_fill_column_indicator_character); | 33441 | Fmake_variable_buffer_local (Qdisplay_fill_column_indicator_character); |