summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2006-12-16 01:29:26 +0000
committerMiles Bader <miles@gnu.org>2006-12-16 01:29:26 +0000
commit4bc5d7668ef47295810f28a14d67b4a9e12a341f (patch)
tree2e22bd79984f0772c43e294babc07c1508ce95ce /src
parentb44bfd5e9bf3a0e853bc0d4788e4c89a01a70d6a (diff)
parentc3342e8eb3eaf4560210fd030383a940640648f2 (diff)
downloademacs-4bc5d7668ef47295810f28a14d67b4a9e12a341f.tar.gz
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 545-562) - Update from CVS - Update from erc--emacs--22 - Merge from gnus--rel--5.10 - erc-iswitchb: Temporarily enable iswitchb mode * gnus--rel--5.10 (patch 172-176) - Merge from emacs--devo--0 - Update from CVS - Update from CVS: lisp/legacy-gnus-agent.el: Add Copyright notice. Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-156
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog141
-rw-r--r--src/abbrev.c2
-rw-r--r--src/buffer.c14
-rw-r--r--src/category.c3
-rw-r--r--src/category.h3
-rw-r--r--src/ccl.c3
-rw-r--r--src/ccl.h3
-rw-r--r--src/charset.c3
-rw-r--r--src/charset.h3
-rw-r--r--src/coding.c3
-rw-r--r--src/coding.h3
-rw-r--r--src/composite.c2
-rw-r--r--src/composite.h2
-rw-r--r--src/emacs.c27
-rw-r--r--src/fontset.c3
-rw-r--r--src/fontset.h3
-rw-r--r--src/frame.h2
-rw-r--r--src/keyboard.c180
-rw-r--r--src/keyboard.h1
-rw-r--r--src/keymap.c29
-rw-r--r--src/lread.c6
-rw-r--r--src/m/amdx86-64.h7
-rw-r--r--src/mac.c25
-rw-r--r--src/macfns.c27
-rw-r--r--src/macselect.c3
-rw-r--r--src/macterm.c226
-rw-r--r--src/macterm.h1
-rw-r--r--src/marker.c2
-rw-r--r--src/minibuf.c8
-rw-r--r--src/msdos.c2
-rw-r--r--src/msdos.h2
-rw-r--r--src/process.c8
-rw-r--r--src/syntax.c4
-rw-r--r--src/systime.h8
-rw-r--r--src/w32fns.c10
-rw-r--r--src/w32term.c8
-rw-r--r--src/xdisp.c15
-rw-r--r--src/xterm.c48
38 files changed, 637 insertions, 203 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index de7417da7ab..27411da33cb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,144 @@
+2006-12-15 Eli Zaretskii <eliz@gnu.org>
+
+ * emacs.c (USAGE3): Clarify documentation of --color.
+
+2006-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * mac.c (wakeup_from_rne_enabled_p) [TARGET_API_MAC_CARBON]: New
+ variable.
+ (ENABLE_WAKEUP_FROM_RNE, DISABLE_WAKEUP_FROM_RNE): New macros.
+ [!MAC_OSX] (select): Use them.
+ [MAC_OSX] (select_and_poll_event, sys_select): Likewise.
+ (mac_wakeup_from_rne) [TARGET_API_MAC_CARBON]: New function.
+
+ * macfns.c (mac_atsu_font_face_attributes) [USE_ATSUI]: Add extern.
+ (Fmac_atsu_font_face_attributes) [USE_ATSUI]: New function.
+ (syms_of_macfns) [USE_ATSUI]: Defsubr it.
+
+ * macselect.c [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Use
+ mac_wakeup_from_rne instead of mac_post_mouse_moved_event.
+
+ * macterm.c (mac_query_char_extents) [USE_ATSUI]: Don't call
+ ATSUGetGlyphBounds if not necessary.
+ (Vmac_atsu_font_table) [USE_ATSUI]: Remove Variable.
+ (syms_of_macterm) [USE_ATSUI]: Don't defvar it.
+ (fm_get_style_from_font, atsu_find_font_from_family_name)
+ (atsu_find_font_family_name, mac_atsu_font_face_attributes)
+ [USE_ATSUI]: New functions.
+ (init_font_name_table) [USE_ATSUI]: Use atsu_find_font_family_name.
+ (mac_load_query_font) [USE_ATSUI]: Use atsu_find_font_from_family_name.
+ Don't get metrics for Latin-1 right half characters.
+ (mac_load_query_font): Don't load font if space width is not positive.
+ [TARGET_API_MAC_CARBON] (mac_store_event_ref_as_apple_event): Use
+ mac_wakeup_from_rne instead of mac_post_mouse_moved_event.
+ (XTread_socket): Call SelectWindow when unfocused frame is clicked.
+
+ * macterm.h (mac_wakeup_from_rne) [TARGET_API_MAC_CARBON]: Add extern.
+
+2006-12-15 Kim F. Storm <storm@cua.dk>
+
+ * keyboard.c (ignore_mouse_drag_p): New global var.
+ (some_mouse_moved): Return 0 if it is non-zero.
+ (make_lispy_event): Generate click event on mouse up if
+ ignore_mouse_drag_p is non-zero, even if mouse moved.
+ Clear ignore_mouse_drag_p on mouse down/up.
+
+ * xdisp.c (redisplay_window): Set ignore_mouse_drag_p if tool-bar
+ is resized to avoid generating a mouse drag event.
+
+2006-12-14 Juanma Barranquero <lekktu@gmail.com>
+
+ * w32fns.c (w32_wnd_proc): Force non-tooltip frames to respect the
+ minimum tracking size. Remove non-working old hack to do the same.
+
+2006-12-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * emacs.c (handle_user_signal): Move function to keyboard.c.
+ (main): Use add_user_signal for SIGUSR1 and SIGUSR2.
+
+ * keyboard.c (make_lispy_event): Use find_user_signal_name.
+ (read_avail_input): Store pending user signal events.
+ (struct user_signal_info): New struct.
+ (user_signals): New variable.
+ (add_user_signal, store_user_signal_events)
+ (find_user_signal_name): New functions.
+ (handle_user_signal): Move function from emacs.c. Don't store
+ USER_SIGNAL_EVENT here, but increment number of pending signals.
+
+ * keyboard.h (add_user_signals): Add extern.
+
+2006-12-11 Juanma Barranquero <lekktu@gmail.com>
+
+ * buffer.c (syms_of_buffer) <cursor-in-non-selected-windows>:
+ <default-scroll-up-aggressively, default-scroll-down-aggressively>:
+ <line-spacing, left-margin>: Doc fixes.
+
+ * xdisp.c (syms_of_xdisp) <mode-line-inverse-video>: Doc fix.
+
+2006-12-10 Kim F. Storm <storm@cua.dk>
+
+ * xdisp.c (show_mouse_face): Never use text cursor in tool-bar.
+
+2006-12-10 Juanma Barranquero <lekktu@gmail.com>
+
+ * abbrev.c (syms_of_abbrev) <last-abbrev-text>:
+ * buffer.c (syms_of_buffer) <default-major-mode>:
+ * keymap.c (Flookup_key):
+ * lread.c (Feval_buffer, Feval_region):
+ * macterm.c (syms_of_macterm) <x-use-underline-position-properties>:
+ <x-underline-at-descent-line, mac-emulate-three-button-mouse>:
+ * marker.c (Fmarker_insertion_type):
+ * minibuf.c (syms_of_minibuf) <minibuffer-completion-table>:
+ * msdos.c (syms_of_msdos) <delete-exited-processes>:
+ * w32term.c (syms_of_w32term) <x-use-underline-position-properties>:
+ <x-underline-at-descent-line>:
+ * xdisp.c (format-mode-line):
+ * xterm.c (syms_of_xterm) <x-use-underline-position-properties>:
+ <x-underline-at-descent-line>: Doc fixes.
+
+2006-12-10 Andreas Schwab <schwab@suse.de>
+
+ * systime.h (EMACS_GET_TIME): Remove check for
+ HAVE_STRUCT_TIMEZONE which is never defined.
+
+2006-12-10 Alan Mackenzie <acm@muc.de>
+
+ * syntax.c (Fpartial_parse_sexp): Correct Docco: Elt 8 of the
+ result is now neither the last elt nor optional for OLDSTATE.
+
+2006-12-09 Eli Zaretskii <eliz@gnu.org>
+
+ * process.c (Fsignal_process): Doc fix. Use XFLOAT_DATA to
+ extract the process ID from a Lisp float.
+
+2006-12-09 Chong Yidong <cyd@stupidchicken.com>
+
+ * xterm.c (XTframe_raise_lower): Comment out _NET_ACTIVE_WINDOW code.
+
+2006-12-08 Eli Zaretskii <eliz@gnu.org>
+
+ * frame.h (PIX_TYPE): Redefine as `unsigned long', for 64-bit
+ platforms where long is 64-bit.
+
+ * msdos.h (PIX_TYPE): Redefine as `unsigned long'.
+
+2006-12-08 NAKAJI Hiroyuki <nakaji@jp.freebsd.org> (tiny change)
+
+ * m/amdx86-64.h: Add support for Solaris 10 on x86-64.
+
+2006-12-08 Kenichi Handa <handa@m17n.org>
+
+ * xterm.c (x_query_font): Use xstricmp instead off strcasecmp.
+
+2006-12-08 Juanma Barranquero <lekktu@gmail.com>
+
+ * emacs.c (syms_of_emacs) <system-type>: Doc fix.
+
+2006-12-07 Kim F. Storm <storm@cua.dk>
+
+ * process.c (parse_signal): Use xstricmp instead of strcasecmp.
+ (Fsignal_process): Don't use strncasecmp.
+
2006-12-05 Glenn Morris <rgm@gnu.org>
* abbrev.c (Qforce): New Lisp_Object.
diff --git a/src/abbrev.c b/src/abbrev.c
index 5e8c8c98862..2d95b881bc5 100644
--- a/src/abbrev.c
+++ b/src/abbrev.c
@@ -685,7 +685,7 @@ for any particular abbrev defined in both. */);
DEFVAR_LISP ("last-abbrev-text", &Vlast_abbrev_text,
doc: /* The exact text of the last abbrev expanded.
-nil if the abbrev has already been unexpanded. */);
+A value of nil means the abbrev has already been unexpanded. */);
DEFVAR_INT ("last-abbrev-location", &last_abbrev_point,
doc: /* The location of the start of the last abbrev expanded. */);
diff --git a/src/buffer.c b/src/buffer.c
index 95f900aaf46..e9c3c47a959 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5447,13 +5447,13 @@ This is the same as (default-value 'fringe-cursor-alist'). */);
&buffer_defaults.scroll_up_aggressively,
doc: /* Default value of `scroll-up-aggressively'.
This value applies in buffers that don't have their own local values.
-This variable is an alias for (default-value 'scroll-up-aggressively). */);
+This is the same as (default-value 'scroll-up-aggressively). */);
DEFVAR_LISP_NOPRO ("default-scroll-down-aggressively",
&buffer_defaults.scroll_down_aggressively,
doc: /* Default value of `scroll-down-aggressively'.
This value applies in buffers that don't have their own local values.
-This variable is an alias for (default-value 'scroll-down-aggressively). */);
+This is the same as (default-value 'scroll-down-aggressively). */);
DEFVAR_PER_BUFFER ("header-line-format",
&current_buffer->header_line_format,
@@ -5516,8 +5516,8 @@ Decimal digits after the % specify field width to which to pad. */);
DEFVAR_LISP_NOPRO ("default-major-mode", &buffer_defaults.major_mode,
doc: /* *Major mode for new buffers. Defaults to `fundamental-mode'.
-nil here means use current buffer's major mode, provided it is not
-marked as "special".
+A value of nil means use current buffer's major mode,
+provided it is not marked as "special".
When a mode is used by default, `find-file' switches to it
before it reads the contents into the buffer and before
@@ -5547,7 +5547,7 @@ Interactively, you can set the buffer local value using \\[set-fill-column]. */
DEFVAR_PER_BUFFER ("left-margin", &current_buffer->left_margin,
make_number (Lisp_Int),
- doc: /* *Column for the default indent-line-function to indent to.
+ doc: /* *Column for the default `indent-line-function' to indent to.
Linefeed indents to this column in Fundamental mode. */);
DEFVAR_PER_BUFFER ("tab-width", &current_buffer->tab_width,
@@ -6052,12 +6052,12 @@ this variable has no effect; the cursor appears as a hollow box. */);
doc: /* Additional space to put between lines when displaying a buffer.
The space is measured in pixels, and put below lines on window systems.
If value is a floating point number, it specifies the spacing relative
-to the default frame line height. nil means add no extra space. */);
+to the default frame line height. A value of nil means add no extra space. */);
DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows",
&current_buffer->cursor_in_non_selected_windows, Qnil,
doc: /* *Cursor type to display in non-selected windows.
-t means to use hollow box cursor. See `cursor-type' for other values. */);
+The value t means to use hollow box cursor. See `cursor-type' for other values. */);
DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions,
doc: /* List of functions called with no args to query before killing a buffer. */);
diff --git a/src/category.c b/src/category.c
index cb6385fdb25..4d19d4a6ccd 100644
--- a/src/category.c
+++ b/src/category.c
@@ -1,6 +1,7 @@
/* GNU Emacs routines to deal with category tables.
Copyright (C) 1998, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
- Copyright (C) 1995, 1997, 1998, 1999
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003
diff --git a/src/category.h b/src/category.h
index 4799b7a5e3d..86257635226 100644
--- a/src/category.h
+++ b/src/category.h
@@ -1,5 +1,6 @@
/* Declarations having to do with Emacs category tables.
- Copyright (C) 1995, 1998, 1999
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003
diff --git a/src/ccl.c b/src/ccl.c
index 1ff97229466..017c9ab4feb 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -1,7 +1,8 @@
/* CCL (Code Conversion Language) interpreter.
Copyright (C) 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
- Copyright (C) 1995, 1997, 1998, 2003, 2004, 2005
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003
diff --git a/src/ccl.h b/src/ccl.h
index 96417e79fa5..01d92b621eb 100644
--- a/src/ccl.h
+++ b/src/ccl.h
@@ -1,5 +1,6 @@
/* Header for CCL (Code Conversion Language) interpreter.
- Copyright (C) 1995, 1998, 2000
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003
diff --git a/src/charset.c b/src/charset.c
index 2228a24f698..9fb7f641705 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1,7 +1,8 @@
/* Basic character set support.
Copyright (C) 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
- Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003, 2004
diff --git a/src/charset.h b/src/charset.h
index 25ccaf9d324..e7aaf9d6194 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -1,7 +1,8 @@
/* Header for charset handler.
Copyright (C) 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
- Copyright (C) 1995, 1997, 1998, 2003
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003
diff --git a/src/coding.c b/src/coding.c
index 28ab86c43fc..50c63b4beb8 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1,7 +1,8 @@
/* Coding system handler (conversion, detection, etc).
Copyright (C) 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
- Copyright (C) 1995, 1997, 1998, 2002, 2003, 2004, 2005
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003
diff --git a/src/coding.h b/src/coding.h
index 93375d2c2eb..0f8d2b0ed7b 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -1,7 +1,8 @@
/* Header for coding system handler.
Copyright (C) 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
- Copyright (C) 1995, 1997, 1998, 2000
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003
diff --git a/src/composite.c b/src/composite.c
index ea6b3708f12..1ccd3af2515 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1,7 +1,7 @@
/* Composite sequence support.
Copyright (C) 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
- Copyright (C) 1999
+ Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003, 2006
diff --git a/src/composite.h b/src/composite.h
index 08463afd899..6e600e7a29b 100644
--- a/src/composite.h
+++ b/src/composite.h
@@ -1,7 +1,7 @@
/* Header for composite sequence handler.
Copyright (C) 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
- Copyright (C) 1997
+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003, 2006
diff --git a/src/emacs.c b/src/emacs.c
index 935a12463dc..6601336edd5 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -303,7 +303,7 @@ Display options:\n\
used for debugging Emacs\n\
--border-color, -bd COLOR main border color\n\
--border-width, -bw WIDTH width of main border\n\
---color, --color=MODE color mode for character terminals;\n\
+--color, --color=MODE override color mode for character terminals;\n\
MODE defaults to `auto', and can also\n\
be `never', `auto', `always',\n\
or a mode name like `ansi8'\n\
@@ -361,24 +361,6 @@ pthread_t main_thread;
#endif
-#if defined (SIGUSR1) || defined (SIGUSR2)
-SIGTYPE
-handle_user_signal (sig)
- int sig;
-{
- struct input_event buf;
-
- SIGNAL_THREAD_CHECK (sig);
- bzero (&buf, sizeof buf);
- buf.kind = USER_SIGNAL_EVENT;
- buf.frame_or_window = selected_frame;
-
- kbd_buffer_store_event (&buf);
- buf.code = sig;
- kbd_buffer_store_event (&buf);
-}
-#endif
-
/* Handle bus errors, invalid instruction, etc. */
SIGTYPE
fatal_error_signal (sig)
@@ -1214,10 +1196,10 @@ main (argc, argv
signal (SIGILL, fatal_error_signal);
signal (SIGTRAP, fatal_error_signal);
#ifdef SIGUSR1
- signal (SIGUSR1, handle_user_signal);
+ add_user_signal (SIGUSR1, "usr1");
#endif
#ifdef SIGUSR2
- signal (SIGUSR2, handle_user_signal);
+ add_user_signal (SIGUSR2, "usr2");
#endif
#ifdef SIGABRT
signal (SIGABRT, fatal_error_signal);
@@ -2478,7 +2460,8 @@ Special values:
`ms-dos' compiled as an MS-DOS application.
`windows-nt' compiled as a native W32 application.
`cygwin' compiled using the Cygwin library.
- `vax-vms' or `axp-vms': compiled for a (Open)VMS system.
+ `vax-vms' or
+ `axp-vms' compiled for a (Open)VMS system.
Anything else indicates some sort of Unix system. */);
Vsystem_type = intern (SYSTEM_TYPE);
diff --git a/src/fontset.c b/src/fontset.c
index a52082e2ff4..5a50012fef4 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -1,6 +1,7 @@
/* Fontset handler.
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
- Copyright (C) 1995, 1997, 1998, 2000, 2003, 2004, 2005
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003, 2006
diff --git a/src/fontset.h b/src/fontset.h
index cf09dde73f2..b86c26784c7 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -1,7 +1,8 @@
/* Header for fontset handler.
Copyright (C) 1998, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
- Copyright (C) 1995, 1997, 2000
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003, 2006
diff --git a/src/frame.h b/src/frame.h
index 75770eb4c36..3148e583e89 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -72,7 +72,7 @@ enum text_cursor_kinds
#if !defined(HAVE_X_WINDOWS)
-#define PIX_TYPE int
+#define PIX_TYPE unsigned long
/* A (mostly empty) x_output structure definition for building Emacs
on Unix and GNU/Linux without X support. */
diff --git a/src/keyboard.c b/src/keyboard.c
index 3a9f6f415db..ef8107b2ce3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -699,6 +699,9 @@ static SIGTYPE interrupt_signal P_ ((int signalnum));
static void timer_start_idle P_ ((void));
static void timer_stop_idle P_ ((void));
static void timer_resume_idle P_ ((void));
+static SIGTYPE handle_user_signal P_ ((int));
+static char *find_user_signal_name P_ ((int));
+static int store_user_signal_events P_ ((void));
/* Nonzero means don't try to suspend even if the operating system seems
to support it. */
@@ -1435,13 +1438,25 @@ usage: (track-mouse BODY ...) */)
}
/* If mouse has moved on some frame, return one of those frames.
- Return 0 otherwise. */
+
+ Return 0 otherwise.
+
+ If ignore_mouse_drag_p is non-zero, ignore (implicit) mouse movement
+ after resizing the tool-bar window. */
+
+int ignore_mouse_drag_p;
static FRAME_PTR
some_mouse_moved ()
{
Lisp_Object tail, frame;
+ if (ignore_mouse_drag_p)
+ {
+ //ignore_mouse_drag_p = 0;
+ return 0;
+ }
+
FOR_EACH_FRAME (tail, frame)
{
if (XFRAME (frame)->mouse_moved)
@@ -5589,6 +5604,7 @@ make_lispy_event (event)
double_click_count = 1;
button_down_time = event->timestamp;
*start_pos_ptr = Fcopy_alist (position);
+ ignore_mouse_drag_p = 0;
}
/* Now we're releasing a button - check the co-ordinates to
@@ -5624,8 +5640,13 @@ make_lispy_event (event)
ydiff = XINT (event->y) - XINT (XCDR (down));
}
- if (xdiff < double_click_fuzz && xdiff > - double_click_fuzz
- && ydiff < double_click_fuzz && ydiff > - double_click_fuzz
+ if (ignore_mouse_drag_p)
+ {
+ event->modifiers |= click_modifier;
+ ignore_mouse_drag_p = 0;
+ }
+ else if (xdiff < double_click_fuzz && xdiff > - double_click_fuzz
+ && ydiff < double_click_fuzz && ydiff > - double_click_fuzz
/* Maybe the mouse has moved a lot, caused scrolling, and
eventually ended up at the same screen position (but
not buffer position) in which case it is a drag, not
@@ -5948,20 +5969,16 @@ make_lispy_event (event)
case USER_SIGNAL_EVENT:
/* A user signal. */
- switch (event->code)
+ if (event->code == 0)
+ return Qsignal;
+ else
{
- case 0:
- return Qsignal;
-#ifdef SIGUSR1
- case SIGUSR1:
- return intern ("usr1");
-#endif
-#ifdef SIGUSR2
- case SIGUSR2:
- return intern ("usr2");
-#endif
- default:
- return make_number (event->code);
+ char *name = find_user_signal_name (event->code);
+
+ if (name)
+ return intern (name);
+ else
+ return make_number (event->code);
}
case SAVE_SESSION_EVENT:
@@ -6799,6 +6816,10 @@ read_avail_input (expected)
register int i;
int nread = 0;
+ /* Store pending user signal events, if any. */
+ if (store_user_signal_events ())
+ expected = 0;
+
if (read_socket_hook)
{
int nr;
@@ -7022,6 +7043,133 @@ reinvoke_input_signal ()
+/* User signal events. */
+
+struct user_signal_info
+{
+ /* Signal number. */
+ int sig;
+
+ /* Name of the signal. */
+ char *name;
+
+ /* Number of pending signals. */
+ int npending;
+
+ struct user_signal_info *next;
+};
+
+/* List of user signals. */
+static struct user_signal_info *user_signals = NULL;
+
+void
+add_user_signal (sig, name)
+ int sig;
+ const char *name;
+{
+ struct user_signal_info *p;
+
+ for (p = user_signals; p; p = p->next)
+ if (p->sig == sig)
+ /* Already added. */
+ return;
+
+ p = xmalloc (sizeof (struct user_signal_info));
+ p->sig = sig;
+ p->name = xstrdup (name);
+ p->npending = 0;
+ p->next = user_signals;
+ user_signals = p;
+
+ signal (sig, handle_user_signal);
+}
+
+static SIGTYPE
+handle_user_signal (sig)
+ int sig;
+{
+ int old_errno = errno;
+ struct user_signal_info *p;
+
+#if defined (USG) && !defined (POSIX_SIGNALS)
+ /* USG systems forget handlers when they are used;
+ must reestablish each time */
+ signal (sig, handle_user_signal);
+#endif
+
+ SIGNAL_THREAD_CHECK (sig);
+
+ for (p = user_signals; p; p = p->next)
+ if (p->sig == sig)
+ {
+ p->npending++;
+#ifdef SIGIO
+ if (interrupt_input)
+ kill (getpid (), SIGIO);
+ else
+#endif
+ {
+ /* Tell wait_reading_process_output that it needs to wake
+ up and look around. */
+ if (input_available_clear_time)
+ EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0);
+ }
+ break;
+ }
+
+ errno = old_errno;
+}
+
+static char *
+find_user_signal_name (sig)
+ int sig;
+{
+ struct user_signal_info *p;
+
+ for (p = user_signals; p; p = p->next)
+ if (p->sig == sig)
+ return p->name;
+
+ return NULL;
+}
+
+static int
+store_user_signal_events ()
+{
+ struct user_signal_info *p;
+ struct input_event buf;
+ int nstored = 0;
+
+ for (p = user_signals; p; p = p->next)
+ if (p->npending > 0)
+ {
+ SIGMASKTYPE mask;
+
+ if (nstored == 0)
+ {
+ bzero (&buf, sizeof buf);
+ buf.kind = USER_SIGNAL_EVENT;
+ buf.frame_or_window = selected_frame;
+ }
+ nstored += p->npending;
+
+ mask = sigblock (sigmask (p->sig));
+ do
+ {
+ buf.code = 0;
+ kbd_buffer_store_event (&buf);
+ buf.code = p->sig;
+ kbd_buffer_store_event (&buf);
+ p->npending--;
+ }
+ while (p->npending > 0);
+ sigsetmask (mask);
+ }
+
+ return nstored;
+}
+
+
static void menu_bar_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, void*));
static Lisp_Object menu_bar_one_keymap_changed_items;
diff --git a/src/keyboard.h b/src/keyboard.h
index 96ac7d2e856..984ecccc0a4 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -344,6 +344,7 @@ extern void gen_help_event P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
extern void kbd_buffer_store_help_event P_ ((Lisp_Object, Lisp_Object));
extern Lisp_Object menu_item_eval_property P_ ((Lisp_Object));
extern int kbd_buffer_events_waiting P_ ((int));
+extern void add_user_signals P_ ((int, const char *));
/* arch-tag: 769cbade-1ba9-4950-b886-db265b061aa3
(do not change this comment) */
diff --git a/src/keymap.c b/src/keymap.c
index f67cc109e87..176b6760e36 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1280,7 +1280,8 @@ buffer position instead of point are used. */)
DEFUN ("lookup-key", Flookup_key, Slookup_key, 2, 3, 0,
doc: /* In keymap KEYMAP, look up key sequence KEY. Return the definition.
-nil means undefined. See doc of `define-key' for kinds of definitions.
+A value of nil means undefined. See doc of `define-key'
+for kinds of definitions.
A number as value means KEY is "too long";
that is, characters or symbols in it except for the last one
@@ -1655,13 +1656,13 @@ specified buffer position instead of point are used.
are read using the keymaps of the buffer clicked on, not
the current buffer. So we may have to switch the buffer
here. */
-
+
if (CONSP (position))
{
Lisp_Object window;
-
+
window = POSN_WINDOW (position);
-
+
if (WINDOWP (window)
&& BUFFERP (XWINDOW (window)->buffer)
&& XBUFFER (XWINDOW (window)->buffer) != current_buffer)
@@ -1673,13 +1674,13 @@ specified buffer position instead of point are used.
would not be a problem here, but it is easier to keep
things the same.
*/
-
+
record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
-
+
set_buffer_internal (XBUFFER (XWINDOW (window)->buffer));
}
}
-
+
if (! NILP (current_kboard->Voverriding_terminal_local_map))
{
value = Flookup_key (current_kboard->Voverriding_terminal_local_map,
@@ -1702,8 +1703,8 @@ specified buffer position instead of point are used.
: MARKERP (position) ? marker_position (position)
: PT;
- local_map = get_local_map (pt, current_buffer, Qlocal_map);
- keymap = get_local_map (pt, current_buffer, Qkeymap);
+ local_map = get_local_map (pt, current_buffer, Qlocal_map);
+ keymap = get_local_map (pt, current_buffer, Qkeymap);
if (CONSP (position))
{
@@ -1711,7 +1712,7 @@ specified buffer position instead of point are used.
/* For a mouse click, get the local text-property keymap
of the place clicked on, rather than point. */
-
+
if (POSN_INBUFFER_P (position))
{
Lisp_Object pos;
@@ -1722,7 +1723,7 @@ specified buffer position instead of point are used.
{
local_map = get_local_map (XINT (pos),
current_buffer, Qlocal_map);
-
+
keymap = get_local_map (XINT (pos),
current_buffer, Qkeymap);
}
@@ -1733,12 +1734,12 @@ specified buffer position instead of point are used.
string displayed via the `display' property,
consider `local-map' and `keymap' properties of
that string. */
-
+
if (string = POSN_STRING (position),
(CONSP (string) && STRINGP (XCAR (string))))
{
Lisp_Object pos, map;
-
+
pos = XCDR (string);
string = XCAR (string);
if (INTEGERP (pos)
@@ -1754,7 +1755,7 @@ specified buffer position instead of point are used.
keymap = map;
}
}
-
+
}
if (! NILP (keymap))
diff --git a/src/lread.c b/src/lread.c
index 79ccc8bd152..d6fab4ffc8c 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -656,7 +656,7 @@ read_filtered_event (no_switch_frame, ascii_required, error_nonascii,
{
EMACS_TIME wait_time;
int sec, usec;
- double duration = extract_float (seconds);
+ double duration = extract_float (seconds);
sec = (int) duration;
usec = (duration - sec) * 1000000;
@@ -1743,7 +1743,7 @@ DEFUN ("eval-buffer", Feval_buffer, Seval_buffer, 0, 5, "",
Programs can pass two arguments, BUFFER and PRINTFLAG.
BUFFER is the buffer to evaluate (nil means use current buffer).
PRINTFLAG controls printing of output:
-nil means discard it; anything else is stream for print.
+A value of nil means discard it; anything else is stream for print.
If the optional third argument FILENAME is non-nil,
it specifies the file name to use for `load-history'.
@@ -1792,7 +1792,7 @@ When called from programs, expects two arguments,
giving starting and ending indices in the current buffer
of the text to be executed.
Programs can pass third argument PRINTFLAG which controls output:
-nil means discard it; anything else is stream for printing it.
+A value of nil means discard it; anything else is stream for printing it.
Also the fourth argument READ-FUNCTION, if non-nil, is used
instead of `read' to read each expression. It gets one argument
which is the input stream for reading characters.
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h
index 940ff70dbda..670360336a8 100644
--- a/src/m/amdx86-64.h
+++ b/src/m/amdx86-64.h
@@ -125,7 +125,12 @@ Boston, MA 02110-1301, USA. */
#undef LIB_STANDARD
#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o
-#else /* !__OpenBSD__ && !__FreeBSD__ */
+#elif defined(sun)
+
+#undef START_FILES
+#undef LIB_STANDARD
+
+#else /* !__OpenBSD__ && !__FreeBSD__ && !sun */
#undef START_FILES
#ifdef HAVE_X86_64_LIB64_DIR
diff --git a/src/mac.c b/src/mac.c
index c4275caa741..e79bd775fda 100644
--- a/src/mac.c
+++ b/src/mac.c
@@ -79,6 +79,15 @@ static ComponentInstance as_scripting_component;
/* The single script context used for all script executions. */
static OSAID as_script_context;
+#if TARGET_API_MAC_CARBON
+static int wakeup_from_rne_enabled_p = 0;
+#define ENABLE_WAKEUP_FROM_RNE (wakeup_from_rne_enabled_p = 1)
+#define DISABLE_WAKEUP_FROM_RNE (wakeup_from_rne_enabled_p = 0)
+#else
+#define ENABLE_WAKEUP_FROM_RNE 0
+#define DISABLE_WAKEUP_FROM_RNE 0
+#endif
+
#ifndef MAC_OSX
static OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *));
static OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int));
@@ -2431,6 +2440,7 @@ select (nfds, rfds, wfds, efds, timeout)
BLOCK_INPUT block, in case that some input has already been read
asynchronously. */
BLOCK_INPUT;
+ ENABLE_WAKEUP_FROM_RNE;
if (!detect_input_pending ())
{
#if TARGET_API_MAC_CARBON
@@ -2461,6 +2471,7 @@ select (nfds, rfds, wfds, efds, timeout)
}
#endif /* not TARGET_API_MAC_CARBON */
}
+ DISABLE_WAKEUP_FROM_RNE;
UNBLOCK_INPUT;
if (err == noErr)
@@ -5023,6 +5034,7 @@ select_and_poll_event (nfds, rfds, wfds, efds, timeout)
BLOCK_INPUT block, in case that some input has already been read
asynchronously. */
BLOCK_INPUT;
+ ENABLE_WAKEUP_FROM_RNE;
if (!detect_input_pending ())
{
EMACS_TIME select_timeout;
@@ -5045,6 +5057,7 @@ select_and_poll_event (nfds, rfds, wfds, efds, timeout)
kEventLeaveInQueue, NULL);
}
}
+ DISABLE_WAKEUP_FROM_RNE;
UNBLOCK_INPUT;
if (r != 0)
@@ -5124,6 +5137,7 @@ sys_select (nfds, rfds, wfds, efds, timeout)
BLOCK_INPUT block, in case that some input has already been
read asynchronously. */
BLOCK_INPUT;
+ ENABLE_WAKEUP_FROM_RNE;
if (!detect_input_pending ())
{
int minfd, fd;
@@ -5184,6 +5198,7 @@ sys_select (nfds, rfds, wfds, efds, timeout)
CFRunLoopRemoveSource (runloop, source, kCFRunLoopDefaultMode);
}
}
+ DISABLE_WAKEUP_FROM_RNE;
UNBLOCK_INPUT;
if (err == noErr || err == eventLoopQuitErr)
@@ -5385,6 +5400,16 @@ init_mac_osx_environment ()
}
#endif /* MAC_OSX */
+#if TARGET_API_MAC_CARBON
+void
+mac_wakeup_from_rne ()
+{
+ if (wakeup_from_rne_enabled_p)
+ /* Post a harmless event so as to wake up from
+ ReceiveNextEvent. */
+ mac_post_mouse_moved_event ();
+}
+#endif
void
syms_of_mac ()
diff --git a/src/macfns.c b/src/macfns.c
index 2148ec3e1ad..a5de3edeec6 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -4597,6 +4597,30 @@ This is for internal use only. Use `mac-font-panel-mode' instead. */)
return Qnil;
}
#endif
+
+#if USE_ATSUI
+extern Lisp_Object mac_atsu_font_face_attributes P_ ((ATSUFontID));
+
+DEFUN ("mac-atsu-font-face-attributes", Fmac_atsu_font_face_attributes,
+ Smac_atsu_font_face_attributes, 1, 1, 0,
+ doc: /* Return plist of face attributes and values for ATSU font ID.
+ID is specified by either an integer or a float. */)
+ (id)
+ Lisp_Object id;
+{
+ ATSUFontID font_id;
+ Lisp_Object result;
+
+ check_mac ();
+ CHECK_NUMBER_OR_FLOAT(id);
+ font_id = NUMBERP (id) ? XINT (id) : (ATSUFontID) XFLOAT (id);
+ BLOCK_INPUT;
+ result = mac_atsu_font_face_attributes (font_id);
+ UNBLOCK_INPUT;
+ return result;
+}
+#endif
+
/***********************************************************************
Initialization
@@ -4829,6 +4853,9 @@ Chinese, Japanese, and Korean. */);
#if USE_MAC_FONT_PANEL
defsubr (&Smac_set_font_panel_visibility);
#endif
+#if USE_ATSUI
+ defsubr (&Smac_atsu_font_face_attributes);
+#endif
}
/* arch-tag: d7591289-f374-4377-b245-12f5dbbb8edc
diff --git a/src/macselect.c b/src/macselect.c
index 7a952f88367..8d15db24144 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -1567,8 +1567,7 @@ mac_do_receive_drag (window, refcon, drag)
{
mac_store_drag_event (window, mouse_pos, modifiers, &apple_event);
AEDisposeDesc (&apple_event);
- /* Post a harmless event so as to wake up from ReceiveNextEvent. */
- mac_post_mouse_moved_event ();
+ mac_wakeup_from_rne ();
return noErr;
}
else
diff --git a/src/macterm.c b/src/macterm.c
index ff36e9501c6..cb0e024b8eb 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -1156,7 +1156,8 @@ mac_query_char_extents (style, c,
UniChar ch = c;
err = atsu_get_text_layout_with_text_ptr (&ch, 1, style, &text_layout);
- if (err == noErr)
+ if (err == noErr
+ && (font_ascent_return || font_descent_return || overall_return))
{
ATSTrapezoid glyph_bounds;
@@ -7006,7 +7007,6 @@ static Lisp_Object fm_font_family_alist;
static Lisp_Object atsu_font_id_hash;
/* Alist linking Font Manager style to face attributes. */
static Lisp_Object fm_style_face_attributes_alist;
-static Lisp_Object Vmac_atsu_font_table;
extern Lisp_Object QCfamily, QCweight, QCslant, Qnormal, Qbold, Qitalic;
#endif
@@ -7243,6 +7243,73 @@ add_mac_font_name (name, size, style, charset)
}
#if USE_ATSUI
+static FMFontStyle
+fm_get_style_from_font (font)
+ FMFont font;
+{
+ OSStatus err;
+ FMFontStyle style = normal;
+ ByteCount len;
+ UInt16 mac_style;
+ FMFontFamily font_family;
+#define FONT_HEADER_MAC_STYLE_OFFSET (4*4 + 2*2 + 8*2 + 2*4)
+
+ /* FMGetFontFamilyInstanceFromFont returns `normal' as the style of
+ some font (e.g., Optima) even if it is `bold'. */
+ err = FMGetFontTable (font, 'head', FONT_HEADER_MAC_STYLE_OFFSET,
+ sizeof (mac_style), &mac_style, &len);
+ if (err == noErr
+ && len >= FONT_HEADER_MAC_STYLE_OFFSET + sizeof (mac_style))
+ style = EndianU16_BtoN (mac_style);
+ else
+ FMGetFontFamilyInstanceFromFont (font, &font_family, &style);
+
+ return style;
+}
+
+static ATSUFontID
+atsu_find_font_from_family_name (family)
+ const char *family;
+{
+ struct Lisp_Hash_Table *h = XHASH_TABLE (atsu_font_id_hash);
+ unsigned hash_code;
+ int i;
+ Lisp_Object rest, best;
+ FMFontStyle min_style, style;
+
+ i = hash_lookup (h, make_unibyte_string (family, strlen (family)),
+ &hash_code);
+ if (i < 0)
+ return kATSUInvalidFontID;
+
+ rest = HASH_VALUE (h, i);
+ if (INTEGERP (rest) || (CONSP (rest) && INTEGERP (XCDR (rest))))
+ return cons_to_long (rest);
+
+ rest = Fnreverse (rest);
+ best = XCAR (rest);
+ rest = XCDR (rest);
+ if (!NILP (rest)
+ && (min_style = fm_get_style_from_font (cons_to_long (best))) != normal)
+ do
+ {
+ style = fm_get_style_from_font (cons_to_long (XCAR (rest)));
+ if (style < min_style)
+ {
+ best = XCAR (rest);
+ if (style == normal)
+ break;
+ else
+ min_style = style;
+ }
+ rest = XCDR (rest);
+ }
+ while (!NILP (rest));
+
+ HASH_VALUE (h, i) = best;
+ return cons_to_long (best);
+}
+
static Lisp_Object
fm_style_to_face_attributes (fm_style)
FMFontStyle fm_style;
@@ -7263,6 +7330,44 @@ fm_style_to_face_attributes (fm_style)
return tem;
}
+
+static Lisp_Object
+atsu_find_font_family_name (font_id)
+ ATSUFontID font_id;
+{
+ OSStatus err;
+ ByteCount len;
+ Lisp_Object family = Qnil;
+
+ err = ATSUFindFontName (font_id, kFontFamilyName,
+ kFontMacintoshPlatform, kFontNoScript,
+ kFontNoLanguage, 0, NULL, &len, NULL);
+ if (err == noErr)
+ {
+ family = make_uninit_string (len);
+ err = ATSUFindFontName (font_id, kFontFamilyName,
+ kFontMacintoshPlatform, kFontNoScript,
+ kFontNoLanguage, len, SDATA (family),
+ NULL, NULL);
+ }
+ if (err == noErr)
+ decode_mac_font_name (SDATA (family), len + 1, Qnil);
+
+ return family;
+}
+
+Lisp_Object
+mac_atsu_font_face_attributes (font_id)
+ ATSUFontID font_id;
+{
+ Lisp_Object family, style_attrs;
+
+ family = atsu_find_font_family_name (font_id);
+ if (NILP (family))
+ return Qnil;
+ style_attrs = fm_style_to_face_attributes (fm_get_style_from_font (font_id));
+ return Fcons (QCfamily, Fcons (family, style_attrs));
+}
#endif
/* Sets up the table font_name_table to contain the list of all fonts
@@ -7294,9 +7399,8 @@ init_font_name_table ()
unsigned hash_code;
ItemCount nfonts, i;
ATSUFontID *font_ids = NULL;
- Ptr name;
- ByteCount name_len;
- Lisp_Object family;
+ Lisp_Object prev_family = Qnil;
+ int j;
atsu_font_id_hash =
make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE),
@@ -7314,41 +7418,25 @@ init_font_name_table ()
if (err == noErr)
for (i = 0; i < nfonts; i++)
{
- err = ATSUFindFontName (font_ids[i], kFontFamilyName,
- kFontMacintoshPlatform, kFontNoScript,
- kFontNoLanguage, 0, NULL, &name_len, NULL);
- if (err != noErr)
+ Lisp_Object family;
+
+ family = atsu_find_font_family_name (font_ids[i]);
+ if (NILP (family) || SREF (family, 0) == '.')
continue;
- name = xmalloc (name_len + 1);
- name[name_len] = '\0';
- err = ATSUFindFontName (font_ids[i], kFontFamilyName,
- kFontMacintoshPlatform, kFontNoScript,
- kFontNoLanguage, name_len, name,
- NULL, NULL);
- if (err == noErr)
+ if (!NILP (Fequal (prev_family, family)))
+ family = prev_family;
+ else
+ j = hash_lookup (h, family, &hash_code);
+ if (j < 0)
{
- FMFontFamily ff;
- FMFontStyle style = normal;
-
- decode_mac_font_name (name, name_len + 1, Qnil);
- family = make_unibyte_string (name, name_len);
- FMGetFontFamilyInstanceFromFont (font_ids[i], &ff, &style);
- Fputhash ((font_ids[i] > MOST_POSITIVE_FIXNUM
- ? make_float (font_ids[i])
- : make_number (font_ids[i])),
- Fcons (QCfamily,
- Fcons (family,
- fm_style_to_face_attributes (style))),
- Vmac_atsu_font_table);
- if (*name != '.'
- && hash_lookup (h, family, &hash_code) < 0)
- {
- add_mac_font_name (name, 0, normal, "iso10646-1");
- hash_put (h, family, long_to_cons (font_ids[i]),
- hash_code);
- }
+ add_mac_font_name (SDATA (family), 0, normal, "iso10646-1");
+ j = hash_put (h, family, Fcons (long_to_cons (font_ids[i]),
+ Qnil), hash_code);
}
- xfree (name);
+ else if (EQ (prev_family, family))
+ HASH_VALUE (h, j) = Fcons (long_to_cons (font_ids[i]),
+ HASH_VALUE (h, j));
+ prev_family = family;
}
if (font_ids)
xfree (font_ids);
@@ -7892,14 +7980,11 @@ mac_load_query_font (f, fontname)
{kAllTypographicFeaturesType, kDiacriticsType};
static const ATSUFontFeatureSelector selectors[] =
{kAllTypeFeaturesOffSelector, kDecomposeDiacriticsSelector};
- Lisp_Object font_id_cons;
FMFontStyle style;
- font_id_cons = Fgethash (make_unibyte_string (family, strlen (family)),
- atsu_font_id_hash, Qnil);
- if (NILP (font_id_cons))
- return NULL;
- font_id = cons_to_long (font_id_cons);
+ font_id = atsu_find_font_from_family_name (family);
+ if (font_id == kATSUInvalidFontID)
+ return;
size_fixed = Long2Fix (size);
bold_p = (fontface & bold) != 0;
italic_p = (fontface & italic) != 0;
@@ -8023,11 +8108,19 @@ mac_load_query_font (f, fontname)
continue;
else if (c == 0x7f)
{
- c = 0x9f;
- continue;
+#if USE_CG_TEXT_DRAWING
+ if (font->cg_glyphs)
+ {
+ c = 0x9f;
+ pcm = NULL;
+ continue;
+ }
+#endif
+ break;
}
- mac_query_char_extents (font->mac_style, c, NULL, NULL, pcm + c,
+ mac_query_char_extents (font->mac_style, c, NULL, NULL,
+ pcm ? pcm + c : NULL,
#if USE_CG_TEXT_DRAWING
(font->cg_glyphs ? font->cg_glyphs + c
: NULL)
@@ -8045,6 +8138,8 @@ mac_load_query_font (f, fontname)
font->cg_font = NULL;
xfree (font->cg_glyphs);
font->cg_glyphs = NULL;
+ if (pcm == NULL)
+ break;
}
#endif
}
@@ -8052,6 +8147,7 @@ mac_load_query_font (f, fontname)
else
#endif
{
+ OSStatus err;
FontInfo the_fontinfo;
int is_two_byte_font;
@@ -8134,8 +8230,13 @@ mac_load_query_font (f, fontname)
sizeof (XCharStruct) * (0xff - 0x20 + 1));
space_bounds = font->bounds.per_char;
- mac_query_char_extents (NULL, 0x20, &font->ascent, &font->descent,
- space_bounds, NULL);
+ err = mac_query_char_extents (NULL, 0x20, &font->ascent,
+ &font->descent, space_bounds, NULL);
+ if (err != noErr || space_bounds->width <= 0)
+ {
+ mac_unload_font (&one_mac_display_info, font);
+ return NULL;
+ }
for (c = 0x21, pcm = space_bounds + 1; c <= 0xff; c++, pcm++)
mac_query_char_extents (NULL, c, NULL, NULL, pcm, NULL);
@@ -9386,9 +9487,7 @@ mac_store_event_ref_as_apple_event (class, id, class_key, id_key,
{
mac_store_apple_event (class_key, id_key, &apple_event);
AEDisposeDesc (&apple_event);
- /* Post a harmless event so as to wake up from
- ReceiveNextEvent. */
- mac_post_mouse_moved_event ();
+ mac_wakeup_from_rne ();
}
}
}
@@ -10401,7 +10500,9 @@ XTread_socket (sd, expected, hold_quit)
#else
FrontWindow ()
#endif
- != window_ptr)
+ != window_ptr
+ || (mac_window_to_frame (window_ptr)
+ != dpyinfo->x_focus_frame))
SelectWindow (window_ptr);
else
{
@@ -11673,7 +11774,7 @@ syms_of_macterm ()
DEFVAR_BOOL ("x-use-underline-position-properties",
&x_use_underline_position_properties,
doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties.
-nil means ignore them. If you encounter fonts with bogus
+A value of nil means ignore them. If you encounter fonts with bogus
UNDERLINE_POSITION font properties, for example 7x13 on XFree prior
to 4.1, set this to nil.
@@ -11683,9 +11784,9 @@ NOTE: Not supported on Mac yet. */);
DEFVAR_BOOL ("x-underline-at-descent-line",
&x_underline_at_descent_line,
doc: /* *Non-nil means to draw the underline at the same place as the descent line.
-nil means to draw the underline according to the value of the variable
-`x-use-underline-position-properties', which is usually at the baseline
-level. The default value is nil. */);
+A value of nil means to draw the underline according to the value of the
+variable `x-use-underline-position-properties', which is usually at the
+baseline level. The default value is nil. */);
x_underline_at_descent_line = 0;
DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
@@ -11732,8 +11833,8 @@ unexpected results for some keys on non-US/GB keyboards. */);
&Vmac_emulate_three_button_mouse,
doc: /* *Specify a way of three button mouse emulation.
The value can be nil, t, or the symbol `reverse'.
-nil means that no emulation should be done and the modifiers should be
-placed on the mouse-1 event.
+A value of nil means that no emulation should be done and the modifiers
+should be placed on the mouse-1 event.
t means that when the option-key is held down while pressing the mouse
button, the click will register as mouse-2 and while the command-key
is held down, the click will register as mouse-3.
@@ -11784,15 +11885,6 @@ CODING_SYSTEM is a coding system corresponding to TEXT-ENCODING. */);
Fcons (list3 (build_string ("mac-roman"),
make_number (smRoman), Qnil), Qnil);
-#if USE_ATSUI
- DEFVAR_LISP ("mac-atsu-font-table", &Vmac_atsu_font_table,
- doc: /* Hash table of ATSU font IDs vs plist of attributes and values. */);
- Vmac_atsu_font_table =
- make_hash_table (Qeql, make_number (DEFAULT_HASH_SIZE),
- make_float (DEFAULT_REHASH_SIZE),
- make_float (DEFAULT_REHASH_THRESHOLD),
- Qnil, Qnil, Qnil);
-#endif
#if USE_MAC_TSM
DEFVAR_LISP ("mac-ts-active-input-overlay", &Vmac_ts_active_input_overlay,
doc: /* Overlay used to display Mac TSM active input area. */);
diff --git a/src/macterm.h b/src/macterm.h
index cac90f1fa80..856d349f6f7 100644
--- a/src/macterm.h
+++ b/src/macterm.h
@@ -685,6 +685,7 @@ extern Lisp_Object cfdate_to_lisp P_ ((CFDateRef));
extern Lisp_Object cfboolean_to_lisp P_ ((CFBooleanRef));
extern Lisp_Object cfobject_desc_to_lisp P_ ((CFTypeRef));
extern Lisp_Object cfproperty_list_to_lisp P_ ((CFPropertyListRef, int, int));
+extern void mac_wakeup_from_rne P_ ((void));
#endif
extern void xrm_merge_string_database P_ ((XrmDatabase, const char *));
extern Lisp_Object xrm_get_resource P_ ((XrmDatabase, const char *,
diff --git a/src/marker.c b/src/marker.c
index 9f2aa4826b4..bac8e46fc3f 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -848,7 +848,7 @@ see `marker-insertion-type'. */)
DEFUN ("marker-insertion-type", Fmarker_insertion_type,
Smarker_insertion_type, 1, 1, 0,
doc: /* Return insertion type of MARKER: t if it stays after inserted text.
-nil means the marker stays before text inserted there. */)
+The value nil means the marker stays before text inserted there. */)
(marker)
register Lisp_Object marker;
{
diff --git a/src/minibuf.c b/src/minibuf.c
index 316f487e0ff..2397ea4b085 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -2868,10 +2868,10 @@ The value may alternatively be a function, which is given three arguments:
STRING, the current buffer contents;
PREDICATE, the predicate for filtering possible matches;
CODE, which says what kind of things to do.
-CODE can be nil, t or `lambda'.
-nil means to return the best completion of STRING, or nil if there is none.
-t means to return a list of all possible completions of STRING.
-`lambda' means to return t if STRING is a valid completion as it stands. */);
+CODE can be nil, t or `lambda':
+ nil -- return the best completion of STRING, or nil if there is none.
+ t -- return a list of all possible completions of STRING.
+ lambda -- return t if STRING is a valid completion as it stands. */);
Vminibuffer_completion_table = Qnil;
DEFVAR_LISP ("minibuffer-completion-predicate", &Vminibuffer_completion_predicate,
diff --git a/src/msdos.c b/src/msdos.c
index 4a39ce75ae1..4e989402a80 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -5300,7 +5300,7 @@ This variable is used only by MSDOS terminals. */);
#ifndef subprocesses
DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes,
doc: /* *Non-nil means delete processes immediately when they exit.
-nil means don't delete them until `list-processes' is run. */);
+A value of nil means don't delete them until `list-processes' is run. */);
delete_exited_processes = 0;
#endif
diff --git a/src/msdos.h b/src/msdos.h
index 8bfbcf2d10c..cbe65818867 100644
--- a/src/msdos.h
+++ b/src/msdos.h
@@ -53,7 +53,7 @@ typedef int Pixmap;
typedef int Display;
typedef int Window;
typedef int XRectangle;
-#define PIX_TYPE int
+#define PIX_TYPE unsigned long
#define XDISPLAY
/* A stripped version of struct x_display_info in xterm.h, which see. */
diff --git a/src/process.c b/src/process.c
index db7fcb8b201..663170e685e 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6083,7 +6083,7 @@ If PROCESS is a network process, resume handling of incoming traffic. */)
DEFUN ("signal-process", Fsignal_process, Ssignal_process,
2, 2, "sProcess (name or number): \nnSignal code: ",
doc: /* Send PROCESS the signal with code SIGCODE.
-PROCESS may also be an integer specifying the process id of the
+PROCESS may also be a number specifying the process id of the
process to signal; in this case, the process need not be a child of
this Emacs.
SIGCODE may be an integer, or a symbol whose name is a signal name. */)
@@ -6100,7 +6100,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
if (FLOATP (process))
{
- pid = (pid_t) XFLOAT (process);
+ pid = (pid_t) XFLOAT_DATA (process);
goto got_it;
}
@@ -6129,7 +6129,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
got_it:
#define parse_signal(NAME, VALUE) \
- else if (!strcasecmp (name, NAME)) \
+ else if (!xstricmp (name, NAME)) \
XSETINT (sigcode, VALUE)
if (INTEGERP (sigcode))
@@ -6141,7 +6141,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
CHECK_SYMBOL (sigcode);
name = SDATA (SYMBOL_NAME (sigcode));
- if (!strncasecmp(name, "sig", 3))
+ if (!strncmp(name, "SIG", 3) || !strncmp(name, "sig", 3))
name += 3;
if (0)
diff --git a/src/syntax.c b/src/syntax.c
index a85746be362..d1ae3f6bd8c 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -893,7 +893,7 @@ DEFUN ("string-to-syntax", Fstring_to_syntax, Sstring_to_syntax, 1, 1, 0,
doc: /* Convert a syntax specification STRING into syntax cell form.
STRING should be a string as it is allowed as argument of
`modify-syntax-entry'. Value is the equivalent cons cell
-(CODE . MATCHING-CHAR) that can be used as value of a `syntax-table'
+\(CODE . MATCHING-CHAR) that can be used as value of a `syntax-table'
text property. */)
(string)
Lisp_Object string;
@@ -3270,7 +3270,7 @@ Fourth arg STOPBEFORE non-nil means stop when come to
any character that starts a sexp.
Fifth arg OLDSTATE is a list like what this function returns.
It is used to initialize the state of the parse. Elements number 1, 2, 6
- and 8 are ignored; you can leave off element 8 (the last) entirely.
+ and 8 are ignored.
Sixth arg COMMENTSTOP non-nil means stop at the start of a comment.
If it is symbol `syntax-table', stop after the start of a comment or a
string, or after end of a comment or a string. */)
diff --git a/src/systime.h b/src/systime.h
index 00373b257b3..e7ff2b2a3b7 100644
--- a/src/systime.h
+++ b/src/systime.h
@@ -101,16 +101,8 @@ extern time_t timezone;
#ifdef GETTIMEOFDAY_ONE_ARGUMENT
#define EMACS_GET_TIME(time) gettimeofday (&(time))
#else /* not GETTIMEOFDAY_ONE_ARGUMENT */
-#ifdef HAVE_STRUCT_TIMEZONE
-#define EMACS_GET_TIME(time) \
- do { \
- struct timezone dummy; \
- gettimeofday (&(time), &dummy); \
- } while (0)
-#else
/* Presumably the second arg is ignored. */
#define EMACS_GET_TIME(time) gettimeofday (&(time), NULL)
-#endif /* HAVE_STRUCT_TIMEZONE */
#endif /* not GETTIMEOFDAY_ONE_ARGUMENT */
#define EMACS_ADD_TIME(dest, src1, src2) \
diff --git a/src/w32fns.c b/src/w32fns.c
index 1ab44486852..65362099bf9 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -3707,8 +3707,11 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
However for top/left sizing we will need to fix the X
and Y positions as well. */
- lppos->cx -= wdiff;
- lppos->cy -= hdiff;
+ int cx_mintrack = GetSystemMetrics (SM_CXMINTRACK);
+ int cy_mintrack = GetSystemMetrics (SM_CYMINTRACK);
+
+ lppos->cx = max (lppos->cx - wdiff, cx_mintrack);
+ lppos->cy = max (lppos->cy - hdiff, cy_mintrack);
if (wp.showCmd != SW_SHOWMAXIMIZED
&& (lppos->flags & SWP_NOMOVE) == 0)
@@ -3732,9 +3735,6 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
goto dflt;
case WM_GETMINMAXINFO:
- /* Hack to correct bug that allows Emacs frames to be resized
- below the Minimum Tracking Size. */
- ((LPMINMAXINFO) lParam)->ptMinTrackSize.y++;
/* Hack to allow resizing the Emacs frame above the screen size.
Note that Windows 9x limits coordinates to 16-bits. */
((LPMINMAXINFO) lParam)->ptMaxTrackSize.x = 32767;
diff --git a/src/w32term.c b/src/w32term.c
index 89be876b920..992bbc76aad 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -6693,7 +6693,7 @@ the cursor have no effect. */);
DEFVAR_BOOL ("x-use-underline-position-properties",
&x_use_underline_position_properties,
doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties.
-nil means ignore them. If you encounter fonts with bogus
+A value of nil means ignore them. If you encounter fonts with bogus
UNDERLINE_POSITION font properties, for example 7x13 on XFree prior
to 4.1, set this to nil.
@@ -6703,9 +6703,9 @@ NOTE: Not supported on MS-Windows yet. */);
DEFVAR_BOOL ("x-underline-at-descent-line",
&x_underline_at_descent_line,
doc: /* *Non-nil means to draw the underline at the same place as the descent line.
-nil means to draw the underline according to the value of the variable
-`x-use-underline-position-properties', which is usually at the baseline
-level. The default value is nil. */);
+A value of nil means to draw the underline according to the value of the
+variable `x-use-underline-position-properties', which is usually at the
+baseline level. The default value is nil. */);
x_underline_at_descent_line = 0;
DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
diff --git a/src/xdisp.c b/src/xdisp.c
index 957340674f6..63998ddf8f7 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13600,8 +13600,11 @@ redisplay_window (window, just_this_one_p)
#endif
- if (redisplay_tool_bar_p)
- redisplay_tool_bar (f);
+ if (redisplay_tool_bar_p && redisplay_tool_bar (f))
+ {
+ extern int ignore_mouse_drag_p;
+ ignore_mouse_drag_p = 1;
+ }
#endif
}
@@ -17407,9 +17410,9 @@ for details) to use.
Optional second arg FACE specifies the face property to put
on all characters for which no face is specified.
-t means whatever face the window's mode line currently uses
+The value t means whatever face the window's mode line currently uses
\(either `mode-line' or `mode-line-inactive', depending).
-nil means the default is no face property.
+A value of nil means the default is no face property.
If FACE is an integer, the value string has no text properties.
Optional third and fourth args WINDOW and BUFFER specify the window
@@ -22155,7 +22158,7 @@ show_mouse_face (dpyinfo, draw)
}
/* Change the mouse cursor. */
- if (draw == DRAW_NORMAL_TEXT)
+ if (draw == DRAW_NORMAL_TEXT && !EQ (dpyinfo->mouse_face_window, f->tool_bar_window))
rif->define_frame_cursor (f, FRAME_X_OUTPUT (f)->text_cursor);
else if (draw == DRAW_MOUSE_FACE)
rif->define_frame_cursor (f, FRAME_X_OUTPUT (f)->hand_cursor);
@@ -24276,7 +24279,7 @@ Value is a number or a cons (WIDTH-DPI . HEIGHT-DPI). */);
truncate_partial_width_windows = 1;
DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video,
- doc: /* nil means display the mode-line/header-line/menu-bar in the default face.
+ doc: /* When nil, display the mode-line/header-line/menu-bar in the default face.
Any other value means to use the appropriate face, `mode-line',
`header-line', or `menu' respectively. */);
mode_line_inverse_video = 1;
diff --git a/src/xterm.c b/src/xterm.c
index 277f0431a3b..977325f0b75 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8608,15 +8608,15 @@ do_ewmh_fullscreen (f)
Atom *atoms = XListProperties (FRAME_X_DISPLAY (f),
FRAME_X_DISPLAY_INFO (f)->root_window,
&num);
- if (atoms && num > 0)
+ if (atoms && num > 0)
{
char **names = (char **) xmalloc (num * sizeof(*names));
- if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names))
+ if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names))
{
int i;
- for (i = 0; i < num; ++i)
+ for (i = 0; i < num; ++i)
{
- if (!have_net_atom)
+ if (!have_net_atom)
have_net_atom = strncmp (names[i], "_NET_", 5) == 0;
XFree (names[i]);
}
@@ -8629,7 +8629,7 @@ do_ewmh_fullscreen (f)
FRAME_X_DISPLAY_INFO (f)->have_net_atoms = have_net_atom;
}
- if (have_net_atom)
+ if (have_net_atom)
{
Lisp_Object frame;
const char *atom = "_NET_WM_STATE";
@@ -8642,7 +8642,7 @@ do_ewmh_fullscreen (f)
/* If there are _NET_ atoms we assume we have extended window manager
hints. */
- switch (f->want_fullscreen)
+ switch (f->want_fullscreen)
{
case FULLSCREEN_BOTH:
what = fs;
@@ -8698,7 +8698,7 @@ static void
XTfullscreen_hook (f)
FRAME_PTR f;
{
- if (f->async_visible)
+ if (f->async_visible)
{
BLOCK_INPUT;
do_ewmh_fullscreen (f);
@@ -8718,7 +8718,7 @@ x_check_fullscreen (f)
{
int width, height, ign;
- if (do_ewmh_fullscreen (f))
+ if (do_ewmh_fullscreen (f))
return;
x_real_positions (f, &f->left_pos, &f->top_pos);
@@ -9052,20 +9052,26 @@ XTframe_raise_lower (f, raise_flag)
{
if (raise_flag)
{
- Lisp_Object frame;
- const char *atom = "_NET_ACTIVE_WINDOW";
+ /* The following code is needed for `raise-frame' to work on
+ some versions of metacity; see Window Manager
+ Specification/Extended Window Manager Hints at
+ http://freedesktop.org/wiki/Standards_2fwm_2dspec
+
+ However, on other versions (metacity 2.17.2-1.fc7), it
+ reportedly causes hangs when resizing frames. */
+
+ /* Lisp_Object frame;
+ const char *atom = "_NET_ACTIVE_WINDOW"; */
x_raise_frame (f);
- /* See Window Manager Specification/Extended Window Manager Hints at
- http://freedesktop.org/wiki/Standards_2fwm_2dspec */
- XSETFRAME (frame, f);
- Fx_send_client_event (frame, make_number (0), frame,
+ /* XSETFRAME (frame, f);
+ Fx_send_client_event (frame, make_number (0), frame,
make_unibyte_string (atom, strlen (atom)),
make_number (32),
Fcons (make_number (1),
Fcons (make_number (time (NULL) * 1000),
- Qnil)));
+ Qnil))); */
}
else
x_lower_frame (f);
@@ -10512,8 +10518,8 @@ x_query_font (f, fontname)
for (i = 0; i < dpyinfo->n_fonts; i++)
if (dpyinfo->font_table[i].name
- && (!strcasecmp (dpyinfo->font_table[i].name, fontname)
- || !strcasecmp (dpyinfo->font_table[i].full_name, fontname)))
+ && (!xstricmp (dpyinfo->font_table[i].name, fontname)
+ || !xstricmp (dpyinfo->font_table[i].full_name, fontname)))
return (dpyinfo->font_table + i);
return NULL;
}
@@ -11601,7 +11607,7 @@ syms_of_xterm ()
DEFVAR_BOOL ("x-use-underline-position-properties",
&x_use_underline_position_properties,
doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties.
-nil means ignore them. If you encounter fonts with bogus
+A value of nil means ignore them. If you encounter fonts with bogus
UNDERLINE_POSITION font properties, for example 7x13 on XFree prior
to 4.1, set this to nil. */);
x_use_underline_position_properties = 1;
@@ -11609,9 +11615,9 @@ to 4.1, set this to nil. */);
DEFVAR_BOOL ("x-underline-at-descent-line",
&x_underline_at_descent_line,
doc: /* *Non-nil means to draw the underline at the same place as the descent line.
-nil means to draw the underline according to the value of the variable
-`x-use-underline-position-properties', which is usually at the baseline
-level. The default value is nil. */);
+A value of nil means to draw the underline according to the value of the
+variable `x-use-underline-position-properties', which is usually at the
+baseline level. The default value is nil. */);
x_underline_at_descent_line = 0;
DEFVAR_BOOL ("x-mouse-click-focus-ignore-position",