1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-02 10:11:05 -08:00
emacs/doc/lispref
Eli Zaretskii 5df239fc6f Support display of line numbers natively
This merges branch 'line-numbers'.
* src/buffer.c (disable_line_numbers_overlay_at_eob): New
function.
* src/lisp.h (disable_line_numbers_overlay_at_eob): Add prototype.
* src/dispextern.h (struct it): New members pt_lnum, lnum,
lnum_bytepos, lnum_width, and lnum_pixel_width.
* src/indent.c (line_number_display_width): New function,
refactored from line-number width calculations in vertical-motion.
(Fvertical_motion): Call line_number_display_width when the width
of line-number display is needed.
(Fline_number_display_width): New defun.
(syms_of_indent): Defsubr it.
* src/indent.c (Fvertical_motion): Help C-n/C-p estimate correctly
the width used up by line numbers by looking near the window-start
point.  If window-start is outside of the accessible portion,
temporarily widen the buffer.
* src/term.c (produce_glyphs): Adjust tab stops for the horizontal
space taken by the line-number display.
* src/xdisp.c (display_count_lines_logically)
(display_count_lines_visually, maybe_produce_line_number)
(should_produce_line_number, row_text_area_empty): New functions.
(try_window_reusing_current_matrix): Don't use this method when
display-line-numbers is in effect.
(try_window_id, try_cursor_movement): Disable these optimizations
when the line-number-current-line face is different from
line-number face and for relative line numbers.
(try_window_id, redisplay_window, try_cursor_movement): For
visual line-number display, disable the same redisplay
optimizations as for relative.
(x_produce_glyphs): Adjust tab stops for the horizontal
space taken by the line-number display.
(hscroll_window_tree): Adjust hscroll calculations to line-number
display.
(DISP_INFINITY): Renamed from INFINITY to avoid clashes with
math.h; all users changed.
(set_cursor_from_row): Fix calculation of cursor X coordinate in
R2L rows with display-produced glyphs at the beginning.
(display_line): Use should_produce_line_number to determine
whether a line number should be produced for each glyph row, and
maybe_produce_line_number to produce line numbers.
Don't display line numbers in the minibuffer and in tooltip
frames.
Call row_text_area_empty to verify that a glyph
row's text area is devoid of any glyphs that came from a buffer or
a string.  This fixes a bug with empty-lines indication
disappearing when line numbers or line-prefix are displayed.
(syms_of_xdisp) <display-line-numbers, display-line-numbers-widen>
<display-line-number-width>: New buffer-local variables.
<display-line-numbers-current-absolute>: New variable.

* lisp/cus-start.el (standard): Provide customization forms for
display-line-numbers and its sub-features.
* lisp/faces.el (line-number, line-number-current-line): New faces.
* lisp/frame.el: Add display-line-numbers, display-line-numbers-widen,
display-line-numbers-current-absolute, and
display-line-number-width to the list of variables that should
trigger redisplay of the current buffer.
* lisp/menu-bar.el (menu-bar-showhide-menu): Add menu-bar item to
turn display-line-numbers on and off.
(toggle-display-line-numbers): New function.
* lisp/simple.el (last--line-number-width): New internal variable.
(line-move-visual): Use it to adjust temporary-goal-column when
line-number display changes its width.

* doc/emacs/basic.texi (Position Info): Add cross-reference to
"Display Custom", for line-number display.
* doc/emacs/custom.texi (Init Rebinding):
* doc/emacs/modes.texi (Minor Modes): Remove references to
linum-mode.
* doc/emacs/display.texi (Display Custom): Describe the
line-number display.
* doc/lispref/display.texi (Size of Displayed Text): Document
line-number-display-width.

* etc/NEWS: Document display-line-numbers and its customizations.
2017-07-08 10:49:36 +03:00
..
abbrevs.texi Update copyright year to 2017 2016-12-31 19:42:26 -08:00
anti.texi Update copyright year to 2017 2016-12-31 19:42:26 -08:00
back.texi Update copyright year to 2017 2016-12-31 19:42:26 -08:00
backups.texi Merge from origin/emacs-25 2017-03-19 12:29:06 -07:00
book-spine.texi
buffers.texi Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
ChangeLog.1 More authors.el updates 2017-06-07 14:27:21 -04:00
commands.texi Merge from origin/emacs-25 2017-03-19 12:34:05 -07:00
compile.texi Index byte-compile-debug 2017-01-31 22:36:02 +02:00
control.texi Update copyright year to 2017 2016-12-31 19:42:26 -08:00
customize.texi Update copyright year to 2017 2016-12-31 19:42:26 -08:00
debugging.texi Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
display.texi Support display of line numbers natively 2017-07-08 10:49:36 +03:00
doclicense.texi
edebug.texi Change edebug-max-depth from defconst to defcustom 2017-02-04 12:56:19 +02:00
elisp.texi Provide additional support for child frames 2017-06-25 11:33:25 +02:00
errors.texi Throw a `search-failed' derived error in Info search 2017-04-03 19:36:14 -04:00
eval.texi Update copyright year to 2017 2016-12-31 19:42:26 -08:00
files.texi Merge from origin/emacs-25 2017-03-19 12:29:06 -07:00
frames.texi Provide additional support for child frames 2017-06-25 11:33:25 +02:00
functions.texi [doc elisp] Add some index entries for "old" advice mechanism 2017-03-08 09:37:01 +01:00
gpl.texi
hash.texi Use float instead of Lisp_Object for rehash_size 2017-02-21 15:39:17 -08:00
help.texi Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
hooks.texi Remove Vwindow_text_change_functions and related code 2017-07-07 08:40:24 +02:00
index.texi
internals.texi Replace QUIT with maybe_quit 2017-01-25 21:25:37 -08:00
intro.texi Remove the build number from emacs-version variable 2017-02-17 20:15:21 -05:00
keymaps.texi Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
lay-flat.texi Update copyright year to 2017 2016-12-31 19:42:26 -08:00
lists.texi ; * doc/lispref/lists.texi (List Elements): Fix last change. 2017-01-25 22:49:35 +02:00
loading.texi More informative error when required feature missing 2017-05-09 19:47:16 -04:00
macros.texi Documentation fix in elisp reference manual 2017-02-24 10:21:31 +09:00
Makefile.in Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
maps.texi Update copyright year to 2017 2016-12-31 19:42:26 -08:00
markers.texi Update copyright year to 2017 2016-12-31 19:42:26 -08:00
minibuf.texi Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
modes.texi Provide additional support for child frames 2017-06-25 11:33:25 +02:00
nonascii.texi Support casing characters which map into multiple code points (bug#24603) 2017-04-06 20:54:58 +02:00
numbers.texi min and max now return one of their arguments 2017-03-06 17:26:55 -08:00
objects.texi Adapt Lisp reference to reader changes 2017-07-02 12:32:23 +02:00
os.texi Rename '--new-daemon' to 'fg-daemon' and '--old-daemon' to '--bg-daemon' 2017-05-29 22:18:55 -04:00
package.texi Merge from origin/emacs-25 2017-04-27 22:03:56 -07:00
positions.texi Add absolute optional parameter to line-number-at-pos (Bug#26417) 2017-07-03 14:43:02 +02:00
processes.texi Spelling fixes 2017-05-03 18:23:17 -07:00
README Update copyright year to 2017 2016-12-31 19:42:26 -08:00
records.texi Deprecate copy-record in favor of copy-sequence 2017-04-07 18:54:40 -07:00
searching.texi Add support for Unicode whitespace in [:blank:] 2017-01-06 20:12:48 +01:00
sequences.texi Add seq-set-equal-p to test for set equality 2017-05-04 11:32:58 +02:00
spellfile
streams.texi Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
strings.texi Tune ‘format’ after recent fix 2017-06-04 08:42:53 -07:00
symbols.texi Update copyright year to 2017 2016-12-31 19:42:26 -08:00
syntax.texi Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
text.texi Document fill-separate-heterogeneous-words-with-space (bug#25685) 2017-02-15 05:59:29 +00:00
threads.texi Rudimentary error handling for non-main threads 2017-01-18 18:00:16 +02:00
tips.texi Merge from origin/emacs-25 2017-04-27 22:03:56 -07:00
two-volume-cross-refs.txt Update copyright year to 2017 2016-12-31 19:42:26 -08:00
two-volume.make Update copyright year to 2017 2016-12-31 19:42:26 -08:00
variables.texi Rework connection local variables 2017-02-19 17:14:35 +01:00
windows.texi Provide additional support for child frames 2017-06-25 11:33:25 +02:00

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Copyright (C) 2001-2017 Free Software Foundation, Inc.  -*- outline -*-
See the end of the file for license conditions.


README for the Emacs Lisp Reference Manual.

* This directory contains the texinfo source files for the Emacs Lisp
Reference Manual.

* Report bugs in the Lisp Manual (or in Emacs) using M-x report-emacs-bug.
To ask questions, use the help-gnu-emacs mailing list.

* The Emacs Lisp Reference Manual is quite large.  It totals around
1100 pages in smallbook format; the info files total around 3.0 megabytes.

* You can format this manual for Info, for printing hardcopy using TeX,
or for HTML.

* You can buy nicely printed copies from the Free Software Foundation.
Buying a manual from the Free Software Foundation helps support our GNU
development work.  See <http://shop.fsf.org/>.
(At time of writing, this manual is out of print.)

* The master file for formatting this manual for Tex is called 'elisp.texi'.
It contains @include commands to include all the chapters that make up
the manual.

* This distribution contains a Makefile that you can use with GNU Make.

** To make an Info file, you need to install Texinfo, then run 'make info'.

** Use 'make elisp.pdf' or 'make elisp.html' to create PDF or HTML versions.


This file is part of GNU Emacs.

GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.