diff options
| author | Kenichi Handa | 2010-11-01 16:53:08 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-11-01 16:53:08 +0900 |
| commit | f6f3366160e26ff5984f287e60616ec9f90acfa3 (patch) | |
| tree | 9f5c8dc73cad6319a8fdf1ab22fd4e9901089e50 /src | |
| parent | 65b6b59a8030b09d2a32ee88837a061e22751988 (diff) | |
| parent | ca7c89d8f52b34f694031f496600f949640ff9c4 (diff) | |
| download | emacs-f6f3366160e26ff5984f287e60616ec9f90acfa3.tar.gz emacs-f6f3366160e26ff5984f287e60616ec9f90acfa3.zip | |
merge trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 37 | ||||
| -rw-r--r-- | src/buffer.c | 23 | ||||
| -rw-r--r-- | src/dbusbind.c | 12 | ||||
| -rw-r--r-- | src/emacs.c | 2 | ||||
| -rw-r--r-- | src/filelock.c | 6 | ||||
| -rw-r--r-- | src/frame.c | 10 | ||||
| -rw-r--r-- | src/nsfns.m | 26 | ||||
| -rw-r--r-- | src/w32fns.c | 10 | ||||
| -rw-r--r-- | src/xfns.c | 8 | ||||
| -rw-r--r-- | src/xterm.c | 68 |
10 files changed, 136 insertions, 66 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6128808a2a7..3375a46d39e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -67,6 +67,43 @@ | |||
| 67 | * nsterm.m (ns_draw_glyph_string): Handle the case | 67 | * nsterm.m (ns_draw_glyph_string): Handle the case |
| 68 | GLYPHLESS_GLYPH (the detail is not yet implemented). | 68 | GLYPHLESS_GLYPH (the detail is not yet implemented). |
| 69 | 69 | ||
| 70 | 2010-10-31 Glenn Morris <rgm@gnu.org> | ||
| 71 | |||
| 72 | * xterm.c (x_connection_closed) [USE_X_TOOLKIT]: Fix merge, maybe. | ||
| 73 | |||
| 74 | * frame.c (syms_of_frame) <tool-bar-mode>: | ||
| 75 | Default to nil if !HAVE_WINDOW_SYSTEM. (Bug#7299) | ||
| 76 | |||
| 77 | 2010-10-31 Chong Yidong <cyd@stupidchicken.com> | ||
| 78 | |||
| 79 | * xterm.c (x_connection_closed): Print informative error message | ||
| 80 | when aborting on GTK. This requires using shut_down_emacs | ||
| 81 | directly instead of Fkill_emacs. | ||
| 82 | |||
| 83 | 2010-10-31 Michael Albinus <michael.albinus@gmx.de> | ||
| 84 | |||
| 85 | * dbusbind.c (Fdbus_call_method_asynchronously) | ||
| 86 | (Fdbus_register_signal, Fdbus_register_method): Check, whether | ||
| 87 | `dbus-registered-objects-table' is initialized. | ||
| 88 | |||
| 89 | 2010-10-29 Eli Zaretskii <eliz@gnu.org> | ||
| 90 | |||
| 91 | * emacs.c (main): Call syms_of_filelock unconditionally. | ||
| 92 | |||
| 93 | * filelock.c (syms_of_filelock): Move out of #ifdef CLASH_DETECTION | ||
| 94 | clause, but keep part of it conditioned on CLASH_DETECTION. | ||
| 95 | |||
| 96 | 2010-10-29 Glenn Morris <rgm@gnu.org> | ||
| 97 | |||
| 98 | * nsfns.m (Fx-display-save-under, Fx-open-connection) | ||
| 99 | (Fxw-color-defined-p, Fxw-display-color-p, Fx-show-tip): | ||
| 100 | * w32fns.c (Fxw_color_defined_p, Fx_open_connection): | ||
| 101 | * xfns.c (Fxw_color_defined_p, Fx_open_connection): | ||
| 102 | Sync docs between X, W32, NS. | ||
| 103 | |||
| 104 | * buffer.c (syms_of_buffer) <abbrev-mode, transient-mark-mode>: | ||
| 105 | * frame.c (syms_of_frame) <tool-bar-mode>: Move doc here from Lisp. | ||
| 106 | |||
| 70 | 2010-10-26 Juanma Barranquero <lekktu@gmail.com> | 107 | 2010-10-26 Juanma Barranquero <lekktu@gmail.com> |
| 71 | 108 | ||
| 72 | * eval.c (init_eval_once): Set max_lisp_eval_depth to 600; | 109 | * eval.c (init_eval_once): Set max_lisp_eval_depth to 600; |
diff --git a/src/buffer.c b/src/buffer.c index 5a6bfcba060..67192b4843b 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5600,7 +5600,8 @@ Format with `format-mode-line' to produce a string value. */); | |||
| 5600 | doc: /* Local (mode-specific) abbrev table of current buffer. */); | 5600 | doc: /* Local (mode-specific) abbrev table of current buffer. */); |
| 5601 | 5601 | ||
| 5602 | DEFVAR_PER_BUFFER ("abbrev-mode", ¤t_buffer->abbrev_mode, Qnil, | 5602 | DEFVAR_PER_BUFFER ("abbrev-mode", ¤t_buffer->abbrev_mode, Qnil, |
| 5603 | doc: /* Non-nil turns on automatic expansion of abbrevs as they are inserted. */); | 5603 | doc: /* Non-nil if Abbrev mode is enabled. |
| 5604 | Use the command `abbrev-mode' to change this variable. */); | ||
| 5604 | 5605 | ||
| 5605 | DEFVAR_PER_BUFFER ("case-fold-search", ¤t_buffer->case_fold_search, | 5606 | DEFVAR_PER_BUFFER ("case-fold-search", ¤t_buffer->case_fold_search, |
| 5606 | Qnil, | 5607 | Qnil, |
| @@ -6098,11 +6099,23 @@ to the value obtained by calling `current-time'. | |||
| 6098 | If the buffer has never been shown in a window, the value is nil. */); | 6099 | If the buffer has never been shown in a window, the value is nil. */); |
| 6099 | 6100 | ||
| 6100 | DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode, | 6101 | DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode, |
| 6101 | doc: /* */); | 6102 | doc: /* Non-nil if Transient Mark mode is enabled. |
| 6103 | See the command `transient-mark-mode' for a description of this minor mode. | ||
| 6104 | |||
| 6105 | Non-nil also enables highlighting of the region whenever the mark is active. | ||
| 6106 | The variable `highlight-nonselected-windows' controls whether to highlight | ||
| 6107 | all windows or just the selected window. | ||
| 6108 | |||
| 6109 | If the value is `lambda', that enables Transient Mark mode temporarily. | ||
| 6110 | After any subsequent action that would normally deactivate the mark | ||
| 6111 | \(such as buffer modification), Transient Mark mode is turned off. | ||
| 6112 | |||
| 6113 | If the value is (only . OLDVAL), that enables Transient Mark mode | ||
| 6114 | temporarily. After any subsequent point motion command that is not | ||
| 6115 | shift-translated, or any other action that would normally deactivate | ||
| 6116 | the mark (such as buffer modification), the value of | ||
| 6117 | `transient-mark-mode' is set to OLDVAL. */); | ||
| 6102 | Vtransient_mark_mode = Qnil; | 6118 | Vtransient_mark_mode = Qnil; |
| 6103 | /* The docstring is in simple.el. If we put it here, it would be | ||
| 6104 | overwritten when transient-mark-mode is defined using | ||
| 6105 | define-minor-mode. */ | ||
| 6106 | 6119 | ||
| 6107 | DEFVAR_LISP ("inhibit-read-only", &Vinhibit_read_only, | 6120 | DEFVAR_LISP ("inhibit-read-only", &Vinhibit_read_only, |
| 6108 | doc: /* *Non-nil means disregard read-only status of buffers or characters. | 6121 | doc: /* *Non-nil means disregard read-only status of buffers or characters. |
diff --git a/src/dbusbind.c b/src/dbusbind.c index 683b7cb583b..beb1faaf4aa 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -1232,6 +1232,10 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE | |||
| 1232 | SDATA (interface), | 1232 | SDATA (interface), |
| 1233 | SDATA (method)); | 1233 | SDATA (method)); |
| 1234 | 1234 | ||
| 1235 | /* Check dbus-registered-objects-table. */ | ||
| 1236 | if (!HASH_TABLE_P (Vdbus_registered_objects_table)) | ||
| 1237 | XD_SIGNAL1 (build_string ("dbus.el is not loaded")); | ||
| 1238 | |||
| 1235 | /* Open a connection to the bus. */ | 1239 | /* Open a connection to the bus. */ |
| 1236 | connection = xd_initialize (bus, TRUE); | 1240 | connection = xd_initialize (bus, TRUE); |
| 1237 | 1241 | ||
| @@ -1869,6 +1873,10 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG | |||
| 1869 | wrong_type_argument (intern ("functionp"), handler); | 1873 | wrong_type_argument (intern ("functionp"), handler); |
| 1870 | GCPRO6 (bus, service, path, interface, signal, handler); | 1874 | GCPRO6 (bus, service, path, interface, signal, handler); |
| 1871 | 1875 | ||
| 1876 | /* Check dbus-registered-objects-table. */ | ||
| 1877 | if (!HASH_TABLE_P (Vdbus_registered_objects_table)) | ||
| 1878 | XD_SIGNAL1 (build_string ("dbus.el is not loaded")); | ||
| 1879 | |||
| 1872 | /* Retrieve unique name of service. If service is a known name, we | 1880 | /* Retrieve unique name of service. If service is a known name, we |
| 1873 | will register for the corresponding unique name, if any. Signals | 1881 | will register for the corresponding unique name, if any. Signals |
| 1874 | are sent always with the unique name as sender. Note: the unique | 1882 | are sent always with the unique name as sender. Note: the unique |
| @@ -1981,6 +1989,10 @@ used for composing the returning D-Bus message. */) | |||
| 1981 | /* TODO: We must check for a valid service name, otherwise there is | 1989 | /* TODO: We must check for a valid service name, otherwise there is |
| 1982 | a segmentation fault. */ | 1990 | a segmentation fault. */ |
| 1983 | 1991 | ||
| 1992 | /* Check dbus-registered-objects-table. */ | ||
| 1993 | if (!HASH_TABLE_P (Vdbus_registered_objects_table)) | ||
| 1994 | XD_SIGNAL1 (build_string ("dbus.el is not loaded")); | ||
| 1995 | |||
| 1984 | /* Open a connection to the bus. */ | 1996 | /* Open a connection to the bus. */ |
| 1985 | connection = xd_initialize (bus, TRUE); | 1997 | connection = xd_initialize (bus, TRUE); |
| 1986 | 1998 | ||
diff --git a/src/emacs.c b/src/emacs.c index e83725ccf03..a38847e3bd3 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1509,9 +1509,7 @@ main (int argc, char **argv) | |||
| 1509 | syms_of_doc (); | 1509 | syms_of_doc (); |
| 1510 | syms_of_editfns (); | 1510 | syms_of_editfns (); |
| 1511 | syms_of_emacs (); | 1511 | syms_of_emacs (); |
| 1512 | #ifdef CLASH_DETECTION | ||
| 1513 | syms_of_filelock (); | 1512 | syms_of_filelock (); |
| 1514 | #endif /* CLASH_DETECTION */ | ||
| 1515 | syms_of_indent (); | 1513 | syms_of_indent (); |
| 1516 | syms_of_insdel (); | 1514 | syms_of_insdel (); |
| 1517 | /* syms_of_keymap (); */ | 1515 | /* syms_of_keymap (); */ |
diff --git a/src/filelock.c b/src/filelock.c index acca7234419..ae0584c447a 100644 --- a/src/filelock.c +++ b/src/filelock.c | |||
| @@ -730,6 +730,8 @@ init_filelock (void) | |||
| 730 | boot_time_initialized = 0; | 730 | boot_time_initialized = 0; |
| 731 | } | 731 | } |
| 732 | 732 | ||
| 733 | #endif /* CLASH_DETECTION */ | ||
| 734 | |||
| 733 | void | 735 | void |
| 734 | syms_of_filelock (void) | 736 | syms_of_filelock (void) |
| 735 | { | 737 | { |
| @@ -737,12 +739,12 @@ syms_of_filelock (void) | |||
| 737 | doc: /* The directory for writing temporary files. */); | 739 | doc: /* The directory for writing temporary files. */); |
| 738 | Vtemporary_file_directory = Qnil; | 740 | Vtemporary_file_directory = Qnil; |
| 739 | 741 | ||
| 742 | #ifdef CLASH_DETECTION | ||
| 740 | defsubr (&Sunlock_buffer); | 743 | defsubr (&Sunlock_buffer); |
| 741 | defsubr (&Slock_buffer); | 744 | defsubr (&Slock_buffer); |
| 742 | defsubr (&Sfile_locked_p); | 745 | defsubr (&Sfile_locked_p); |
| 746 | #endif | ||
| 743 | } | 747 | } |
| 744 | 748 | ||
| 745 | #endif /* CLASH_DETECTION */ | ||
| 746 | |||
| 747 | /* arch-tag: e062676d-50b2-4be0-ab96-197c81b181a1 | 749 | /* arch-tag: e062676d-50b2-4be0-ab96-197c81b181a1 |
| 748 | (do not change this comment) */ | 750 | (do not change this comment) */ |
diff --git a/src/frame.c b/src/frame.c index 1c9d471cfa9..ba675be5b5f 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -4571,8 +4571,16 @@ or call the function `menu-bar-mode'. */); | |||
| 4571 | Vmenu_bar_mode = Qt; | 4571 | Vmenu_bar_mode = Qt; |
| 4572 | 4572 | ||
| 4573 | DEFVAR_LISP ("tool-bar-mode", &Vtool_bar_mode, | 4573 | DEFVAR_LISP ("tool-bar-mode", &Vtool_bar_mode, |
| 4574 | doc: /* Non-nil if Tool-Bar mode is enabled. */); | 4574 | doc: /* Non-nil if Tool-Bar mode is enabled. |
| 4575 | See the command `tool-bar-mode' for a description of this minor mode. | ||
| 4576 | Setting this variable directly does not take effect; | ||
| 4577 | either customize it (see the info node `Easy Customization') | ||
| 4578 | or call the function `tool-bar-mode'. */); | ||
| 4579 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 4575 | Vtool_bar_mode = Qt; | 4580 | Vtool_bar_mode = Qt; |
| 4581 | #else | ||
| 4582 | Vtool_bar_mode = Qnil; | ||
| 4583 | #endif | ||
| 4576 | 4584 | ||
| 4577 | DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame, | 4585 | DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame, |
| 4578 | doc: /* Minibufferless frames use this frame's minibuffer. | 4586 | doc: /* Minibufferless frames use this frame's minibuffer. |
diff --git a/src/nsfns.m b/src/nsfns.m index db8bbeb5f76..147f9aab801 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* Functions for the NeXT/Open/GNUstep and MacOSX window system. | 1 | /* Functions for the NeXT/Open/GNUstep and MacOSX window system. |
| 2 | Copyright (C) 1989, 1992, 1993, 1994, 2005, 2006, 2008, 2009, 2010 | 2 | |
| 3 | Free Software Foundation, Inc. | 3 | Copyright (C) 1989, 1992, 1993, 1994, 2005, 2006, 2008, 2009, 2010 |
| 4 | Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 6 | 7 | ||
| @@ -1697,7 +1698,7 @@ If omitted or nil, the selected frame's display is used. */) | |||
| 1697 | 1698 | ||
| 1698 | DEFUN ("x-display-save-under", Fx_display_save_under, | 1699 | DEFUN ("x-display-save-under", Fx_display_save_under, |
| 1699 | Sx_display_save_under, 0, 1, 0, | 1700 | Sx_display_save_under, 0, 1, 0, |
| 1700 | doc: /* Non-nil if the Nextstep display server supports the save-under feature. | 1701 | doc: /* Return t if DISPLAY supports the save-under feature. |
| 1701 | The optional argument DISPLAY specifies which display to ask about. | 1702 | The optional argument DISPLAY specifies which display to ask about. |
| 1702 | DISPLAY should be a frame, the display name as a string, or a terminal ID. | 1703 | DISPLAY should be a frame, the display name as a string, or a terminal ID. |
| 1703 | If omitted or nil, the selected frame's display is used. */) | 1704 | If omitted or nil, the selected frame's display is used. */) |
| @@ -1722,9 +1723,12 @@ If omitted or nil, the selected frame's display is used. */) | |||
| 1722 | 1723 | ||
| 1723 | DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection, | 1724 | DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection, |
| 1724 | 1, 3, 0, | 1725 | 1, 3, 0, |
| 1725 | doc: /* Open a connection to a Nextstep display server. | 1726 | doc: /* Open a connection to a display server. |
| 1726 | DISPLAY is the name of the display to connect to. | 1727 | DISPLAY is the name of the display to connect to. |
| 1727 | Optional arguments XRM-STRING and MUST-SUCCEED are currently ignored. */) | 1728 | Optional second arg XRM-STRING is a string of resources in xrdb format. |
| 1729 | If the optional third arg MUST-SUCCEED is non-nil, | ||
| 1730 | terminate Emacs if we can't open the connection. | ||
| 1731 | \(In the Nextstep version, the last two arguments are currently ignored.) */) | ||
| 1728 | (Lisp_Object display, Lisp_Object resource_string, Lisp_Object must_succeed) | 1732 | (Lisp_Object display, Lisp_Object resource_string, Lisp_Object must_succeed) |
| 1729 | { | 1733 | { |
| 1730 | struct ns_display_info *dpyinfo; | 1734 | struct ns_display_info *dpyinfo; |
| @@ -2201,8 +2205,8 @@ x_sync (struct frame *f) | |||
| 2201 | 2205 | ||
| 2202 | 2206 | ||
| 2203 | DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, | 2207 | DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, |
| 2204 | doc: /* Return t if the current Nextstep display supports the color COLOR. | 2208 | doc: /* Internal function called by `color-defined-p', which see. |
| 2205 | The optional argument FRAME is currently ignored. */) | 2209 | \(Note that the Nextstep version of this function ignores FRAME.) */) |
| 2206 | (Lisp_Object color, Lisp_Object frame) | 2210 | (Lisp_Object color, Lisp_Object frame) |
| 2207 | { | 2211 | { |
| 2208 | NSColor * col; | 2212 | NSColor * col; |
| @@ -2233,10 +2237,7 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, | |||
| 2233 | 2237 | ||
| 2234 | 2238 | ||
| 2235 | DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, | 2239 | DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, |
| 2236 | doc: /* Return t if the Nextstep display supports color. | 2240 | doc: /* Internal function called by `display-color-p', which see. */) |
| 2237 | The optional argument DISPLAY specifies which display to ask about. | ||
| 2238 | DISPLAY should be either a frame, a display name (a string), or terminal ID. | ||
| 2239 | If omitted or nil, that stands for the selected frame's display. */) | ||
| 2240 | (Lisp_Object display) | 2241 | (Lisp_Object display) |
| 2241 | { | 2242 | { |
| 2242 | NSWindowDepth depth; | 2243 | NSWindowDepth depth; |
| @@ -2430,6 +2431,8 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, | |||
| 2430 | doc: /* Show STRING in a \"tooltip\" window on frame FRAME. | 2431 | doc: /* Show STRING in a \"tooltip\" window on frame FRAME. |
| 2431 | A tooltip window is a small window displaying a string. | 2432 | A tooltip window is a small window displaying a string. |
| 2432 | 2433 | ||
| 2434 | This is an internal function; Lisp code should call `tooltip-show'. | ||
| 2435 | |||
| 2433 | FRAME nil or omitted means use the selected frame. | 2436 | FRAME nil or omitted means use the selected frame. |
| 2434 | 2437 | ||
| 2435 | PARMS is an optional list of frame parameters which can be used to | 2438 | PARMS is an optional list of frame parameters which can be used to |
| @@ -2675,4 +2678,3 @@ be used as the image of the icon representing the frame. */); | |||
| 2675 | 2678 | ||
| 2676 | } | 2679 | } |
| 2677 | 2680 | ||
| 2678 | // arch-tag: dc2a3f74-1123-4daa-8eed-fb78db6a5642 | ||
diff --git a/src/w32fns.c b/src/w32fns.c index 1612182c660..15dbb404737 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -4511,7 +4511,8 @@ DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0, | |||
| 4511 | 4511 | ||
| 4512 | 4512 | ||
| 4513 | DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, | 4513 | DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, |
| 4514 | doc: /* Internal function called by `color-defined-p', which see. */) | 4514 | doc: /* Internal function called by `color-defined-p', which see. |
| 4515 | \(Note that the Nextstep version of this function ignores FRAME.) */) | ||
| 4515 | (Lisp_Object color, Lisp_Object frame) | 4516 | (Lisp_Object color, Lisp_Object frame) |
| 4516 | { | 4517 | { |
| 4517 | XColor foo; | 4518 | XColor foo; |
| @@ -4851,11 +4852,12 @@ x_display_info_for_name (Lisp_Object name) | |||
| 4851 | } | 4852 | } |
| 4852 | 4853 | ||
| 4853 | DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection, | 4854 | DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection, |
| 4854 | 1, 3, 0, doc: /* Open a connection to a server. | 4855 | 1, 3, 0, doc: /* Open a connection to a display server. |
| 4855 | DISPLAY is the name of the display to connect to. | 4856 | DISPLAY is the name of the display to connect to. |
| 4856 | Optional second arg XRM-STRING is a string of resources in xrdb format. | 4857 | Optional second arg XRM-STRING is a string of resources in xrdb format. |
| 4857 | If the optional third arg MUST-SUCCEED is non-nil, | 4858 | If the optional third arg MUST-SUCCEED is non-nil, |
| 4858 | terminate Emacs if we can't open the connection. */) | 4859 | terminate Emacs if we can't open the connection. |
| 4860 | \(In the Nextstep version, the last two arguments are currently ignored.) */) | ||
| 4859 | (Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed) | 4861 | (Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed) |
| 4860 | { | 4862 | { |
| 4861 | unsigned char *xrm_option; | 4863 | unsigned char *xrm_option; |
| @@ -7267,5 +7269,3 @@ w32_last_error (void) | |||
| 7267 | return GetLastError (); | 7269 | return GetLastError (); |
| 7268 | } | 7270 | } |
| 7269 | 7271 | ||
| 7270 | /* arch-tag: 707589ab-b9be-4638-8cdd-74629cc9b446 | ||
| 7271 | (do not change this comment) */ | ||
diff --git a/src/xfns.c b/src/xfns.c index 9958e6607e5..6492bbd8a23 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -3581,7 +3581,8 @@ FRAME nil means use the selected frame. */) | |||
| 3581 | 3581 | ||
| 3582 | 3582 | ||
| 3583 | DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, | 3583 | DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, |
| 3584 | doc: /* Internal function called by `color-defined-p', which see. */) | 3584 | doc: /* Internal function called by `color-defined-p', which see |
| 3585 | .\(Note that the Nextstep version of this function ignores FRAME.) */) | ||
| 3585 | (Lisp_Object color, Lisp_Object frame) | 3586 | (Lisp_Object color, Lisp_Object frame) |
| 3586 | { | 3587 | { |
| 3587 | XColor foo; | 3588 | XColor foo; |
| @@ -4099,11 +4100,12 @@ x_display_info_for_name (Lisp_Object name) | |||
| 4099 | 4100 | ||
| 4100 | DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection, | 4101 | DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection, |
| 4101 | 1, 3, 0, | 4102 | 1, 3, 0, |
| 4102 | doc: /* Open a connection to an X server. | 4103 | doc: /* Open a connection to a display server. |
| 4103 | DISPLAY is the name of the display to connect to. | 4104 | DISPLAY is the name of the display to connect to. |
| 4104 | Optional second arg XRM-STRING is a string of resources in xrdb format. | 4105 | Optional second arg XRM-STRING is a string of resources in xrdb format. |
| 4105 | If the optional third arg MUST-SUCCEED is non-nil, | 4106 | If the optional third arg MUST-SUCCEED is non-nil, |
| 4106 | terminate Emacs if we can't open the connection. */) | 4107 | terminate Emacs if we can't open the connection. |
| 4108 | \(In the Nextstep version, the last two arguments are currently ignored.) */) | ||
| 4107 | (Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed) | 4109 | (Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed) |
| 4108 | { | 4110 | { |
| 4109 | unsigned char *xrm_option; | 4111 | unsigned char *xrm_option; |
diff --git a/src/xterm.c b/src/xterm.c index 83e9465daf3..463ea8b7dc2 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -7755,47 +7755,43 @@ x_connection_closed (Display *dpy, const char *error_message) | |||
| 7755 | delete_frame (frame, Qnoelisp); | 7755 | delete_frame (frame, Qnoelisp); |
| 7756 | } | 7756 | } |
| 7757 | 7757 | ||
| 7758 | /* We have to close the display to inform Xt that it doesn't | 7758 | /* If DPYINFO is null, this means we didn't open the display in the |
| 7759 | exist anymore. If we don't, Xt will continue to wait for | 7759 | first place, so don't try to close it. */ |
| 7760 | events from the display. As a consequence, a sequence of | ||
| 7761 | |||
| 7762 | M-x make-frame-on-display RET :1 RET | ||
| 7763 | ...kill the new frame, so that we get an IO error... | ||
| 7764 | M-x make-frame-on-display RET :1 RET | ||
| 7765 | |||
| 7766 | will indefinitely wait in Xt for events for display `:1', opened | ||
| 7767 | in the first call to make-frame-on-display. | ||
| 7768 | |||
| 7769 | Closing the display is reported to lead to a bus error on | ||
| 7770 | OpenWindows in certain situations. I suspect that is a bug | ||
| 7771 | in OpenWindows. I don't know how to circumvent it here. */ | ||
| 7772 | |||
| 7773 | if (dpyinfo) | 7760 | if (dpyinfo) |
| 7774 | { | 7761 | { |
| 7775 | #ifdef USE_X_TOOLKIT | 7762 | #ifdef USE_X_TOOLKIT |
| 7776 | /* If DPYINFO is null, this means we didn't open the display | 7763 | /* We have to close the display to inform Xt that it doesn't |
| 7777 | in the first place, so don't try to close it. */ | 7764 | exist anymore. If we don't, Xt will continue to wait for |
| 7778 | { | 7765 | events from the display. As a consequence, a sequence of |
| 7779 | fatal_error_signal_hook = x_fatal_error_signal; | 7766 | |
| 7780 | XtCloseDisplay (dpy); | 7767 | M-x make-frame-on-display RET :1 RET |
| 7781 | fatal_error_signal_hook = NULL; | 7768 | ...kill the new frame, so that we get an IO error... |
| 7782 | } | 7769 | M-x make-frame-on-display RET :1 RET |
| 7783 | #endif | 7770 | |
| 7771 | will indefinitely wait in Xt for events for display `:1', | ||
| 7772 | opened in the first call to make-frame-on-display. | ||
| 7773 | |||
| 7774 | Closing the display is reported to lead to a bus error on | ||
| 7775 | OpenWindows in certain situations. I suspect that is a bug | ||
| 7776 | in OpenWindows. I don't know how to circumvent it here. */ | ||
| 7777 | fatal_error_signal_hook = x_fatal_error_signal; | ||
| 7778 | XtCloseDisplay (dpy); | ||
| 7779 | fatal_error_signal_hook = NULL; | ||
| 7780 | #endif /* USE_X_TOOLKIT */ | ||
| 7784 | 7781 | ||
| 7785 | #ifdef USE_GTK | 7782 | #ifdef USE_GTK |
| 7786 | /* There is a long-standing bug in GTK that prevents the GTK | 7783 | /* A long-standing GTK bug prevents proper disconnect handling |
| 7787 | main loop from recovering gracefully from disconnects | 7784 | (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Once, |
| 7788 | (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Among | 7785 | the resulting Glib error message loop filled a user's disk. |
| 7789 | other problems, this gives rise to a stream of Glib error | 7786 | To avoid this, kill Emacs unconditionally on disconnect. */ |
| 7790 | messages that, in one incident, filled up a user's hard disk | 7787 | shut_down_emacs (0, 0, Qnil); |
| 7791 | (http://lists.gnu.org/archive/html/emacs-devel/2010-10/msg00927.html). | 7788 | fprintf (stderr, "%s\n\ |
| 7792 | So, kill Emacs unconditionally if the display is closed. */ | 7789 | When compiled with GTK, Emacs cannot recover from X disconnects.\n\ |
| 7793 | { | 7790 | This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715\n\ |
| 7794 | fprintf (stderr, "%s\n", error_msg); | 7791 | For details, see etc/PROBLEMS.\n", |
| 7795 | Fkill_emacs (make_number (70)); | 7792 | error_msg); |
| 7796 | abort (); /* NOTREACHED */ | 7793 | abort (); |
| 7797 | } | 7794 | #endif /* USE_GTK */ |
| 7798 | #endif | ||
| 7799 | 7795 | ||
| 7800 | /* Indicate that this display is dead. */ | 7796 | /* Indicate that this display is dead. */ |
| 7801 | dpyinfo->display = 0; | 7797 | dpyinfo->display = 0; |