diff options
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 52 |
1 files changed, 51 insertions, 1 deletions
| @@ -405,10 +405,60 @@ display of raw bytes from octal to hex. | |||
| 405 | ** You can now provide explicit field numbers in format specifiers. | 405 | ** You can now provide explicit field numbers in format specifiers. |
| 406 | For example, '(format "%2$s %1$s" "X" "Y")' produces "Y X". | 406 | For example, '(format "%2$s %1$s" "X" "Y")' produces "Y X". |
| 407 | 407 | ||
| 408 | +++ | ||
| 409 | ** 'comment-indent-function' values may now return a cons to specify a | 408 | ** 'comment-indent-function' values may now return a cons to specify a |
| 410 | range of indentation. | 409 | range of indentation. |
| 411 | 410 | ||
| 411 | +++ | ||
| 412 | ** Emacs now supports optional display of line numbers in the buffer. | ||
| 413 | This is similar to what linum-mode provides, but much faster and | ||
| 414 | doesn't usurp the display margin for the line numbers. Customize the | ||
| 415 | buffer-local variable 'display-line-numbers' to activate this optional | ||
| 416 | display. If set to t, Emacs will display the number of each line | ||
| 417 | before the line. If set to 'relative', Emacs will display the line | ||
| 418 | number relative to the line showing point, with that line's number | ||
| 419 | displayed as absolute. If set to 'visual', Emacs will display a | ||
| 420 | relative number for every screen line, i.e. it will count screen lines | ||
| 421 | rather than buffer lines. The default is nil, which doesn't display | ||
| 422 | the line numbers. | ||
| 423 | |||
| 424 | In 'relative' and 'visual' modes, the variable | ||
| 425 | 'display-line-numbers-current-absolute' controls what number is | ||
| 426 | displayed for the line showing point. By default, this variable's | ||
| 427 | value is t, which means display the absolute line number for the line | ||
| 428 | showing point. Customizing this variable to a nil value will cause | ||
| 429 | Emacs to show zero instead, which preserves horizontal space of the | ||
| 430 | window in large buffers. | ||
| 431 | |||
| 432 | Line numbers are not displayed at all in minibuffer windows and in | ||
| 433 | tooltips, as they are not useful there. | ||
| 434 | |||
| 435 | The new face 'line-number' is used to display the line numbers. The | ||
| 436 | new face 'line-number-current-line' can be customized to display the | ||
| 437 | current line's number differently from all the other line numbers; by | ||
| 438 | default these two faces are identical. | ||
| 439 | |||
| 440 | You can also customize the new variable 'display-line-number-width' to | ||
| 441 | specify a fixed minimal with of the area allocated to line-number | ||
| 442 | display. The default is nil, meaning that Emacs will dynamically | ||
| 443 | calculate the area width, enlarging or shrinking it as needed. | ||
| 444 | Setting it to a non-negative integer specifies that as the minimal | ||
| 445 | width; selecting a value that is large enough to display all line | ||
| 446 | numbers in a buffer will then keep the line-number display area of | ||
| 447 | constant width at all times, if that is desired. | ||
| 448 | |||
| 449 | Lisp programs can disable line-number display for a particular screen | ||
| 450 | line by putting the 'display-line-numbers-disable' text property or | ||
| 451 | overlay property on the first character of that screen line. This is | ||
| 452 | intended for add-on packages that need a finer control of the display. | ||
| 453 | |||
| 454 | Lisp programs that need to know how much screen estate is used up for | ||
| 455 | line-number display in a window can use the new function | ||
| 456 | 'line-number-display-width'. | ||
| 457 | |||
| 458 | Linum mode and all similar packages are henceforth becoming obsolete. | ||
| 459 | Users and developers are encouraged to switch to this new feature | ||
| 460 | instead. | ||
| 461 | |||
| 412 | 462 | ||
| 413 | * Editing Changes in Emacs 26.1 | 463 | * Editing Changes in Emacs 26.1 |
| 414 | 464 | ||