mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-09 13:10:57 -08:00
upstream
This commit is contained in:
commit
bd5feebdfc
27 changed files with 1047 additions and 306 deletions
|
|
@ -1,3 +1,53 @@
|
|||
2011-10-28 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
|
||||
possible random value that matches one of those tested as
|
||||
condition to clear the mouse face.
|
||||
|
||||
2011-10-28 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
|
||||
|
||||
2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* window.c (make_window): Initialize phys_cursor_on_p.
|
||||
|
||||
2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* lisp.h (struct Lisp_Symbol): Update comments.
|
||||
|
||||
2011-10-28 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* w32font.c (w32_load_unicows_or_gdi32): Add missing return.
|
||||
|
||||
2011-10-28 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
|
||||
<oslsachem@gmail.com> for helping to debug this.
|
||||
|
||||
* w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
|
||||
(g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
|
||||
(g_b_init_get_glyph_outline_w): New static variables.
|
||||
(GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
|
||||
(GetGlyphOutlineW_Proc): New typedefs.
|
||||
(w32_load_unicows_or_gdi32, get_outline_metrics_w)
|
||||
(get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
|
||||
New functions.
|
||||
(w32font_open_internal, compute_metrics):
|
||||
Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
|
||||
instead of calling the "wide" APIs directly.
|
||||
|
||||
* emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
|
||||
|
||||
* w32.h (syms_of_w32font): Add prototype.
|
||||
|
||||
2011-10-27 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
|
||||
(Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
|
||||
(Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
|
||||
(Fmove_to_window_line): Doc fix.
|
||||
|
||||
2011-10-27 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* process.c (make_process): Set gnutls_state to NULL.
|
||||
|
|
@ -11,8 +61,8 @@
|
|||
|
||||
2011-10-27 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* gnutls.c (emacs_gnutls_deinit): New function. Deallocate
|
||||
credentials structures as well as calling gnutls_deinit.
|
||||
* gnutls.c (emacs_gnutls_deinit): New function.
|
||||
Deallocate credentials structures as well as calling gnutls_deinit.
|
||||
(Fgnutls_deinit, Fgnutls_boot): Use it.
|
||||
|
||||
* process.c (make_process): Initialize GnuTLS credentials to NULL.
|
||||
|
|
|
|||
|
|
@ -1597,6 +1597,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
|
|||
/* Initialization that must be done even if the global variable
|
||||
initialized is non zero. */
|
||||
#ifdef HAVE_NTGUI
|
||||
globals_of_w32font ();
|
||||
globals_of_w32fns ();
|
||||
globals_of_w32menu ();
|
||||
globals_of_w32select ();
|
||||
|
|
|
|||
124
src/keyboard.c
124
src/keyboard.c
|
|
@ -73,7 +73,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
#include "nsterm.h"
|
||||
#endif
|
||||
|
||||
/* Variables for blockinput.h: */
|
||||
/* Variables for blockinput.h: */
|
||||
|
||||
/* Non-zero if interrupt input is blocked right now. */
|
||||
volatile int interrupt_input_blocked;
|
||||
|
|
@ -341,7 +341,7 @@ static Lisp_Object Qconfig_changed_event;
|
|||
Lisp_Object Qevent_kind;
|
||||
static Lisp_Object Qevent_symbol_elements;
|
||||
|
||||
/* menu and tool bar item parts */
|
||||
/* Menu and tool bar item parts. */
|
||||
static Lisp_Object Qmenu_enable;
|
||||
static Lisp_Object QCenable, QCvisible, QChelp, QCkeys, QCkey_sequence;
|
||||
Lisp_Object QCfilter;
|
||||
|
|
@ -838,7 +838,7 @@ recursive_edit_unwind (Lisp_Object buffer)
|
|||
|
||||
|
||||
#if 0 /* These two functions are now replaced with
|
||||
temporarily_switch_to_single_kboard. */
|
||||
temporarily_switch_to_single_kboard. */
|
||||
static void
|
||||
any_kboard_state ()
|
||||
{
|
||||
|
|
@ -1041,7 +1041,7 @@ cmd_error (Lisp_Object data)
|
|||
Vquit_flag = Qnil;
|
||||
|
||||
Vinhibit_quit = Qnil;
|
||||
#if 0 /* This shouldn't be necessary anymore. --lorentey */
|
||||
#if 0 /* This shouldn't be necessary anymore. --lorentey */
|
||||
if (command_loop_level == 0 && minibuf_level == 0)
|
||||
any_kboard_state ();
|
||||
#endif
|
||||
|
|
@ -1134,7 +1134,7 @@ command_loop (void)
|
|||
#if 0 /* This shouldn't be necessary anymore. --lorentey */
|
||||
/* Reset single_kboard in case top-level set it while
|
||||
evaluating an -f option, or we are stuck there for some
|
||||
other reason. */
|
||||
other reason. */
|
||||
any_kboard_state ();
|
||||
#endif
|
||||
internal_catch (Qtop_level, command_loop_2, Qnil);
|
||||
|
|
@ -1495,8 +1495,8 @@ command_loop_1 (void)
|
|||
if (!NILP (Vquit_flag))
|
||||
{
|
||||
Vexecuting_kbd_macro = Qt;
|
||||
QUIT; /* Make some noise. */
|
||||
/* Will return since macro now empty. */
|
||||
QUIT; /* Make some noise. */
|
||||
/* Will return since macro now empty. */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1515,7 +1515,7 @@ command_loop_1 (void)
|
|||
Vdisable_point_adjustment = Qnil;
|
||||
|
||||
/* Process filters and timers may have messed with deactivate-mark.
|
||||
reset it before we execute the command. */
|
||||
reset it before we execute the command. */
|
||||
Vdeactivate_mark = Qnil;
|
||||
|
||||
/* Remap command through active keymaps. */
|
||||
|
|
@ -1555,7 +1555,7 @@ command_loop_1 (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
/* Here for a command that isn't executed directly */
|
||||
/* Here for a command that isn't executed directly. */
|
||||
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
int scount = SPECPDL_INDEX ();
|
||||
|
|
@ -1963,7 +1963,7 @@ void
|
|||
poll_for_input_1 (void)
|
||||
{
|
||||
/* Tell ns_read_socket() it is being called asynchronously so it can avoid
|
||||
doing anything dangerous. */
|
||||
doing anything dangerous. */
|
||||
#ifdef HAVE_NS
|
||||
++handling_signal;
|
||||
#endif
|
||||
|
|
@ -2003,7 +2003,7 @@ start_polling (void)
|
|||
#ifdef POLL_FOR_INPUT
|
||||
/* XXX This condition was (read_socket_hook && !interrupt_input),
|
||||
but read_socket_hook is not global anymore. Let's pretend that
|
||||
it's always set. */
|
||||
it's always set. */
|
||||
if (!interrupt_input)
|
||||
{
|
||||
/* Turn alarm handling on unconditionally. It might have
|
||||
|
|
@ -2040,7 +2040,7 @@ input_polling_used (void)
|
|||
#ifdef POLL_FOR_INPUT
|
||||
/* XXX This condition was (read_socket_hook && !interrupt_input),
|
||||
but read_socket_hook is not global anymore. Let's pretend that
|
||||
it's always set. */
|
||||
it's always set. */
|
||||
return !interrupt_input;
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -2055,7 +2055,7 @@ stop_polling (void)
|
|||
#ifdef POLL_FOR_INPUT
|
||||
/* XXX This condition was (read_socket_hook && !interrupt_input),
|
||||
but read_socket_hook is not global anymore. Let's pretend that
|
||||
it's always set. */
|
||||
it's always set. */
|
||||
if (!interrupt_input)
|
||||
++poll_suppress_count;
|
||||
#endif
|
||||
|
|
@ -2393,7 +2393,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
|
|||
real event came from. Normally, a switch-frame event selects
|
||||
internal_last_event_frame after each command is read, but
|
||||
events read from a macro should never cause a new frame to be
|
||||
selected. */
|
||||
selected. */
|
||||
Vlast_event_frame = internal_last_event_frame = Qmacro;
|
||||
|
||||
/* Exit the macro if we are at the end.
|
||||
|
|
@ -2503,7 +2503,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
|
|||
Try this before the sit-for, because the sit-for
|
||||
would do the wrong thing if we are supposed to do
|
||||
menu prompting. If EVENT_HAS_PARAMETERS then we are reading
|
||||
after a mouse event so don't try a minibuf menu. */
|
||||
after a mouse event so don't try a minibuf menu. */
|
||||
c = Qnil;
|
||||
if (nmaps > 0 && INTERACTIVE
|
||||
&& !NILP (prev_event) && ! EVENT_HAS_PARAMETERS (prev_event)
|
||||
|
|
@ -4990,8 +4990,8 @@ static const char *const lispy_function_keys[] =
|
|||
"break", /* 0xff6b */
|
||||
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0, "backtab", 0, 0, 0, /* 0xff70... */
|
||||
0, 0, 0, 0, 0, 0, 0, "kp-numlock", /* 0xff78... */
|
||||
0, 0, 0, 0, "backtab", 0, 0, 0, /* 0xff70... */
|
||||
0, 0, 0, 0, 0, 0, 0, "kp-numlock", /* 0xff78... */
|
||||
"kp-space", /* 0xff80 */ /* IsKeypadKey */
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
"kp-tab", /* 0xff89 */
|
||||
|
|
@ -5103,14 +5103,14 @@ static Lisp_Object *const scroll_bar_parts[] = {
|
|||
static Lisp_Object button_down_location;
|
||||
|
||||
/* Information about the most recent up-going button event: Which
|
||||
button, what location, and what time. */
|
||||
button, what location, and what time. */
|
||||
|
||||
static int last_mouse_button;
|
||||
static int last_mouse_x;
|
||||
static int last_mouse_y;
|
||||
static Time button_down_time;
|
||||
|
||||
/* The number of clicks in this multiple-click. */
|
||||
/* The number of clicks in this multiple-click. */
|
||||
|
||||
static int double_click_count;
|
||||
|
||||
|
|
@ -5354,7 +5354,7 @@ make_lispy_event (struct input_event *event)
|
|||
|
||||
#ifdef HAVE_NS
|
||||
/* NS_NONKEY_EVENTs are just like NON_ASCII_KEYSTROKE_EVENTs,
|
||||
except that they are non-key events (last-nonmenu-event is nil). */
|
||||
except that they are non-key events (last-nonmenu-event is nil). */
|
||||
case NS_NONKEY_EVENT:
|
||||
#endif
|
||||
|
||||
|
|
@ -5840,7 +5840,7 @@ make_lispy_event (struct input_event *event)
|
|||
Fcons (make_number (event->timestamp),
|
||||
Fcons (part, Qnil)))));
|
||||
|
||||
/* Always treat scroll bar events as clicks. */
|
||||
/* Always treat scroll bar events as clicks. */
|
||||
event->modifiers |= click_modifier;
|
||||
event->modifiers &= ~up_modifier;
|
||||
|
||||
|
|
@ -6710,7 +6710,7 @@ lucid_event_type_list_p (Lisp_Object object)
|
|||
If READABLE_EVENTS_FILTER_EVENTS is set in FLAGS, ignore internal
|
||||
events (FOCUS_IN_EVENT).
|
||||
If READABLE_EVENTS_IGNORE_SQUEEZABLES is set in FLAGS, ignore mouse
|
||||
movements and toolkit scroll bar thumb drags. */
|
||||
movements and toolkit scroll bar thumb drags. */
|
||||
|
||||
static void
|
||||
get_input_pending (int *addr, int flags)
|
||||
|
|
@ -6744,7 +6744,7 @@ gobble_input (int expected)
|
|||
#ifdef POLL_FOR_INPUT
|
||||
/* XXX This condition was (read_socket_hook && !interrupt_input),
|
||||
but read_socket_hook is not global anymore. Let's pretend that
|
||||
it's always set. */
|
||||
it's always set. */
|
||||
if (!interrupt_input && poll_suppress_count == 0)
|
||||
{
|
||||
SIGMASKTYPE mask;
|
||||
|
|
@ -6819,7 +6819,7 @@ read_avail_input (int expected)
|
|||
if (store_user_signal_events ())
|
||||
expected = 0;
|
||||
|
||||
/* Loop through the available terminals, and call their input hooks. */
|
||||
/* Loop through the available terminals, and call their input hooks. */
|
||||
t = terminal_list;
|
||||
while (t)
|
||||
{
|
||||
|
|
@ -6840,15 +6840,15 @@ read_avail_input (int expected)
|
|||
expected = 0;
|
||||
}
|
||||
|
||||
if (nr == -1) /* Not OK to read input now. */
|
||||
if (nr == -1) /* Not OK to read input now. */
|
||||
{
|
||||
err = 1;
|
||||
}
|
||||
else if (nr == -2) /* Non-transient error. */
|
||||
else if (nr == -2) /* Non-transient error. */
|
||||
{
|
||||
/* The terminal device terminated; it should be closed. */
|
||||
/* The terminal device terminated; it should be closed. */
|
||||
|
||||
/* Kill Emacs if this was our last terminal. */
|
||||
/* Kill Emacs if this was our last terminal. */
|
||||
if (!terminal_list->next_terminal)
|
||||
/* Formerly simply reported no input, but that
|
||||
sometimes led to a failure of Emacs to terminate.
|
||||
|
|
@ -6860,7 +6860,7 @@ read_avail_input (int expected)
|
|||
alone in its group. */
|
||||
kill (getpid (), SIGHUP);
|
||||
|
||||
/* XXX Is calling delete_terminal safe here? It calls delete_frame. */
|
||||
/* XXX Is calling delete_terminal safe here? It calls delete_frame. */
|
||||
{
|
||||
Lisp_Object tmp;
|
||||
XSETTERMINAL (tmp, t);
|
||||
|
|
@ -6950,7 +6950,7 @@ tty_read_avail_input (struct terminal *terminal,
|
|||
return 0;
|
||||
#endif /* subprocesses */
|
||||
|
||||
if (!terminal->name) /* Don't read from a dead terminal. */
|
||||
if (!terminal->name) /* Don't read from a dead terminal. */
|
||||
return 0;
|
||||
|
||||
if (terminal->type != output_termcap
|
||||
|
|
@ -6958,15 +6958,15 @@ tty_read_avail_input (struct terminal *terminal,
|
|||
abort ();
|
||||
|
||||
/* XXX I think the following code should be moved to separate hook
|
||||
functions in system-dependent files. */
|
||||
functions in system-dependent files. */
|
||||
#ifdef WINDOWSNT
|
||||
return 0;
|
||||
#else /* not WINDOWSNT */
|
||||
if (! tty->term_initted) /* In case we get called during bootstrap. */
|
||||
if (! tty->term_initted) /* In case we get called during bootstrap. */
|
||||
return 0;
|
||||
|
||||
if (! tty->input)
|
||||
return 0; /* The terminal is suspended. */
|
||||
return 0; /* The terminal is suspended. */
|
||||
|
||||
#ifdef MSDOS
|
||||
n_to_read = dos_keysns ();
|
||||
|
|
@ -6992,7 +6992,7 @@ tty_read_avail_input (struct terminal *terminal,
|
|||
Gpm_GetEvent closes gpm_fd and clears it to -1, which is why
|
||||
we save it in `fd' so close_gpm can remove it from the
|
||||
select masks.
|
||||
gpm==-1 if a protocol error or EWOULDBLOCK; the latter is normal. */
|
||||
gpm==-1 if a protocol error or EWOULDBLOCK; the latter is normal. */
|
||||
while (gpm = Gpm_GetEvent (&event), gpm == 1) {
|
||||
nread += handle_one_term_event (tty, &event, &gpm_hold_quit);
|
||||
}
|
||||
|
|
@ -7012,7 +7012,7 @@ tty_read_avail_input (struct terminal *terminal,
|
|||
if (ioctl (fileno (tty->input), FIONREAD, &n_to_read) < 0)
|
||||
{
|
||||
if (! noninteractive)
|
||||
return -2; /* Close this terminal. */
|
||||
return -2; /* Close this terminal. */
|
||||
else
|
||||
n_to_read = 0;
|
||||
}
|
||||
|
|
@ -7045,16 +7045,16 @@ tty_read_avail_input (struct terminal *terminal,
|
|||
process group won't get SIGHUP's at logout time. BSDI adheres to
|
||||
this part standard and returns -1 from read (0) with errno==EIO
|
||||
when the control tty is taken away.
|
||||
Jeffrey Honig <jch@bsdi.com> says this is generally safe. */
|
||||
Jeffrey Honig <jch@bsdi.com> says this is generally safe. */
|
||||
if (nread == -1 && errno == EIO)
|
||||
return -2; /* Close this terminal. */
|
||||
return -2; /* Close this terminal. */
|
||||
#if defined (AIX) && defined (_BSD)
|
||||
/* The kernel sometimes fails to deliver SIGHUP for ptys.
|
||||
This looks incorrect, but it isn't, because _BSD causes
|
||||
O_NDELAY to be defined in fcntl.h as O_NONBLOCK,
|
||||
and that causes a value other than 0 when there is no input. */
|
||||
if (nread == 0)
|
||||
return -2; /* Close this terminal. */
|
||||
return -2; /* Close this terminal. */
|
||||
#endif
|
||||
}
|
||||
while (
|
||||
|
|
@ -7132,7 +7132,7 @@ tty_read_avail_input (struct terminal *terminal,
|
|||
buf.code = cbuf[i];
|
||||
/* Set the frame corresponding to the active tty. Note that the
|
||||
value of selected_frame is not reliable here, redisplay tends
|
||||
to temporarily change it. */
|
||||
to temporarily change it. */
|
||||
buf.frame_or_window = tty->top_frame;
|
||||
buf.arg = Qnil;
|
||||
|
||||
|
|
@ -7155,7 +7155,7 @@ handle_async_input (void)
|
|||
pending_signals = pending_atimers;
|
||||
#endif
|
||||
/* Tell ns_read_socket() it is being called asynchronously so it can avoid
|
||||
doing anything dangerous. */
|
||||
doing anything dangerous. */
|
||||
#ifdef HAVE_NS
|
||||
++handling_signal;
|
||||
#endif
|
||||
|
|
@ -7213,7 +7213,7 @@ input_available_signal (int signo)
|
|||
This function exists so that the UNBLOCK_INPUT macro in
|
||||
blockinput.h can have some way to take care of input we put off
|
||||
dealing with, without assuming that every file which uses
|
||||
UNBLOCK_INPUT also has #included the files necessary to get SIGIO. */
|
||||
UNBLOCK_INPUT also has #included the files necessary to get SIGIO. */
|
||||
void
|
||||
reinvoke_input_signal (void)
|
||||
{
|
||||
|
|
@ -7240,7 +7240,7 @@ struct user_signal_info
|
|||
struct user_signal_info *next;
|
||||
};
|
||||
|
||||
/* List of user signals. */
|
||||
/* List of user signals. */
|
||||
static struct user_signal_info *user_signals = NULL;
|
||||
|
||||
void
|
||||
|
|
@ -7777,7 +7777,7 @@ parse_menu_item (Lisp_Object item, int inmenubar)
|
|||
{
|
||||
tem = XCAR (item);
|
||||
if (SYMBOLP (tem) || STRINGP (tem) || VECTORP (tem))
|
||||
/* Be GC protected. Set keyhint to item instead of tem. */
|
||||
/* Be GC protected. Set keyhint to item instead of tem. */
|
||||
keyhint = item;
|
||||
}
|
||||
else if (EQ (tem, QCkeys))
|
||||
|
|
@ -7860,7 +7860,7 @@ parse_menu_item (Lisp_Object item, int inmenubar)
|
|||
if (inmenubar > 0)
|
||||
return 1;
|
||||
|
||||
{ /* This is a command. See if there is an equivalent key binding. */
|
||||
{ /* This is a command. See if there is an equivalent key binding. */
|
||||
Lisp_Object keyeq = AREF (item_properties, ITEM_PROPERTY_KEYEQ);
|
||||
|
||||
/* The previous code preferred :key-sequence to :keys, so we
|
||||
|
|
@ -8416,7 +8416,7 @@ append_tool_bar_item (void)
|
|||
These are done in different ways, depending on how the input will be read.
|
||||
Menus using X are done after auto-saving in read-char, getting the input
|
||||
event from Fx_popup_menu; menus using the minibuf use read_char recursively
|
||||
and do auto-saving in the inner call of read_char. */
|
||||
and do auto-saving in the inner call of read_char. */
|
||||
|
||||
static Lisp_Object
|
||||
read_char_x_menu_prompt (ptrdiff_t nmaps, Lisp_Object *maps,
|
||||
|
|
@ -8636,14 +8636,14 @@ read_char_minibuf_menu_prompt (int commandflag,
|
|||
tem
|
||||
= XVECTOR (item_properties)->contents[ITEM_PROPERTY_KEYEQ];
|
||||
if (!NILP (tem))
|
||||
/* Insert equivalent keybinding. */
|
||||
/* Insert equivalent keybinding. */
|
||||
s = concat2 (s, tem);
|
||||
#endif
|
||||
tem
|
||||
= XVECTOR (item_properties)->contents[ITEM_PROPERTY_TYPE];
|
||||
if (EQ (tem, QCradio) || EQ (tem, QCtoggle))
|
||||
{
|
||||
/* Insert button prefix. */
|
||||
/* Insert button prefix. */
|
||||
Lisp_Object selected
|
||||
= XVECTOR (item_properties)->contents[ITEM_PROPERTY_SELECTED];
|
||||
if (EQ (tem, QCradio))
|
||||
|
|
@ -8877,7 +8877,7 @@ keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey,
|
|||
|
||||
/* If keybuf[fkey->start..fkey->end] is bound in the
|
||||
map and we're in a position to do the key remapping, replace it with
|
||||
the binding and restart with fkey->start at the end. */
|
||||
the binding and restart with fkey->start at the end. */
|
||||
if ((VECTORP (next) || STRINGP (next)) && doit)
|
||||
{
|
||||
int len = XFASTINT (Flength (next));
|
||||
|
|
@ -9041,7 +9041,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
|
|||
|
||||
/* Non-zero if we are trying to map a key by changing an upper-case
|
||||
letter to lower case, or a shifted function key to an unshifted
|
||||
one. */
|
||||
one. */
|
||||
int shift_translated = 0;
|
||||
|
||||
/* If we receive a `switch-frame' or `select-window' event in the middle of
|
||||
|
|
@ -9049,7 +9049,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
|
|||
While we're reading, we keep the event here. */
|
||||
Lisp_Object delayed_switch_frame;
|
||||
|
||||
/* See the comment below... */
|
||||
/* See the comment below... */
|
||||
#if defined (GOBBLE_FIRST_EVENT)
|
||||
Lisp_Object first_event;
|
||||
#endif
|
||||
|
|
@ -9324,7 +9324,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
|
|||
if (!found)
|
||||
{
|
||||
/* Don't touch interrupted_kboard when it's been
|
||||
deleted. */
|
||||
deleted. */
|
||||
delayed_switch_frame = Qnil;
|
||||
goto replay_entire_sequence;
|
||||
}
|
||||
|
|
@ -9432,7 +9432,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
|
|||
{
|
||||
/* If we're at the beginning of a key sequence, and the caller
|
||||
says it's okay, go ahead and return this event. If we're
|
||||
in the midst of a key sequence, delay it until the end. */
|
||||
in the midst of a key sequence, delay it until the end. */
|
||||
if (t > 0 || !can_return_switch_frame)
|
||||
{
|
||||
delayed_switch_frame = key;
|
||||
|
|
@ -9729,7 +9729,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
|
|||
Down-clicks are eliminated.
|
||||
Double-downs reduce to downs, then are eliminated.
|
||||
Triple-downs reduce to double-downs, then to downs,
|
||||
then are eliminated. */
|
||||
then are eliminated. */
|
||||
if (modifiers & (down_modifier | drag_modifier
|
||||
| double_modifier | triple_modifier))
|
||||
{
|
||||
|
|
@ -10838,7 +10838,7 @@ set_waiting_for_input (struct timeval *time_to_clear)
|
|||
waiting_for_input = 1;
|
||||
|
||||
/* If handle_interrupt was called before and buffered a C-g,
|
||||
make it run again now, to avoid timing error. */
|
||||
make it run again now, to avoid timing error. */
|
||||
if (!NILP (Vquit_flag))
|
||||
quit_throw_to_read_char ();
|
||||
}
|
||||
|
|
@ -10859,7 +10859,7 @@ clear_waiting_for_input (void)
|
|||
|
||||
static void
|
||||
interrupt_signal (int signalnum) /* If we don't have an argument, some */
|
||||
/* compilers complain in signal calls. */
|
||||
/* compilers complain in signal calls. */
|
||||
{
|
||||
/* Must preserve main program's value of errno. */
|
||||
int old_errno = errno;
|
||||
|
|
@ -10867,12 +10867,12 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */
|
|||
|
||||
SIGNAL_THREAD_CHECK (signalnum);
|
||||
|
||||
/* See if we have an active terminal on our controlling tty. */
|
||||
/* See if we have an active terminal on our controlling tty. */
|
||||
terminal = get_named_tty ("/dev/tty");
|
||||
if (!terminal)
|
||||
{
|
||||
/* If there are no frames there, let's pretend that we are a
|
||||
well-behaving UN*X program and quit. */
|
||||
well-behaving UN*X program and quit. */
|
||||
Fkill_emacs (Qnil);
|
||||
}
|
||||
else
|
||||
|
|
@ -10900,7 +10900,7 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */
|
|||
|
||||
Otherwise it sets the Lisp variable quit-flag not-nil. This causes
|
||||
eval to throw, when it gets a chance. If quit-flag is already
|
||||
non-nil, it stops the job right away. */
|
||||
non-nil, it stops the job right away. */
|
||||
|
||||
static void
|
||||
handle_interrupt (void)
|
||||
|
|
@ -10909,7 +10909,7 @@ handle_interrupt (void)
|
|||
|
||||
cancel_echoing ();
|
||||
|
||||
/* XXX This code needs to be revised for multi-tty support. */
|
||||
/* XXX This code needs to be revised for multi-tty support. */
|
||||
if (!NILP (Vquit_flag) && get_named_tty ("/dev/tty"))
|
||||
{
|
||||
/* If SIGINT isn't blocked, don't let us be interrupted by
|
||||
|
|
@ -11019,7 +11019,7 @@ handle_interrupt (void)
|
|||
wait_reading_process_output() under HAVE_NS because of the call
|
||||
to ns_select there (needed because otherwise events aren't picked up
|
||||
outside of polling since we don't get SIGIO like X and we don't have a
|
||||
separate event loop thread like W32. */
|
||||
separate event loop thread like W32. */
|
||||
#ifndef HAVE_NS
|
||||
if (waiting_for_input && !echoing)
|
||||
quit_throw_to_read_char ();
|
||||
|
|
@ -11468,7 +11468,7 @@ init_keyboard (void)
|
|||
session may have multiple display types, so we always handle
|
||||
SIGINT. There is special code in interrupt_signal to exit
|
||||
Emacs on SIGINT when there are no termcap frames on the
|
||||
controlling terminal. */
|
||||
controlling terminal. */
|
||||
signal (SIGINT, interrupt_signal);
|
||||
#ifndef DOS_NT
|
||||
/* For systems with SysV TERMIO, C-g is set up for both SIGINT and
|
||||
|
|
@ -12269,7 +12269,7 @@ Currently, the only supported values for this
|
|||
variable are `sigusr1' and `sigusr2'. */);
|
||||
Vdebug_on_event = intern_c_string ("sigusr2");
|
||||
|
||||
/* Create the initial keyboard. */
|
||||
/* Create the initial keyboard. */
|
||||
initial_kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
|
||||
init_kboard (initial_kboard);
|
||||
/* Vwindow_system is left at t for now. */
|
||||
|
|
|
|||
20
src/lisp.h
20
src/lisp.h
|
|
@ -162,7 +162,7 @@ extern int suppress_checking EXTERNALLY_VISIBLE;
|
|||
|
||||
/* First, try and define DECL_ALIGN(type,var) which declares a static
|
||||
variable VAR of type TYPE with the added requirement that it be
|
||||
TYPEBITS-aligned. */
|
||||
TYPEBITS-aligned. */
|
||||
#ifndef NO_DECL_ALIGN
|
||||
# ifndef DECL_ALIGN
|
||||
# if HAVE_ATTRIBUTE_ALIGNED
|
||||
|
|
@ -1088,11 +1088,9 @@ enum symbol_redirect
|
|||
SYMBOL_PLAINVAL = 4,
|
||||
SYMBOL_VARALIAS = 1,
|
||||
SYMBOL_LOCALIZED = 2,
|
||||
SYMBOL_FORWARDED = 3
|
||||
SYMBOL_FORWARDED = 3
|
||||
};
|
||||
|
||||
/* In a symbol, the markbit of the plist is used as the gc mark bit */
|
||||
|
||||
struct Lisp_Symbol
|
||||
{
|
||||
unsigned gcmarkbit : 1;
|
||||
|
|
@ -1101,8 +1099,7 @@ struct Lisp_Symbol
|
|||
0 : it's a plain var, the value is in the `value' field.
|
||||
1 : it's a varalias, the value is really in the `alias' symbol.
|
||||
2 : it's a localized var, the value is in the `blv' object.
|
||||
3 : it's a forwarding variable, the value is in `forward'.
|
||||
*/
|
||||
3 : it's a forwarding variable, the value is in `forward'. */
|
||||
enum symbol_redirect redirect : 3;
|
||||
|
||||
/* Non-zero means symbol is constant, i.e. changing its value
|
||||
|
|
@ -1119,15 +1116,12 @@ struct Lisp_Symbol
|
|||
unsigned declared_special : 1;
|
||||
|
||||
/* The symbol's name, as a Lisp string.
|
||||
|
||||
The name "xname" is used to intentionally break code referring to
|
||||
the old field "name" of type pointer to struct Lisp_String. */
|
||||
Lisp_Object xname;
|
||||
|
||||
/* Value of the symbol or Qunbound if unbound. If this symbol is a
|
||||
defvaralias, `alias' contains the symbol for which it is an
|
||||
alias. Use the SYMBOL_VALUE and SET_SYMBOL_VALUE macros to get
|
||||
and set a symbol's value, to take defvaralias into account. */
|
||||
/* Value of the symbol or Qunbound if unbound. Which alternative of the
|
||||
union is used depends on the `redirect' field above. */
|
||||
union {
|
||||
Lisp_Object value;
|
||||
struct Lisp_Symbol *alias;
|
||||
|
|
@ -1322,7 +1316,7 @@ struct Lisp_Misc_Any /* Supertype of all Misc types. */
|
|||
enum Lisp_Misc_Type type : 16; /* = Lisp_Misc_??? */
|
||||
unsigned gcmarkbit : 1;
|
||||
int spacer : 15;
|
||||
/* Make it as long as "Lisp_Free without padding". */
|
||||
/* Make it as long as "Lisp_Free without padding". */
|
||||
void *fill;
|
||||
};
|
||||
|
||||
|
|
@ -3607,7 +3601,7 @@ extern void init_system_name (void);
|
|||
|
||||
#define SWITCH_ENUM_CAST(x) (x)
|
||||
|
||||
/* Use this to suppress gcc's warnings. */
|
||||
/* Use this to suppress gcc's warnings. */
|
||||
#ifdef lint
|
||||
|
||||
/* Use CODE only if lint checking is in effect. */
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ extern void term_w32select (void);
|
|||
extern void syms_of_w32menu (void);
|
||||
extern void globals_of_w32menu (void);
|
||||
extern void syms_of_fontset (void);
|
||||
extern void syms_of_w32font (void);
|
||||
|
||||
extern int _sys_read_ahead (int fd);
|
||||
extern int _sys_wait_accept (int fd);
|
||||
|
|
|
|||
149
src/w32font.c
149
src/w32font.c
|
|
@ -145,6 +145,138 @@ struct font_callback_data
|
|||
style variations if the font name is not specified. */
|
||||
static void list_all_matching_fonts (struct font_callback_data *);
|
||||
|
||||
static BOOL g_b_init_is_w9x;
|
||||
static BOOL g_b_init_get_outline_metrics_w;
|
||||
static BOOL g_b_init_get_text_metrics_w;
|
||||
static BOOL g_b_init_get_glyph_outline_w;
|
||||
static BOOL g_b_init_get_glyph_outline_w;
|
||||
|
||||
typedef UINT (WINAPI * GetOutlineTextMetricsW_Proc) (
|
||||
HDC hdc,
|
||||
UINT cbData,
|
||||
LPOUTLINETEXTMETRICW lpotmw);
|
||||
typedef BOOL (WINAPI * GetTextMetricsW_Proc) (
|
||||
HDC hdc,
|
||||
LPTEXTMETRICW lptmw);
|
||||
typedef DWORD (WINAPI * GetGlyphOutlineW_Proc) (
|
||||
HDC hdc,
|
||||
UINT uChar,
|
||||
UINT uFormat,
|
||||
LPGLYPHMETRICS lpgm,
|
||||
DWORD cbBuffer,
|
||||
LPVOID lpvBuffer,
|
||||
const MAT2 *lpmat2);
|
||||
|
||||
/* Several "wide" functions we use to support the font backends are
|
||||
unavailable on Windows 9X, unless UNICOWS.DLL is installed (their
|
||||
versions in the default libraries are non-functional stubs). On NT
|
||||
and later systems, these functions are in GDI32.DLL. The following
|
||||
helper function attempts to load UNICOWS.DLL on Windows 9X, and
|
||||
refuses to let Emacs start up if that library is not found. On NT
|
||||
and later versions, it simply loads GDI32.DLL, which should always
|
||||
be available. */
|
||||
static HMODULE
|
||||
w32_load_unicows_or_gdi32 (void)
|
||||
{
|
||||
static BOOL is_9x = 0;
|
||||
OSVERSIONINFO os_ver;
|
||||
HMODULE ret;
|
||||
if (g_b_init_is_w9x == 0)
|
||||
{
|
||||
g_b_init_is_w9x = 1;
|
||||
ZeroMemory (&os_ver, sizeof (OSVERSIONINFO));
|
||||
os_ver.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
|
||||
if (GetVersionEx (&os_ver))
|
||||
is_9x = (os_ver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);
|
||||
}
|
||||
if (is_9x)
|
||||
{
|
||||
ret = LoadLibrary ("Unicows.dll");
|
||||
if (!ret)
|
||||
{
|
||||
int button;
|
||||
|
||||
button = MessageBox (NULL,
|
||||
"Emacs cannot load the UNICOWS.DLL library.\n"
|
||||
"This library is essential for using Emacs\n"
|
||||
"on this system. You need to install it.\n\n"
|
||||
"However, you can still use Emacs by invoking\n"
|
||||
"it with the '-nw' command-line option.\n\n"
|
||||
"Emacs will exit when you click OK.",
|
||||
"Emacs cannot load UNICOWS.DLL",
|
||||
MB_ICONERROR | MB_TASKMODAL
|
||||
| MB_SETFOREGROUND | MB_OK);
|
||||
switch (button)
|
||||
{
|
||||
case IDOK:
|
||||
default:
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
ret = LoadLibrary ("Gdi32.dll");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* The following 3 functions call the problematic "wide" APIs via
|
||||
function pointers, to avoid linking against the non-standard
|
||||
libunicows on W9X. */
|
||||
static UINT WINAPI
|
||||
get_outline_metrics_w(HDC hdc, UINT cbData, LPOUTLINETEXTMETRICW lpotmw)
|
||||
{
|
||||
static GetOutlineTextMetricsW_Proc s_pfn_Get_Outline_Text_MetricsW = NULL;
|
||||
HMODULE hm_unicows = NULL;
|
||||
if (g_b_init_get_outline_metrics_w == 0)
|
||||
{
|
||||
g_b_init_get_outline_metrics_w = 1;
|
||||
hm_unicows = w32_load_unicows_or_gdi32 ();
|
||||
if (hm_unicows)
|
||||
s_pfn_Get_Outline_Text_MetricsW = (GetOutlineTextMetricsW_Proc)
|
||||
GetProcAddress (hm_unicows, "GetOutlineTextMetricsW");
|
||||
}
|
||||
if (s_pfn_Get_Outline_Text_MetricsW == NULL)
|
||||
abort (); /* cannot happen */
|
||||
return s_pfn_Get_Outline_Text_MetricsW (hdc, cbData, lpotmw);
|
||||
}
|
||||
|
||||
static BOOL WINAPI
|
||||
get_text_metrics_w(HDC hdc, LPTEXTMETRICW lptmw)
|
||||
{
|
||||
static GetTextMetricsW_Proc s_pfn_Get_Text_MetricsW = NULL;
|
||||
HMODULE hm_unicows = NULL;
|
||||
if (g_b_init_get_text_metrics_w == 0)
|
||||
{
|
||||
g_b_init_get_text_metrics_w = 1;
|
||||
hm_unicows = w32_load_unicows_or_gdi32 ();
|
||||
if (hm_unicows)
|
||||
s_pfn_Get_Text_MetricsW = (GetTextMetricsW_Proc)
|
||||
GetProcAddress (hm_unicows, "GetTextMetricsW");
|
||||
}
|
||||
if (s_pfn_Get_Text_MetricsW == NULL)
|
||||
abort (); /* cannot happen */
|
||||
return s_pfn_Get_Text_MetricsW (hdc, lptmw);
|
||||
}
|
||||
|
||||
static DWORD WINAPI
|
||||
get_glyph_outline_w (HDC hdc, UINT uChar, UINT uFormat, LPGLYPHMETRICS lpgm,
|
||||
DWORD cbBuffer, LPVOID lpvBuffer, const MAT2 *lpmat2)
|
||||
{
|
||||
static GetGlyphOutlineW_Proc s_pfn_Get_Glyph_OutlineW = NULL;
|
||||
HMODULE hm_unicows = NULL;
|
||||
if (g_b_init_get_glyph_outline_w == 0)
|
||||
{
|
||||
g_b_init_get_glyph_outline_w = 1;
|
||||
hm_unicows = w32_load_unicows_or_gdi32 ();
|
||||
if (hm_unicows)
|
||||
s_pfn_Get_Glyph_OutlineW = (GetGlyphOutlineW_Proc)
|
||||
GetProcAddress (hm_unicows, "GetGlyphOutlineW");
|
||||
}
|
||||
if (s_pfn_Get_Glyph_OutlineW == NULL)
|
||||
abort (); /* cannot happen */
|
||||
return s_pfn_Get_Glyph_OutlineW (hdc, uChar, uFormat, lpgm, cbBuffer,
|
||||
lpvBuffer, lpmat2);
|
||||
}
|
||||
|
||||
static int
|
||||
memq_no_quit (Lisp_Object elt, Lisp_Object list)
|
||||
|
|
@ -816,11 +948,11 @@ w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity,
|
|||
old_font = SelectObject (dc, hfont);
|
||||
|
||||
/* Try getting the outline metrics (only works for truetype fonts). */
|
||||
len = GetOutlineTextMetricsW (dc, 0, NULL);
|
||||
len = get_outline_metrics_w (dc, 0, NULL);
|
||||
if (len)
|
||||
{
|
||||
metrics = (OUTLINETEXTMETRICW *) alloca (len);
|
||||
if (GetOutlineTextMetricsW (dc, len, metrics))
|
||||
if (get_outline_metrics_w (dc, len, metrics))
|
||||
memcpy (&w32_font->metrics, &metrics->otmTextMetrics,
|
||||
sizeof (TEXTMETRICW));
|
||||
else
|
||||
|
|
@ -828,7 +960,7 @@ w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity,
|
|||
}
|
||||
|
||||
if (!metrics)
|
||||
GetTextMetricsW (dc, &w32_font->metrics);
|
||||
get_text_metrics_w (dc, &w32_font->metrics);
|
||||
|
||||
w32_font->cached_metrics = NULL;
|
||||
w32_font->n_cache_blocks = 0;
|
||||
|
|
@ -2306,7 +2438,7 @@ compute_metrics (HDC dc, struct w32font_info *w32_font, unsigned int code,
|
|||
transform.eM11.value = 1;
|
||||
transform.eM22.value = 1;
|
||||
|
||||
if (GetGlyphOutlineW (dc, code, options, &gm, 0, NULL, &transform)
|
||||
if (get_glyph_outline_w (dc, code, options, &gm, 0, NULL, &transform)
|
||||
!= GDI_ERROR)
|
||||
{
|
||||
metrics->lbearing = gm.gmptGlyphOrigin.x;
|
||||
|
|
@ -2581,3 +2713,12 @@ versions of Windows) characters. */);
|
|||
w32font_driver.type = Qgdi;
|
||||
register_font_driver (&w32font_driver, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
globals_of_w32font (void)
|
||||
{
|
||||
g_b_init_is_w9x = 0;
|
||||
g_b_init_get_outline_metrics_w = 0;
|
||||
g_b_init_get_text_metrics_w = 0;
|
||||
g_b_init_get_glyph_outline_w = 0;
|
||||
}
|
||||
|
|
|
|||
41
src/window.c
41
src/window.c
|
|
@ -177,10 +177,10 @@ WINDOW can be any window and defaults to the selected one. */)
|
|||
}
|
||||
|
||||
DEFUN ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0,
|
||||
doc: /* Return the root window of FRAME_OR_WINDOW.
|
||||
If omitted, FRAME_OR_WINDOW defaults to the currently selected frame.
|
||||
Else if FRAME_OR_WINDOW denotes any window, return the root window of
|
||||
that window's frame. If FRAME_OR_WINDOW denotes a live frame, return
|
||||
doc: /* Return the root window of FRAME-OR-WINDOW.
|
||||
If omitted, FRAME-OR-WINDOW defaults to the currently selected frame.
|
||||
Else if FRAME-OR-WINDOW denotes any window, return the root window of
|
||||
that window's frame. If FRAME-OR-WINDOW denotes a live frame, return
|
||||
the root window of that frame. */)
|
||||
(Lisp_Object frame_or_window)
|
||||
{
|
||||
|
|
@ -222,10 +222,10 @@ WINDOW can be any window and defaults to the selected one. */)
|
|||
|
||||
/* Don't move this to window.el - this must be a safe routine. */
|
||||
DEFUN ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0,
|
||||
doc: /* Return the topmost, leftmost live window on FRAME_OR_WINDOW.
|
||||
If omitted, FRAME_OR_WINDOW defaults to the currently selected frame.
|
||||
Else if FRAME_OR_WINDOW denotes any window, return the first window of
|
||||
that window's frame. If FRAME_OR_WINDOW denotes a live frame, return
|
||||
doc: /* Return the topmost, leftmost live window on FRAME-OR-WINDOW.
|
||||
If omitted, FRAME-OR-WINDOW defaults to the currently selected frame.
|
||||
Else if FRAME-OR-WINDOW denotes any window, return the first window of
|
||||
that window's frame. If FRAME-OR-WINDOW denotes a live frame, return
|
||||
the first window of that frame. */)
|
||||
(Lisp_Object frame_or_window)
|
||||
{
|
||||
|
|
@ -256,10 +256,10 @@ the first window of that frame. */)
|
|||
|
||||
DEFUN ("frame-selected-window", Fframe_selected_window,
|
||||
Sframe_selected_window, 0, 1, 0,
|
||||
doc: /* Return the selected window of FRAME_OR_WINDOW.
|
||||
If omitted, FRAME_OR_WINDOW defaults to the currently selected frame.
|
||||
Else if FRAME_OR_WINDOW denotes any window, return the selected window
|
||||
of that window's frame. If FRAME_OR_WINDOW denotes a live frame, return
|
||||
doc: /* Return the selected window of FRAME-OR-WINDOW.
|
||||
If omitted, FRAME-OR-WINDOW defaults to the currently selected frame.
|
||||
Else if FRAME-OR-WINDOW denotes any window, return the selected window
|
||||
of that window's frame. If FRAME-OR-WINDOW denotes a live frame, return
|
||||
the selected window of that frame. */)
|
||||
(Lisp_Object frame_or_window)
|
||||
{
|
||||
|
|
@ -1299,7 +1299,7 @@ WINDOW must be a live window and defaults to the selected one.
|
|||
This is updated by redisplay, when it runs to completion.
|
||||
Simply changing the buffer text or setting `window-start'
|
||||
does not update this value.
|
||||
Return nil if there is no recorded value. \(This can happen if the
|
||||
Return nil if there is no recorded value. (This can happen if the
|
||||
last redisplay of WINDOW was preempted, and did not finish.)
|
||||
If UPDATE is non-nil, compute the up-to-date position
|
||||
if it isn't already recorded. */)
|
||||
|
|
@ -1690,7 +1690,7 @@ DEFUN ("window-parameters", Fwindow_parameters, Swindow_parameters,
|
|||
0, 1, 0,
|
||||
doc: /* Return the parameters of WINDOW and their values.
|
||||
WINDOW defaults to the selected window. The return value is a list of
|
||||
elements of the form (PARAMETER . VALUE). */)
|
||||
elements of the form (PARAMETER . VALUE). */)
|
||||
(Lisp_Object window)
|
||||
{
|
||||
return Fcopy_alist (decode_any_window (window)->window_parameters);
|
||||
|
|
@ -2195,7 +2195,7 @@ next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames, in
|
|||
|
||||
DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0,
|
||||
doc: /* Return window following WINDOW in cyclic ordering of windows.
|
||||
WINDOW must be a live window and defaults to the selected one. The
|
||||
WINDOW must be a live window and defaults to the selected one. The
|
||||
optional arguments MINIBUF and ALL-FRAMES specify the set of windows to
|
||||
consider.
|
||||
|
||||
|
|
@ -3226,7 +3226,7 @@ temp_output_buffer_show (register Lisp_Object buf)
|
|||
DEFUN ("internal-temp-output-buffer-show",
|
||||
Ftemp_output_buffer_show, Stemp_output_buffer_show,
|
||||
1, 1, 0,
|
||||
doc: /* Internal function for `with-output-to-temp-buffer''. */)
|
||||
doc: /* Internal function for `with-output-to-temp-buffer'. */)
|
||||
(Lisp_Object buf)
|
||||
{
|
||||
temp_output_buffer_show (buf);
|
||||
|
|
@ -3322,6 +3322,7 @@ make_window (void)
|
|||
memset (&w->phys_cursor, 0, sizeof (w->phys_cursor));
|
||||
w->phys_cursor_type = -1;
|
||||
w->phys_cursor_width = -1;
|
||||
w->phys_cursor_on_p = 0;
|
||||
w->last_cursor_off_p = w->cursor_off_p = 0;
|
||||
w->must_be_updated_p = 0;
|
||||
w->pseudo_window_p = 0;
|
||||
|
|
@ -3847,8 +3848,8 @@ set correctly. See the code of `split-window' for how this is done. */)
|
|||
|
||||
DEFUN ("delete-window-internal", Fdelete_window_internal, Sdelete_window_internal, 1, 1, 0,
|
||||
doc: /* Remove WINDOW from its frame.
|
||||
WINDOW defaults to the selected window. Return nil. Signal an error
|
||||
when WINDOW is the only window on its frame. */)
|
||||
WINDOW defaults to the selected window. Return nil.
|
||||
Signal an error when WINDOW is the only window on its frame. */)
|
||||
(register Lisp_Object window)
|
||||
{
|
||||
register Lisp_Object parent, sibling, frame, root;
|
||||
|
|
@ -5230,8 +5231,8 @@ any partial-height lines in the text display area. */)
|
|||
DEFUN ("move-to-window-line", Fmove_to_window_line, Smove_to_window_line,
|
||||
1, 1, "P",
|
||||
doc: /* Position point relative to window.
|
||||
With no argument, position point at center of window.
|
||||
An argument specifies vertical position within the window;
|
||||
ARG nil means position point at center of window.
|
||||
Else, ARG specifies vertical position within the window;
|
||||
zero means top of window, negative means relative to bottom of window. */)
|
||||
(Lisp_Object arg)
|
||||
{
|
||||
|
|
|
|||
13
src/xdisp.c
13
src/xdisp.c
|
|
@ -27039,7 +27039,7 @@ void
|
|||
note_mouse_highlight (struct frame *f, int x, int y)
|
||||
{
|
||||
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
|
||||
enum window_part part;
|
||||
enum window_part part = ON_NOTHING;
|
||||
Lisp_Object window;
|
||||
struct window *w;
|
||||
Cursor cursor = No_Cursor;
|
||||
|
|
@ -27073,11 +27073,14 @@ note_mouse_highlight (struct frame *f, int x, int y)
|
|||
/* Which window is that in? */
|
||||
window = window_from_coordinates (f, x, y, &part, 1);
|
||||
|
||||
/* If we were displaying active text in another window, clear that.
|
||||
Also clear if we move out of text area in same window. */
|
||||
/* If displaying active text in another window, clear that. */
|
||||
if (! EQ (window, hlinfo->mouse_face_window)
|
||||
|| (part != ON_TEXT && part != ON_MODE_LINE && part != ON_HEADER_LINE
|
||||
&& !NILP (hlinfo->mouse_face_window)))
|
||||
/* Also clear if we move out of text area in same window. */
|
||||
|| (!NILP (hlinfo->mouse_face_window)
|
||||
&& !NILP (window)
|
||||
&& part != ON_TEXT
|
||||
&& part != ON_MODE_LINE
|
||||
&& part != ON_HEADER_LINE))
|
||||
clear_mouse_face (hlinfo);
|
||||
|
||||
/* Not on a window -> return. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue