1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00
Commit Graph

905 Commits

Author SHA1 Message Date
Richard M. Stallman
64b7122d05 (decode_mode_spec): Use current buffer for most purposes. 2004-09-09 14:53:37 +00:00
Richard M. Stallman
5670531ed8 (Fformat_mode_line): New arg BUFFER says which buffer to use. 2004-09-09 01:30:38 +00:00
Kim F. Storm
bc9447bc28 (set_cursor_from_row): Also look at 'cursor' property in
overlay just before point.
2004-09-08 11:37:16 +00:00
Kim F. Storm
a01c5155e8 (set_cursor_from_row): Fix last change. Only use 'cursor'
property from text property or overlay strings at point.
2004-09-07 20:53:43 +00:00
Richard M. Stallman
70567d1c18 Fix line breaks to follow Emacs conventions. 2004-09-03 20:43:38 +00:00
Kim F. Storm
cc2734ee76 (set_cursor_from_row): Look for non-nil `cursor' property
in overlay or text-property strings; set cursor on corresponding
glyph rather than at end of the string.
2004-09-02 22:34:07 +00:00
Steven Tamm
b15de4146b (note_mouse_highlight): Set the mouse pointer shape to
nontext_cursor if it is on a scroll bar.
2004-09-02 17:01:20 +00:00
Kim F. Storm
d64b707cb1 Rename wait_reading_process_input to wait_reading_process_output. 2004-08-20 10:34:12 +00:00
Kim F. Storm
3553184981 (move_it_in_display_line_to): Check BUFFER_POS_REACHED_P after
we have ensured that the glyph fits on the current line (or returned
MOVE_LINE_CONTINUED otherwise).
2004-07-26 23:16:48 +00:00
Kim F. Storm
f516e857f7 (move_it_in_display_line_to): If overflow-newline-into-fringe
is enabled, return MOVE_LINE_CONTINUED rather than MOVE_POS_MATCH_OR_ZV
if target position is at end of display line but char is not a newline.
2004-07-25 22:15:03 +00:00
Kim F. Storm
cf4a901e95 (display_line): Increment nrows_scale_factor and set
fonts_changed_p if past last allocated row.
(append_glyph, append_composite_glyph, produce_image_glyph)
(append_stretch_glyph): Increment ncols_scale_factor and set
fonts_changed_p if current area is full.
2004-07-21 21:09:43 +00:00
Luc Teirlinck
4b9da0fb5e (syms_of_xdisp): Correct capitalization error in
`window-scroll-functions' docstring.
2004-07-19 00:54:04 +00:00
Kim F. Storm
dbadb64b38 (add_to_log): Use SAFE_ALLOCA. 2004-06-21 21:55:56 +00:00
Kim F. Storm
38793d6a3e (try_cursor_movement): Exclude header line from scroll
margin at top of window.
(try_window_reusing_current_matrix): Calculate proper cursor position
after scrolling up with non-zero scroll margin, as the old cursor
position corresponds to value of PT before executing this command.
(try_window_id): Consider scroll margin at bottom of window too;
otherwise we fail to scroll when hl-line-mode is enabled.
2004-06-15 10:35:05 +00:00
Juanma Barranquero
4f224e64d0 (Vimage_types): Delete (moved to image.c). 2004-06-14 20:49:05 +00:00
Steven Tamm
50bf76732b Support Tooltips with the Carbon emacs port.
Some code cleanup using helper macros.
2004-05-30 00:18:41 +00:00
Kim F. Storm
6c0afe12c9 (back_to_previous_visible_line_start): Skip backwards
over display properties, e.g. images, that replace buffer text.
2004-05-26 22:11:29 +00:00
Richard M. Stallman
6924d3b7d3 (try_scrolling): If scroll-up-aggressively or scroll-down-aggressively
is small but positive, put point near the screen edge.
2004-05-22 22:11:24 +00:00
Kim F. Storm
7994a99147 (next_overlay_change, note_mouse_highlight): Use GET_OVERLAYS_AT. 2004-05-17 22:48:56 +00:00
Kim F. Storm
7e1704d0a9 (calc_line_height_property): Use string position when
object is a string.
2004-05-10 11:16:37 +00:00
Kim F. Storm
17b01ffc96 (Qtotal): New var.
(syms_of_xdisp): Intern and staticpro it.
(calc_line_height_property): New arg total.  Set it if
line-spacing property has format (total . VALUE).
(x_produce_glyphs): Ignore line-spacing if line-height is 0.
Handle total line-spacing property.
2004-05-04 12:51:45 +00:00
Stefan Monnier
d9bf7950c2 (calc_line_height_property): YAILOM (yet another int/Lisp_Object mixup). 2004-05-01 21:19:31 +00:00
Kim F. Storm
a9e5c93275 (init_iterator): Handle line-spacing float value.
Initialize override_ascent member.
(append_space_for_newline): Reset override_ascent.
Remove use_default_face.
(calc_line_height_property): New function to calculate value of
line-height and line-spacing properties.  Look at overlays, too.
Set override_ascent, override_descent, override_boff members when
using another face than the current face.  Float values are now
relative to the frame default font, by default; accept a cons
of ratio and face name to specify value relative to a specific face.
(x_produce_glyphs): Use calc_line_height_property.
Use override_ascent etc. when set to handle different face heights.
A negative line-spacing property value is interpreted as a total
line height, rather than inter-line spacing.
(note_mouse_highlight): Allocate room for 40 overlays initially.
2004-04-29 22:37:52 +00:00
Kim F. Storm
2883e85a24 (null_glyph_slice): New var.
(append_glyph, append_composite_glyph, append_stretch_glyph):
Use it to initialize glyph slice.
2004-04-28 21:00:40 +00:00
Stefan Monnier
b1c2132c0c (x_produce_glyphs): Fix the proverbial int/Lisp_Object mixup.
(on_hot_spot_p): Make sure we always return a value.
(Flookup_image_map): Remove unused var ix and iy.
(note_mode_line_or_margin_highlight): Remove unused var `image'.
2004-04-27 22:00:03 +00:00
Kim F. Storm
c4c07982c1 (x_produce_glyphs): Fix last change; handle newline in
header line strings.
2004-04-27 08:48:12 +00:00
Kim F. Storm
4933c60309 (Qline_height): New variable.
(syms_of_xdisp): Intern and staticpro it.
(append_space_for_newline): Partially undo 2004-04-25 change;
add default_face_p arg, and restore callers.
Clear it->use_default_face after use.
(x_produce_glyphs): Set default font for ascii char if
it->use_default_font is set.  Change line-spacing property to set
just extra line spacing.  Handle new line-height property.
2004-04-26 22:05:43 +00:00
Kim F. Storm
03e35edcfa (append_space_for_newline): Rename from append_space.
Remove DEFAULT_FACE_P arg; always use current face.  Callers changed.
(x_produce_glyphs): Handle line-spacing property on newline char.
If value is t, adjust ascent and descent to fit current row height.
If value is an integer or float, set extra_line_spacing to integer
value, or to float value x current line height.
2004-04-24 23:28:37 +00:00
Kim F. Storm
e893970b97 (Qslice): New variable.
(syms_of_xdisp): Intern and staticpro it.
(pos_visible_p): Return pixel position in new x and y args.
(init_iterator): Reset it->slice info.
(handle_display_prop): Parse (slice ...) property.
(push_it, pop_it): Save/restore slice info.
(make_cursor_line_fully_visible): Fix 2004-04-14 change.  Do not
force repositioning of tall row if window is vscrolled, as that
would reset vscroll.
(append_space): Set it->constrain_row_ascent_descent_p to avoid
increasing row height if row is non-empty.
(fill_image_glyph_string): Copy slice info.
(take_vertical_position_into_account): Simplify.
(produce_image_glyph): Handle iterator slice info, setup glyph
slice info.  Do not force minimum line height.
(x_produce_glyphs): If it->constrain_row_ascent_descent_p is set,
do not increase height (ascent/descent) of non-empty row when
adding normal character glyph; instead reduce glyph ascent/descent
appropriately; if row is higher than current glyph, adjust glyph
descent/ascent to reposition glyph within the existing row.
Likewise, when char is newline, only set ascent/descent if row is
currently empty.
(note_mouse_highlight): Handle hotspots with sliced image.
2004-04-20 22:19:09 +00:00
Kim F. Storm
409368b902 (update_overlay_arrows): Fix handling of up_to_date < 0. 2004-04-16 20:11:47 +00:00
Juanma Barranquero
75c5501b44 (try_scrolling): Make sure `scroll-conservatively' is not too large before
computing how much to scroll.
2004-04-16 19:33:45 +00:00
Kim F. Storm
cb9d4a9f65 (get_glyph_string_clip_rect): Fix reduction of cursor
height to glyph height when cursor row is not fully visible.
(make_cursor_line_fully_visible): Add FORCE_P arg to return
failure in case row is higher than window.  Callers changed.
(try_scrolling): Fix loop in scrolling if last_line_misfit (from Gerd).
Try to scroll partially visible, higher-than-window cursor row.
(redisplay_window): Always try to scroll partially visible,
higher-than-window cursor row - both initially and again with
centering_position = 0.
Clear desired matrix before retrying with centering_position = 0.
2004-04-13 21:31:23 +00:00
Kim F. Storm
867756d80a (clear_mouse_face): Only clear mouse highlight if not hidden. 2004-04-05 21:54:43 +00:00
Kim F. Storm
be21b92592 (syms_of_xdisp): Include `void-variable' in list_of_error
to catch errors in calc_pixel_width_or_height during redisplay.
2004-03-26 00:33:18 +00:00
Kim F. Storm
4540d74ccd (move_it_in_display_line_to): Fix MOVE_TO_POS case when
to_charpos corresponds to newline in right fringe.  Use local
BUFFER_POS_REACHED_P macro.
2004-03-19 20:32:39 +00:00
Jan Djärv
992126decd xdisp.c (calc_pixel_width_or_height): Add ifdef HAVE_WINDOW_SYSTEM
to compile on non-window system.
2004-03-19 13:57:08 +00:00
Kim F. Storm
da06e4d71b (Qcenter): Declare here.
(syms_of_xdisp): intern and staticpro it.
(handle_single_display_prop): Allow space display property on all
platforms.
(display_mode_line): Set mode_line_p before displaying line.
(calc_pixel_width_or_height): Declare extern.  Add separate :align-to
handling.  Remove complex cases for fringes and scroll-bars.
Add left, right, and center alignment positions. Add text (area)
width/height.  Return width or height for image specs.
(produce_stretch_glyph): Improve handling of :align-to.  Is now
relative to left of text area by default, but other base offsets
can be specified -- also for text lines.
2004-03-19 00:43:16 +00:00
Masatake YAMATO
73bc43da2e (note_mode_line_or_margin_highlight): Accept HEADER_LINE when keymap and cursor are setup. 2004-03-16 13:12:03 +00:00
Kim F. Storm
7d90b5870b (display_line): Fix call to get_overlay_arrow_glyph_row. 2004-03-03 09:02:50 +00:00
Kim F. Storm
351b5434f9 (Voverlay_arrow_variable_list): New variable to properly
implement and integrate multiple overlay arrows with redisplay.
(syms_of_xdisp): DEFVAR_LISP and initialize it.
(last_arrow_position, last_arrow_string): Replace by properties.
(Qlast_arrow_position, Qlast_arrow_string)
(Qoverlay_arrow_string, Qoverlay_arrow_bitmap): New variables.
(syms_of_xdisp): Intern and staticpro them.
(overlay_arrow_string_or_property, update_overlay_arrows)
(overlay_arrow_in_current_buffer_p, overlay_arrows_changed_p)
(overlay_arrow_at_row): New functions for multiple overlay arrows.
(redisplay_internal): Use them instead of directly accessing
Voverlay_arrow_position etc. for multiple overlay arrows.
(mark_window_display_accurate): Use update_overlay_arrows.
(try_cursor_movement): Use overlay_arrow_in_current_buffer_p.
(try_window_id): Use overlay_arrows_changed_p.
(get_overlay_arrow_glyph_row): Add overlay_arrow_string arg.
(display_line): Use overlay_arrow_at_row to check multiple
overlay arrows, and get relevant overlay-arrow-string and
overlay-arrow-bitmap.  Set w->overlay_arrow_bitmap accordingly.
(produce_image_glyph): Set pixel_width = 0 for fringe bitmap.
(syms_of_xdisp): Remove last_arrow_position and last_arrow_string.
2004-03-01 23:55:52 +00:00
Kim F. Storm
dd341dd9c2 (handle_single_display_prop): Handle left-fringe and
right-fringe similar to a display margin image.  Specifically,
the characters having the fringe prop are no longer shown, and
we use IT_IMAGE/next_element_from_image with image_id = -1 to
do this.  Set fringe bitmap face_id in it->face_id.
(produce_image_glyph): Handle image_id < 0 as "no image" case, but
still realize it->face (i.e. the fringe bitmap face).
2004-02-25 22:39:54 +00:00
Miles Bader
7d8a0b5551 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-114
Merge some minor redisplay bug-fixes from emacs--tiling--0

Patches applied:

 * miles@gnu.org--gnu-2004/emacs--tiling--0--patch-9
   Remove bogus xassert

 * miles@gnu.org--gnu-2004/emacs--tiling--0--patch-10
   Avoid negative descents for images with ascent > height

 * miles@gnu.org--gnu-2004/emacs--tiling--0--patch-13
   Fix iterator-inconsistency bug in redisplay
2004-02-25 12:54:16 +00:00
Kim F. Storm
1d71218362 (get_window_cursor_type, display_and_set_cursor): Fix last change. 2004-02-18 21:01:50 +00:00
Kim F. Storm
5c7528cd68 (get_window_cursor_type): Don't look at glyph if NULL.
(display_and_set_cursor): Set glyph to NULL if cursor in fringe.
2004-02-17 21:36:00 +00:00
Kim F. Storm
7a272039b5 (fast_find_position): Fix return value of new version
(was inverted compared to the 21.1 version).
2004-02-17 21:06:59 +00:00
Stefan Monnier
d2f1499943 Lisp_Object/int mixup. 2004-02-16 04:53:28 +00:00
Kim F. Storm
6d9257263e (Voverflow_newline_into_fringe, syms_of_xdisp)
(left_bits, right_bits, up_arrow_bits, down_arrow_bits)
(continued_bits, continuation_bits, ov_bits, first_line_bits)
(last_line_bits, filled_box_cursor_bits, hollow_box_cursor_bits)
(bar_cursor_bits, hbar_cursor_bits, zv_bits, hollow_square_bits)
(fringe_bitmaps, draw_fringe_bitmap, draw_row_fringe_bitmaps)
(draw_window_fringes, compute_fringe_widths, update_window_fringes):
Move fringe handling vars and code to new file fringe.c.
(handle_display_prop): Handle left-fringe and right-fringe
display properties; store user fringe bitmaps in iterator.
(move_it_in_display_line_to): Handle cursor in fringe at eob.
(clear_garbaged_frames): Set force_flush_display_p if resized.
(redisplay_window): Redraw fringe bitmaps if not just_this_one_p.
(display_line): Handle cursor in fringe at eob.
(display_line): Set row user fringe bitmaps from iterator.
2004-02-08 23:20:52 +00:00
Kim F. Storm
ec110e9e90 (hscroll_window_tree): Position cursor near to right margin in hscrolled
window when jumping to end of line (rather than centering cursor).
2004-02-07 00:00:13 +00:00
Miles Bader
7af0e8d775 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-41
Make fringe-drawing stuff compile without a window-system

* src/xdisp.c (Voverflow_newline_into_fringe)
(move_it_in_display_line_to, redisplay_internal)
(update_window_fringes, redisplay_window, display_line, window):
Add `#ifdef HAVE_WINDOW_SYSTEM' around fringe-drawing stuff, so
that it compiles without a window-system.
* src/dispnew.c (direct_output_for_insert, update_window): Likewise.
2004-01-17 03:31:26 +00:00
Kim F. Storm
88e6b646f5 (Voverflow_newline_into_fringe): New variable.
(IT_OVERFLOW_NEWLINE_INTO_FRINGE): New macro.
(move_it_in_display_line_to): Overflow newline into fringe for
rows that are exactly as wide as the window.
(up_arrow_bits, down_arrow_bits, first_line_bits, last_line_bits)
(filled_box_cursor_bits, hollow_box_cursor_bits, bar_cursor_bits)
(hbar_cursor_bits, hollow_square_bits): New fringe bitmaps.
(fringe_bitmaps): Add new bitmaps.
(draw_fringe_bitmap): Make extern.  Remove WHICH arg.
Select proper bitmap for cursor in fringe when appropriate.
Handle alignment of bitmap to top or bottom of row.
(draw_row_fringe_bitmaps): Don't select bitmaps here; that is now
done by update_window_fringes.
(update_window_fringes, draw_window_fringes): New functions.
(redisplay_internal): Call update_window_fringes in case only
cursor row is updated.
(redisplay_window): Call update_window_fringes.
Explicitly call draw_window_fringes if redisplay was done using
the current matrix or the overlay arrow is in the window.
(try_window_reusing_current_matrix): Mark scrolled rows for
fringe update (to update buffer-boundaries / scrolling icons).
(find_last_unchanged_at_beg_row): Handle exact width lines line
continued lines.
(display_line): Overflow newline into fringe for rows that are
exactly as wide as the window.  Don't append space for newline
in this case.
(notice_overwritten_cursor): Explicitly clear cursor bitmap
in fringe as if it had been overwritten.
(erase_phys_cursor): Erase cursor bitmap in fringe.
(syms_of_xdisp): Mark show-trailing-whitespace and
void-text-area-pointer as user options.
DEFVAR_LISP Voverflow_newline_into_fringe.  Enable by default.
2004-01-16 18:47:20 +00:00