summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-05-29 11:10:47 +0000
committerGerd Moellmann <gerd@gnu.org>2001-05-29 11:10:47 +0000
commit1cda365bcc8ffdc03ea705be1ca0860e56149944 (patch)
tree7d4a67d2b046b564183ebce6847d44b8dd6ef707
parent82d336bb15a1145e9d6f082aa9ac5513d84459c3 (diff)
downloademacs-old-branches/gerd_defvaralias.tar.gz
*** empty log message ***old-branches/gerd_defvaralias
-rw-r--r--src/ChangeLog25
-rw-r--r--src/editfns.c4
-rw-r--r--src/indent.c6
-rw-r--r--src/keymap.c20
-rw-r--r--src/lread.c2
-rw-r--r--src/macros.c2
-rw-r--r--src/termcap.c7
-rw-r--r--src/xmenu.c2
-rw-r--r--src/xterm.c43
9 files changed, 95 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0904f6b54e5..15acfd1f0e3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
-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
@@ -44,6 +44,29 @@
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.
diff --git a/src/editfns.c b/src/editfns.c
index e50ef45ec0a..37f0162458d 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -316,6 +316,8 @@ If you set the marker not to point anywhere, the buffer will have no mark.")
}
+#if 0 /* Not used. */
+
/* Return nonzero if POS1 and POS2 have the same value
for the text property PROP. */
@@ -332,6 +334,8 @@ char_property_eq (prop, pos1, pos2)
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
diff --git a/src/indent.c b/src/indent.c
index a6c5b046012..49768ea5206 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -624,6 +624,9 @@ current_column_1 ()
return col;
}
+
+#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. */
@@ -701,6 +704,9 @@ string_display_width (string, beg, end)
return col;
}
+
+#endif /* 0 */
+
DEFUN ("indent-to", Findent_to, Sindent_to, 1, 2, "NIndent to column: ",
"Indent from point with tabs and spaces until COLUMN is reached.\n\
diff --git a/src/keymap.c b/src/keymap.c
index a1f0de1c09a..f96c109c9cd 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1959,14 +1959,18 @@ around function keys and event symbols.")
}
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 */
diff --git a/src/lread.c b/src/lread.c
index d59fd83b11c..91b3075466b 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -777,8 +777,6 @@ Return t if file exists.")
}
else
{
- load_source:
-
/* We are loading a source file (*.el). */
if (!NILP (Vload_source_file_function))
{
diff --git a/src/macros.c b/src/macros.c
index fde63165b47..4f5c77f6fbb 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -61,7 +61,7 @@ The commands are recorded even as they are executed.\n\
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;
{
diff --git a/src/termcap.c b/src/termcap.c
index c9bf1a40b52..b99ae473315 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -1,5 +1,6 @@
/* 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
@@ -292,6 +293,8 @@ tgetst1 (ptr, area)
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. */
@@ -306,6 +309,8 @@ static int speeds[] =
#endif /* not VMS */
};
+#endif /* 0 */
+
void
tputs (str, nlines, outfun)
register char *str;
diff --git a/src/xmenu.c b/src/xmenu.c
index 6317c126286..e87743b0057 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -2077,7 +2077,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
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 ();
diff --git a/src/xterm.c b/src/xterm.c
index 3dfe0fac2aa..394b75cfe6c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -399,6 +399,7 @@ enum draw_glyphs_face
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));
@@ -4384,14 +4385,23 @@ x_draw_stretch_glyph_string (s)
/* 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. */
@@ -11201,6 +11211,35 @@ x_erase_phys_cursor (w)
}
+/* 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. */