-2001-05-21 Gerd Moellmann <gerd@gnu.org>
+2001-05-29 Gerd Moellmann <gerd@gnu.org>
* lisp.h (enum symbol_interned): New enumeration.
(struct Lisp_Symbol): Remove member `obarray', add
SET_SYMBOL_VALUE macros instead of accessing symbols' value
directly.
+2001-05-28 Gerd Moellmann <gerd@gnu.org>
+
+ * xmenu.c (xmenu_show) [!HAVE_MULTILINGUAL_MENU]: Don't overwrite
+ an item's name with its key description in case the description
+ is a multibyte string.
+
+ * keymap.c (Fsingle_key_description): Create a multibyte string
+ only if necessary.
+
+ * macros.c (Fstart_kbd_macro): Doc fix.
+
+ * xterm.c (cursor_in_mouse_face_p): New function.
+ (x_draw_stretch_glyph_string): Use it to choose a different GC
+ when drawing a cursor within highlighted text.
+
+ * editfns.c (char_property_eq): Put in #if 0.
+
+ * indent.c (string_display_width): Put in #if 0.
+
+ * lread.c (Fload): Remove unused label.
+
+ * termcap.c (speeds): Put in #if 0.
+
2001-05-18 Gerd Moellmann <gerd@gnu.org>
* eval.c (call_debugger): Don't bind inhibit-eval-during-redisplay.
}
\f
+#if 0 /* Not used. */
+
/* Return nonzero if POS1 and POS2 have the same value
for the text property PROP. */
return EQ (pval1, pval2);
}
+#endif /* 0 */
+
/* Return the direction from which the text-property PROP would be
inherited by any new text inserted at POS: 1 if it would be
inherited from the char after POS, -1 if it would be inherited from
return col;
}
\f
+
+#if 0 /* Not used. */
+
/* Return the width in columns of the part of STRING from BEG to END.
If BEG is nil, that stands for the beginning of STRING.
If END is nil, that stands for the end of STRING. */
return col;
}
+
+#endif /* 0 */
+
\f
DEFUN ("indent-to", Findent_to, Sindent_to, 1, 2, "NIndent to column: ",
"Indent from point with tabs and spaces until COLUMN is reached.\n\
}
else
{
- char tem[KEY_DESCRIPTION_SIZE];
- int len;
-
- *push_key_description (XUINT (key), tem, 1) = 0;
- len = strlen (tem);
- return make_multibyte_string (tem,
- multibyte_chars_in_text (tem, len),
- len);
+ char tem[KEY_DESCRIPTION_SIZE], *end;
+ int nbytes, nchars;
+ Lisp_Object string;
+
+ end = push_key_description (XUINT (key), tem, 1);
+ nbytes = end - tem;
+ nchars = multibyte_chars_in_text (tem, nbytes);
+ if (nchars == nbytes)
+ string = build_string (tem);
+ else
+ string = make_multibyte_string (tem, nchars, nbytes);
+ return string;
}
}
else if (SYMBOLP (key)) /* Function key or event-symbol */
}
else
{
- load_source:
-
/* We are loading a source file (*.el). */
if (!NILP (Vload_source_file_function))
{
Use \\[end-kbd-macro] to finish recording and make the macro available.\n\
Use \\[name-last-kbd-macro] to give it a permanent name.\n\
Non-nil arg (prefix arg) means append to last macro defined;\n\
- This begins by re-executing that macro as if you typed it again.")
+this begins by re-executing that macro as if you typed it again.")
(append)
Lisp_Object append;
{
/* Work-alike for termcap, plus extra features.
- Copyright (C) 1985, 86, 93, 94, 95, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1985, 86, 93, 94, 95, 2000, 2001
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
int tputs_baud_rate;
char PC;
+#if 0 /* Doesn't seem to be used anymore. */
+
/* Actual baud rate if positive;
- baud rate / 100 if negative. */
#endif /* not VMS */
};
+#endif /* 0 */
+
void
tputs (str, nlines, outfun)
register char *str;
if (STRINGP (item_name) && STRING_MULTIBYTE (item_name))
item_name = string_make_unibyte (item_name);
if (STRINGP (descrip) && STRING_MULTIBYTE (descrip))
- item_name = string_make_unibyte (descrip);
+ descrip = string_make_unibyte (descrip);
#endif
wv = xmalloc_widget_value ();
DRAW_IMAGE_SUNKEN
};
+static int cursor_in_mouse_face_p P_ ((struct window *));
static int clear_mouse_face P_ ((struct x_display_info *));
static int x_alloc_nearest_color_1 P_ ((Display *, Colormap, XColor *));
static void x_set_window_size_1 P_ ((struct frame *, int, int, int));
/* Clear rest using the GC of the original non-cursor face. */
if (width < s->background_width)
{
- GC gc = s->face->gc;
int x = s->x + width, y = s->y;
int w = s->background_width - width, h = s->height;
XRectangle r;
+ GC gc;
+ if (s->row->mouse_face_p
+ && cursor_in_mouse_face_p (s->w))
+ {
+ x_set_mouse_face_gc (s);
+ gc = s->gc;
+ }
+ else
+ gc = s->face->gc;
+
x_get_glyph_string_clip_rect (s, &r);
XSetClipRectangles (s->display, gc, 0, 0, &r, 1, Unsorted);
-
+
if (s->face->stipple)
{
/* Fill background with a stipple pattern. */
}
+/* Non-zero if physical cursor of window W is within mouse face. */
+
+static int
+cursor_in_mouse_face_p (w)
+ struct window *w;
+{
+ struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
+ int in_mouse_face = 0;
+
+ if (WINDOWP (dpyinfo->mouse_face_window)
+ && XWINDOW (dpyinfo->mouse_face_window) == w)
+ {
+ int hpos = w->phys_cursor.hpos;
+ int vpos = w->phys_cursor.vpos;
+
+ if (vpos >= dpyinfo->mouse_face_beg_row
+ && vpos <= dpyinfo->mouse_face_end_row
+ && (vpos > dpyinfo->mouse_face_beg_row
+ || hpos >= dpyinfo->mouse_face_beg_col)
+ && (vpos < dpyinfo->mouse_face_end_row
+ || hpos < dpyinfo->mouse_face_end_col
+ || dpyinfo->mouse_face_past_end))
+ in_mouse_face = 1;
+ }
+
+ return in_mouse_face;
+}
+
+
/* Display or clear cursor of window W. If ON is zero, clear the
cursor. If it is non-zero, display the cursor. If ON is nonzero,
where to put the cursor is specified by HPOS, VPOS, X and Y. */