| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Brings the the time for `ucs-normalize-part1' from 200s down to 130s.
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--parse-column): Use character instead of string
of length 1 for terminator. Convert return value into string since
all callers need that form anyway.
(ucs-normalize-tests--normalization-equal-p): Rename from
ucs-normalize-tests--normalize. Use dedicated buffer instead of
messing with narrowing. Take string to compare against and insert it
into buffer so that compare-buffer-substrings can be used instead of
allocating a new string from buffer contents.
(ucs-normalize-tests--normalization-chareq-p): New macro, specialized
for comparing single character.
(ucs-normalize-tests--rule1-holds-p)
(ucs-normalize-tests--rule2-holds-p): Turn into defsubst.
(ucs-normalize-tests--rule1-failing-for-partX): Use `eq' instead of
`='.
|
| |
| |
| |
| |
| |
| | |
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part2): Update for new
admin/unidata/NormalizationTest.txt version.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* test/lisp/international/ucs-normalize-tests.el: Remove incorrect
commentary describing a manual procedure for producing the updated
failing lines, it did not actually work. Replace it with pointer to
new function which prints the updated values.
(ucs-normalize-tests--rule1-holds-p): Renamed from
ucs-normalize-tests--invariants-hold-p.
(ucs-normalize-tests--rule2-holds-p): Renamed from
ucs-normalize-tests--invariants-rule2-hold-p.
(ucs-normalize-tests--rule1-failing-for-partX): Renamed from
ucs-normalize-tests--invariants-failing-for-part.
(ucs-normalize-tests--rule1-failing-for-lines): Renamed from
ucs-normalize-tests--invariants-failing-for-lines.
(ucs-normalize-tests--part2-rule1-failed-lines): New variable.
(ucs-normalize-part2): Set it.
(ucs-normalize-part1): Always run through to end of test before
checking for failures.
(ucs-normalize-tests--insert-failing-lines)
(ucs-normalize-check-failing-lines): New functions, used to update
the *--failing-lines-part* variables.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's technically possible to write a user pointer finalizer that calls
into Emacs module functions. This would be disastrous because it
would allow arbitrary Lisp code to run during garbage collection.
Therefore extend the module assertions to check for this case.
* src/emacs-module.c (module_assert_thread): Also check whether a
garbage collection is in progress.
* test/data/emacs-module/mod-test.c (invalid_finalizer)
(Fmod_test_invalid_finalizer): New test module functions.
(emacs_module_init): Register new test function.
* test/src/emacs-module-tests.el (module--test-assertion)
(module--with-temp-directory): New helper macros.
(module--test-assertions--load-non-live-object): Rename existing
unit test, use helper macros.
(module--test-assertions--call-emacs-from-gc): New unit test.
|
|/
|
|
|
|
| |
* lisp/menu-bar.el (menu-bar-showhide-menu): Capitalize menu item
for display-line-numbers. Suggested by Martin Rudalics
<rudalics@gmx.at>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* admin/notes/unicode:
* admin/unidata/README:
* admin/unidata/BidiBrackets.txt:
* admin/unidata/BidiMirroring.txt:
* admin/unidata/Blocks.txt:
* admin/unidata/IVD_Sequences.txt:
* admin/unidata/NormalizationTest.txt:
* admin/unidata/SpecialCasing.txt:
* admin/unidata/UnicodeData.txt:
* lisp/international/characters.el:
* lisp/international/fontset.el (script-representative-chars):
* lisp/international/mule-cmds.el (ucs-names): Update per Unicode 10.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib-src/etags.c (get_lispy_tag): New function.
(L_getit, Scheme_functions): Use get_lispy_tag (Bug#5624).
* test/manual/etags/CTAGS.good:
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/Makefile:
* test/manual/etags/el-src/TAGTEST.EL: Update tests.
* test/manual/etags/scm-src/test.scm: New tests for Scheme.
|
|
|
|
|
|
| |
* src/xdisp.c (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
Use pD directives for ptrdiff_t values instead of pI, to avoid
compilation warnings on 64-bit hosts. (Bug#27597)
|
|
|
|
|
|
| |
* lisp/frame.el: Explain how to test whether a variable needs to
be added to the list of those which are watched for buffer
redisplay.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
* src/indent.c (Fline_number_display_width): Don't add 2 to the
number of columns we return, to make this consistent with
display-line-number-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.
* doc/lispref/display.texi (Size of Displayed Text): Document
line-number-display-width.
* etc/NEWS: Mention line-number-display-width.
* 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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (display_count_lines_logically): New function,
counts line numbers disregarding narrowing. Suggested by Andy
Moreton <andrewjmoreton@gmail.com>.
(maybe_produce_line_number): Call display_count_lines_logically
instead of display_count_lines. Adapt BEGV, ZV, etc. to
display-line-numbers-widen.
(syms_of_xdisp) <display-line-numbers-widen>: New buffer-local
variable.
* lisp/cus-start.el (standard): Provide a customization form for
display-line-numbers-widen.
* lisp/frame.el: Add 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.
* doc/emacs/display.texi (Display Custom): Document
display-line-numbers-widen.
|
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (maybe_produce_line_number): Fix visual-mode display
of current line when line-number-current-line face was customized.
Reported by Filipe Silva <filipe.silva@gmail.com>.
|
| |
| |
| |
| |
| |
| |
| | |
* src/indent.c (Fvertical_motion): If need to start from
window-start, and it is outside of the accessible portion,
temporarily widen the buffer. This avoids errors in evil-mode.
Reported by James Nguyen <james@jojojames.com>.
|
| |
| |
| |
| |
| |
| | |
* 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.
|
| |
| |
| |
| |
| | |
* src/xdisp.c (x_produce_glyphs): Improve calculation of next tab
stop in hscrolled lines. Prevent aborts in compute_line_metrics.
|
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (display_count_lines_visually): Avoid very slow
redisplay when this function is invoked very far from point.
Reported by Alex <agrambot@gmail.com>.
|
| |
| |
| |
| |
| | |
* lisp/faces.el (line-number, line-number-current-line): Warn
against using non-monospaced fonts.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (maybe_produce_line_number): Don't treat a zero
value of display-line-number-width as acceptable.
Handle the case of 'relative' with display-line-number-width
non-nil and smaller than the absolute line number requires.
Reported by Alex <agrambot@gmail.com>.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
(Optional Mode Line): Fix the index entry to not conflict with
that in "Display Custom".
* doc/emacs/basic.texi (Position Info): Add cross-reference to
"Display Custom", for line-number display.
* src/xdisp.c (syms_of_xdisp): <display-line-numbers>: Mention
display-line-numbers-disable in the doc string.
* lisp/cus-start.el (standard): Fix lst change.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (syms_of_xdisp)
<display-line-numbers-current-absolute>: New variable.
<display-line-numbers>: Doc fix.
(maybe_produce_line_number): Support nil value of
display-line-numbers-current-absolute.
* lisp/cus-start.el (standard): Add customization form for
display-line-numbers-current-absolute.
* etc/NEWS: Document recently introduced features.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (display_count_lines_visually): Introduce a
shortcut: if a relative line number was already calculated for
this iterator object, just increase it instead of the
expensive call to move_it_to. Argument list changed to pass a
pointer to the iterator object.
(maybe_produce_line_number): Adjust for change in signature of
display_count_lines_visually. Record the relative line number and
the corresponding byte position in the iterator object also in the
'visual' mode.
|
| |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (hscroll_window_tree): Correct the X offset
calculations on TTY frames.
* src/term.c (produce_glyphs): Use it->lnum_pixel_width instead of
a kludge using it->lnum_width.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* src/dispextern.h (struct it): New member lnum_pixel_width.
* src/xdisp.c (maybe_produce_line_number): Compute the width of
the line-number display in pixels.
(x_produce_glyphs): Use it->lnum_pixel_width instead of a kludge
that used it->lnum_width and made assumptions about pixel width.
|
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (maybe_produce_line_number): Fix bug that caused
line numbers to be displayed in empty lines beyond ZV.
(x_produce_glyphs): Start fixing TAB display in truncated lines.
|
| |
| |
| |
| |
| | |
* src/xdisp.c (should_produce_line_number): Call get-char-property
at ZV as well, to support default-text-properties.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Works very slowly.
* src/xdisp.c (display_count_lines_visually): New function.
(maybe_produce_line_number): Support 'visual' mode of line-number
display.
* src/xdisp.c (maybe_produce_line_number): Update IT's metrics
also when glyph_row is NULL. This is important for move_it_*
functions.
(syms_of_xdisp) <display-line-number-width>: Now buffer-local.
(try_window_id, redisplay_window, try_cursor_movement): For
'visual' line-number display, disable the same redisplay
optimizations as for 'relative'.
* lisp/cus-start.el (standard): Add new value for the
customization form of display-line-numbers.
|
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (maybe_produce_line_number): Update IT's metrics
also when glyph_row is NULL. This is important for move_it_*
functions.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/buffer.c (disable_line_numbers_overlay_at_eob): New
function.
* src/lisp.h (disable_line_numbers_overlay_at_eob): Add prototype.
* src/xdisp.c (should_produce_line_number): When at ZV, call
disable_line_numbers_overlay_at_eob to determine whether line
numbers should be displayed beyond ZV.
|
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (maybe_produce_line_number): Fix the condition for
producing space glyphs instead of a line number to include the
case of display strings and overlays.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (hscroll_window_tree): Make additional calculations
regarding glyphs produced for line numbers conditional on
line-number display.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (x_produce_glyphs, hscroll_window_tree): Adjust
hscroll calculations to line-number display.
* src/term.c (produce_glyphs): Adjust tab stop to window's
hscroll. These two changes fix horizontal scrolling when line
numbers are displayed. But there's still a bug: the horizontal
shift of lines that begin with a TAB is different from the rest.
* src/xdisp.c (move_it_in_display_line_to): Call
should_produce_line_number to determine whether a line number
should be produced for this screen line.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* etc/NEWS: Update the documentation.
* src/xdisp.c (syms_of_xdisp) <display-line-numbers-disable>: New
symbol.
(should_produce_line_number): New function.
(display_line): Use should_produce_line_number to determine
whether a line number should be produced for each glyph row.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lisp/faces.el (line-number-current-line): New face.
* src/xdisp.c (syms_of_xdisp) <line-number-current-line>: New
symbol.
(try_window_id, try_cursor_movement): Disable these optimizations
when the line-number-current-line face is different from
line-number face.
(maybe_produce_line_number): Display the current line in the
line-number-current-line face, if it's different from line-number.
|
| |
| |
| |
| |
| | |
* src/xdisp.c (maybe_produce_line_number): In relative mode
display the current line number as its absolute value, not as zero.
|
| |
| |
| |
| |
| |
| |
| | |
* etc/NEWS:
* src/xdisp.c (syms_of_xdisp, maybe_produce_line_number):
* lisp/cus-start.el: Rename display-line-width to
display-line-number-width.
|
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (x_produce_glyphs):
* src/term.c (produce_glyphs): Adjust tab stops for the horizontal
space taken by the line-number display.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (redisplay_window): If forced window-start requires
to move a window's point, and the window is under relative
line-number display, force another round of redisplay to update
the relative line numbers. This fixes follow-mode "redisplay" of
its window group.
* lisp/frame.el: Add display-line-numbers to the list of variables
that should trigger redisplay of the current buffer.
|
| |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (maybe_produce_line_number): Update the metrics in
IT, not in IT->glyph_row, since the latter gets overwritten in
display_line. Fixes display of line numbers when the font used
for them is larger than that of the default face.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c: (maybe_produce_line_number): Use the default face
for background of the blank glyphs in the line-number area which
are drawn beyond EOB.
(display_line): Reset the glyph row's displays_text_p flag only on
empty lines that don't display line numbers. This fixes cursor
display beyond EOB. Fix the bidi information in the glyphs
produced for line numbers. Set the avoid_cursor_p flag of glyphs
produced for line numbers.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (row_text_area_empty): New function.
(display_line): 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.
(display_line): Delete the argument FORCE; all callers changed.
Remove the condition for actually producing the glyphs for the
line number, as even if the number didn't change we need to
produce empty space.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (maybe_produce_line_number): Produce a blank before
the number, for R2L rows. Increment 'g' in the loop even if
glyph_row is NULL. Accept 2nd argument FORCE and produce the
line-number glyphs if it is non-zero.
(move_it_in_display_line_to): Account for the space taken by the
line-number glyphs. Call maybe_produce_line_number with 2nd
argument non-zero.
(set_cursor_from_row): Fix calculation of cursor X coordinate in
R2L rows with display-produced glyphs at the beginning.
(syms_of_xdisp) <line-number>: New face symbol.
<relative, display-line-width>: New symbols.
(maybe_produce_line_number): Use the line-number face for
displaying line numbers. Support relative line-number display.
Support user-defined width for displaying line numbers.
(try_cursor_movement, try_window_id): Disable these optimizations
when displaying relative line numbers.
* src/dispextern.h (struct it): New member 'pt_lnum'.
* lisp/faces.el (line-number): New face.
* lisp/cus-start.el (standard): Provide customization forms for
display-line-numbers and display-line-width.
* lisp/menu-bar.el (menu-bar-showhide-menu): Add menu-bar item to
turn display-line-numbers on and off.
* etc/NEWS: Document the new feature.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/xdisp.c (syms_of_xdisp) <display-line-numbers>: New
buffer-local variable.
Include <math.h>.
(maybe_produce_line_number): New function.
(DISP_INFINITY): Rename from INFINITY, since math.h defines INFINITY.
(try_window_reusing_current_matrix): Don't use this method when
display-line-numbers is in effect.
* src/dispextern.h (struct it): New members 'lnum'.
|