{
struct Lisp_Vector *v = XVECTOR (DISP_INVIS_VECTOR (it->dp));
it->dpvec = v->contents;
- it->dpend = v->contents + v->size;
+ it->dpend = v->contents + v->header.size;
}
else
{
}
-/* Set up IT from a single `display' specification PROP. OBJECT
+/* Set up IT from a single `display' property specification SPEC. OBJECT
is the object in which the `display' property was found. *POSITION
is the position at which it was found. DISPLAY_REPLACED_P non-zero
means that we previously saw a display specification which already
OVERLAY is the overlay this `display' property came from,
or nil if it was a text property.
- If PROP is a `space' or `image' specification, and in some other
+ If SPEC is a `space' or `image' specification, and in some other
cases too, set *POSITION to the position where the `display'
property ends.
static int
handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
Lisp_Object overlay, struct text_pos *position,
- int display_replaced_before_p)
+ int display_replaced_p)
{
Lisp_Object form;
Lisp_Object location, value;
#endif /* not HAVE_WINDOW_SYSTEM */
|| (CONSP (value) && EQ (XCAR (value), Qspace)));
- if (valid_p && !display_replaced_before_p)
+ if (valid_p && !display_replaced_p)
{
/* Save current settings of IT so that we can restore them
when we are finished with the glyph property value. */
if (CHAR_TABLE_P (Vglyphless_char_display)
&& CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (Vglyphless_char_display)) >= 1)
- glyphless_method = (c >= 0
- ? CHAR_TABLE_REF (Vglyphless_char_display, c)
- : XCHAR_TABLE (Vglyphless_char_display)->extras[0]);
+ {
+ if (c >= 0)
+ {
+ glyphless_method = CHAR_TABLE_REF (Vglyphless_char_display, c);
+ if (CONSP (glyphless_method))
+ glyphless_method = FRAME_WINDOW_P (it->f)
+ ? XCAR (glyphless_method)
+ : XCDR (glyphless_method);
+ }
+ else
+ glyphless_method = XCHAR_TABLE (Vglyphless_char_display)->extras[0];
+ }
+
retry:
if (NILP (glyphless_method))
{
/* Return the first character from the display table
entry, if not empty. If empty, don't display the
current character. */
- if (v->size)
+ if (v->header.size)
{
it->dpvec_char_len = it->len;
it->dpvec = v->contents;
- it->dpend = v->contents + v->size;
+ it->dpend = v->contents + v->header.size;
it->current.dpvec_index = 0;
it->dpvec_face_id = -1;
it->saved_face_id = it->face_id;
{
if (m)
{
- char *buf = FRAME_MESSAGE_BUF (f);
- size_t bufsize = FRAME_MESSAGE_BUF_SIZE (f);
- int len;
-
- memset (buf, 0, bufsize);
- len = vsnprintf (buf, bufsize, m, ap);
+ size_t len;
- /* Do any truncation at a character boundary. */
- if (! (0 <= len && len < bufsize))
- {
- char *end = memchr (buf, 0, bufsize);
- for (len = end ? end - buf : bufsize;
- len && ! CHAR_HEAD_P (buf[len - 1]);
- len--)
- continue;
- }
+ len = doprnt (FRAME_MESSAGE_BUF (f),
+ FRAME_MESSAGE_BUF_SIZE (f), m, (char *)0, ap);
message2 (FRAME_MESSAGE_BUF (f), len, 0);
}
window_height_changed_p
= with_echo_area_buffer (w, display_last_displayed_message_p,
display_echo_area_1,
- (EMACS_INT) w, Qnil, 0, 0);
+ (intptr_t) w, Qnil, 0, 0);
if (no_message_p)
echo_area_buffer[i] = Qnil;
static int
display_echo_area_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
{
- struct window *w = (struct window *) a1;
+ intptr_t i1 = a1;
+ struct window *w = (struct window *) i1;
Lisp_Object window;
struct text_pos start;
int window_height_changed_p = 0;
resize_exactly = Qnil;
resized_p = with_echo_area_buffer (w, 0, resize_mini_window_1,
- (EMACS_INT) w, resize_exactly, 0, 0);
+ (intptr_t) w, resize_exactly,
+ 0, 0);
if (resized_p)
{
++windows_or_buffers_changed;
static int
resize_mini_window_1 (EMACS_INT a1, Lisp_Object exactly, EMACS_INT a3, EMACS_INT a4)
{
- return resize_mini_window ((struct window *) a1, !NILP (exactly));
+ intptr_t i1 = a1;
+ return resize_mini_window ((struct window *) i1, !NILP (exactly));
}
else
{
with_echo_area_buffer (0, 0, current_message_1,
- (EMACS_INT) &msg, Qnil, 0, 0);
+ (intptr_t) &msg, Qnil, 0, 0);
if (NILP (msg))
echo_area_buffer[0] = Qnil;
}
static int
current_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
{
- Lisp_Object *msg = (Lisp_Object *) a1;
+ intptr_t i1 = a1;
+ Lisp_Object *msg = (Lisp_Object *) i1;
if (Z > BEG)
*msg = make_buffer_string (BEG, Z, 1);
|| (STRINGP (string) && STRING_MULTIBYTE (string)));
with_echo_area_buffer (0, -1, set_message_1,
- (EMACS_INT) s, string, nbytes, multibyte_p);
+ (intptr_t) s, string, nbytes, multibyte_p);
message_buf_print = 0;
help_echo_showing_p = 0;
}
static int
set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multibyte_p)
{
- const char *s = (const char *) a1;
+ intptr_t i1 = a1;
+ const char *s = (const char *) i1;
const unsigned char *msg = (const unsigned char *) s;
Lisp_Object string = a2;
/* Display all items of the menu bar. */
items = FRAME_MENU_BAR_ITEMS (it.f);
- for (i = 0; i < XVECTOR (items)->size; i += 4)
+ for (i = 0; i < ASIZE (items); i += 4)
{
Lisp_Object string;
so get us a 2-digit number that is close. */
if (total == 100)
total = 99;
- sprintf (decode_mode_spec_buf, "%2ld%%", (long)total);
+ sprintf (decode_mode_spec_buf, "%2"pI"d%%", total);
return decode_mode_spec_buf;
}
}
if (total == 100)
total = 99;
if (toppos <= BUF_BEGV (b))
- sprintf (decode_mode_spec_buf, "Top%2ld%%", (long)total);
+ sprintf (decode_mode_spec_buf, "Top%2"pI"d%%", total);
else
- sprintf (decode_mode_spec_buf, "%2ld%%", (long)total);
+ sprintf (decode_mode_spec_buf, "%2"pI"d%%", total);
return decode_mode_spec_buf;
}
}
{
if (! STRINGP (acronym) && CHAR_TABLE_P (Vglyphless_char_display))
acronym = CHAR_TABLE_REF (Vglyphless_char_display, it->c);
+ if (CONSP (acronym))
+ acronym = XCAR (acronym);
str = STRINGP (acronym) ? SSDATA (acronym) : "";
}
else
{
struct Lisp_Vector *v = XVECTOR (XCDR (hot_spot));
Lisp_Object *poly = v->contents;
- int n = v->size;
+ int n = v->header.size;
int i;
int inside = 0;
Lisp_Object lx, ly;
Fput (Qglyphless_char_display, Qchar_table_extra_slots, make_number (1));
DEFVAR_LISP ("glyphless-char-display", Vglyphless_char_display,
- doc: /* Char-table to control displaying of glyphless characters.
-Each element, if non-nil, is an ASCII acronym string (displayed in a box)
-or one of these symbols:
- hex-code: display the hexadecimal code of a character in a box
- empty-box: display as an empty box
- thin-space: display as 1-pixel width space
- zero-width: don't display
-
-It has one extra slot to control the display of a character for which
-no font is found. The value of the slot is `hex-code' or `empty-box'.
-The default is `empty-box'. */);
+ doc: /* Char-table defining glyphless characters.
+Each element, if non-nil, should be one of the following:
+ an ASCII acronym string: display this string in a box
+ `hex-code': display the hexadecimal code of a character in a box
+ `empty-box': display as an empty box
+ `thin-space': display as 1-pixel width space
+ `zero-width': don't display
+An element may also be a cons cell (GRAPHICAL . TEXT), which specifies the
+display method for graphical terminals and text terminals respectively.
+GRAPHICAL and TEXT should each have one of the values listed above.
+
+The char-table has one extra slot to control the display of a character for
+which no font is found. This slot only takes effect on graphical terminals.
+Its value should be an ASCII acronym string, `hex-code', `empty-box', or
+`thin-space'. The default is `empty-box'. */);
Vglyphless_char_display = Fmake_char_table (Qglyphless_char_display, Qnil);
Fset_char_table_extra_slot (Vglyphless_char_display, make_number (0),
Qempty_box);
mini_w = XWINDOW (minibuf_window);
root_window = FRAME_ROOT_WINDOW (XFRAME (WINDOW_FRAME (mini_w)));
+ echo_area_window = minibuf_window;
if (!noninteractive)
{