| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
* 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>.
|
|
|
|
|
|
|
|
| |
* 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'.
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac (WARN_CFLAGS): With Clang, use
-Wno-tautological-compare regardless of --enable-gcc-warnings.
(WERROR_CFLAGS): Simplify assignments, and guarantee it’s always set.
* lib/strftime.c: Copy from gnulib, reverting Clang-specific
change which I hope is no longer needed.
* src/emacs.c (main): Revert rlim_t change, as rlim_t is signed on
some older non-POSIX hosts.
|
|
|
|
|
|
|
| |
* src/emacs-module.h: Remove __STDC_VERSION__ check. In the past
we’ve found that some compilers do not define this symbol even
when they work well enough. If necessary features like stdbool.h
are missing the compiler will complain eventually anyway.
|
|
|
|
|
|
| |
* src/conf_post.h (__has_attribute_cleanup): Resurrect.
* src/emacs-module.c: Verify __has_attribute (cleanup), but in an
#if this time.
|
|
|
|
|
|
| |
* src/image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: Avoid
compilation warning under -Warray-bounds by temporarily disabling
the -Warray-bounds option.
|
|
|
|
|
|
|
|
|
|
| |
Clang on macOS warns about these with -Wtautological-compare. POSIX
guarantees that rlim_t is
unsigned (cf.
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/resource.h.html),
so these resource limits can never be negative.
* src/emacs.c (main): Remove tautological comparisons.
|
|
|
|
|
|
|
|
| |
Fixes Bug#27352.
* src/emacs.c (usage_message, standard_args): Define
--module-assertions only if Emacs has been compiled with module
support.
|
|
|
|
|
|
|
|
|
|
|
| |
* INSTALL (--with-modules): List cleanup attribute as prereq.
* src/conf_post.h (__has_attribute_cleanup): Remove; no longer needed.
* src/emacs-module.c (MODULE_SETJMP_1): Don’t attempt to verify
(__has_attribute (cleanup)), as Oracle Studio 12.5 supports
__has_attribute only inside preprocessor expressions. The C
compiler should check the cleanup attribute in the next line anyway.
(module_reset_handlerlist): Remove an unnecessary ‘const’
that causes Oracle Studio 12.5 to refuse to compile.
|
|
|
|
|
| |
We don't need C11 or C++11 because stdbool.h is in C99, and for C++ we
don't need it at all.
|
|
|
|
|
| |
* src/emacs-module.h (EMACS_ATTRIBUTE_NONNULL) [!__has_attribute]:
Avoid 'error: missing binary operator before token "("'.
|
|
|
|
|
|
|
|
|
|
|
| |
* src/nsfns.m (ns_frame_parm_handlers): Add x_set_no_focus_on_map.
(x-create-frame): Check for no-focus-on-map.
* src/nsterm.h (x_set_no_focus_on_map): New function.
* src/nsterm.m (x_set_no_focus_on_map): New function.
(ns_raise_frame): Add parameter for specifying whether to focus the
frame.
(ns_frame_raise_lower):
(x_make_frame_visible): Handle new parameter for ns_raise_frame.
|
|
|
|
|
|
|
| |
_Noreturn is more portable to non-C11 platforms. See:
https://www.gnu.org/software/gnulib/manual/html_node/stdnoreturn_002eh.html
* src/emacs-module.c: Use _Noreturn, not noreturn. No need to
include <stdnoreturn.h>. Reindent to fit in 80 columns.
|
|
|
|
|
|
| |
* src/emacs-module.c (module_free_global_ref)
(module_assert_runtime, module_assert_env, value_to_lisp): Use 'pD'
instead of C99 't' format descriptor.
|
|
|
|
|
|
|
|
| |
Maybe the stdout buffer still contains something interesting that
should be flushed.
* src/emacs-module.c (module_abort): Flush all output streams before
aborting.
|
|
|
|
|
| |
* src/emacs-module.c (module_copy_string_contents): Remove an
assertion that doesn't test Emacs invariants.
|