aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog50
-rw-r--r--src/buffer.c6
-rw-r--r--src/editfns.c7
-rw-r--r--src/eval.c8
-rw-r--r--src/frame.c49
-rw-r--r--src/gtkutil.c5
-rw-r--r--src/keymap.c5
-rw-r--r--src/lisp.h1
-rw-r--r--src/window.c7
-rw-r--r--src/window.h4
-rw-r--r--src/xfns.c7
11 files changed, 92 insertions, 57 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ef57223b9ca..1ec148b30c8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,37 @@
12012-03-12 Paul Eggert <eggert@cs.ucla.edu>
2
3 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
4
52012-03-12 Chong Yidong <cyd@gnu.org>
6
7 * eval.c (inhibit_lisp_code): Rename from
8 inhibit_window_configuration_change_hook; move from window.c.
9
10 * xfns.c (unwind_create_frame_1, Fx_create_frame):
11 * window.c (run_window_configuration_change_hook)
12 (syms_of_window): Callers changed.
13
142012-03-11 Chong Yidong <cyd@gnu.org>
15
16 * keymap.c (Fkey_description): Doc fix (Bug#9700).
17
18 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
19
202012-03-10 Chong Yidong <cyd@gnu.org>
21
22 * frame.c (other_visible_frames): Don't assume the selected frame
23 is visible (Bug#10955).
24
252012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
26
27 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
28
292012-03-08 Jan Djärv <jan.h.d@swipnet.se>
30
31 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
32 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
33 zero (Bug#10954).
34
12012-03-03 Glenn Morris <rgm@gnu.org> 352012-03-03 Glenn Morris <rgm@gnu.org>
2 36
3 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes. 37 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
@@ -195,8 +229,8 @@
195 229
1962012-02-04 Eli Zaretskii <eliz@gnu.org> 2302012-02-04 Eli Zaretskii <eliz@gnu.org>
197 231
198 * w32.c (get_emacs_configuration_options): Include 232 * w32.c (get_emacs_configuration_options):
199 --enable-checking, if specified, in the return value. 233 Include --enable-checking, if specified, in the return value.
200 234
2012012-02-04 Martin Rudalics <rudalics@gmx.at> 2352012-02-04 Martin Rudalics <rudalics@gmx.at>
202 236
@@ -302,8 +336,8 @@
3022012-01-19 Martin Rudalics <rudalics@gmx.at> 3362012-01-19 Martin Rudalics <rudalics@gmx.at>
303 337
304 * window.c (save_window_save, Fcurrent_window_configuration) 338 * window.c (save_window_save, Fcurrent_window_configuration)
305 (Vwindow_persistent_parameters): Do not use Qstate. Rewrite 339 (Vwindow_persistent_parameters): Do not use Qstate.
306 doc-strings. 340 Rewrite doc-strings.
307 341
3082012-01-19 Kenichi Handa <handa@m17n.org> 3422012-01-19 Kenichi Handa <handa@m17n.org>
309 343
@@ -477,9 +511,9 @@
477 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define. 511 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
478 (symbol_to_nsstring): Fix indentation. 512 (symbol_to_nsstring): Fix indentation.
479 (ns_symbol_to_pb): New function. 513 (ns_symbol_to_pb): New function.
480 (Fns_get_selection_internal): Renamed from Fns_get_cut_buffer_internal. 514 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
481 (Fns_rotate_cut_buffers_internal): Removed. 515 (Fns_rotate_cut_buffers_internal): Remove.
482 (Fns_store_selection_internal): Renamed from 516 (Fns_store_selection_internal): Rename from
483 Fns_store_cut_buffer_internal. 517 Fns_store_cut_buffer_internal.
484 (ns_get_foreign_selection, Fx_own_selection_internal) 518 (ns_get_foreign_selection, Fx_own_selection_internal)
485 (Fx_disown_selection_internal, Fx_selection_exists_p) 519 (Fx_disown_selection_internal, Fx_selection_exists_p)
@@ -620,7 +654,7 @@
620 (coding_set_destination): Return how many bytes 654 (coding_set_destination): Return how many bytes
621 coding->destination was relocated. 655 coding->destination was relocated.
622 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET) 656 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
623 (CODING_CHAR_CHARSET_P): Adjusted for the avove changes. 657 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
624 658
6252011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change) 6592011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
626 660
diff --git a/src/buffer.c b/src/buffer.c
index 1577254d92a..1fea19b0d65 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2864,6 +2864,12 @@ compare_overlays (const void *v1, const void *v2)
2864 return s1->beg < s2->beg ? -1 : 1; 2864 return s1->beg < s2->beg ? -1 : 1;
2865 if (s1->end != s2->end) 2865 if (s1->end != s2->end)
2866 return s2->end < s1->end ? -1 : 1; 2866 return s2->end < s1->end ? -1 : 1;
2867 /* Avoid the non-determinism of qsort by choosing an arbitrary ordering
2868 between "equal" overlays. The result can still change between
2869 invocations of Emacs, but it won't change in the middle of
2870 `find_field' (bug#6830). */
2871 if (XHASH (s1->overlay) != XHASH (s2->overlay))
2872 return XHASH (s1->overlay) < XHASH (s2->overlay) ? -1 : 1;
2867 return 0; 2873 return 0;
2868} 2874}
2869 2875
diff --git a/src/editfns.c b/src/editfns.c
index bbeb5033664..a41565d8588 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -663,10 +663,11 @@ is after LIMIT, then LIMIT will be returned instead. */)
663 663
664DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, 664DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0,
665 doc: /* Return the position closest to NEW-POS that is in the same field as OLD-POS. 665 doc: /* Return the position closest to NEW-POS that is in the same field as OLD-POS.
666
667A field is a region of text with the same `field' property. 666A field is a region of text with the same `field' property.
668If NEW-POS is nil, then the current point is used instead, and set to the 667
669constrained position if that is different. 668If NEW-POS is nil, then use the current point instead, and move point
669to the resulting constrained position, in addition to returning that
670position.
670 671
671If OLD-POS is at the boundary of two fields, then the allowable 672If OLD-POS is at the boundary of two fields, then the allowable
672positions for NEW-POS depends on the value of the optional argument 673positions for NEW-POS depends on the value of the optional argument
diff --git a/src/eval.c b/src/eval.c
index 344228741cb..4a3f5083b3b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -124,6 +124,12 @@ Lisp_Object Vsignaling_function;
124 124
125int handling_signal; 125int handling_signal;
126 126
127/* If non-nil, Lisp code must not be run since some part of Emacs is
128 in an inconsistent state. Currently, x-create-frame uses this to
129 avoid triggering window-configuration-change-hook while the new
130 frame is half-initialized. */
131Lisp_Object inhibit_lisp_code;
132
127static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); 133static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *);
128static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; 134static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN;
129static int interactive_p (int); 135static int interactive_p (int);
@@ -3766,6 +3772,8 @@ alist of active lexical bindings. */);
3766 staticpro (&Vsignaling_function); 3772 staticpro (&Vsignaling_function);
3767 Vsignaling_function = Qnil; 3773 Vsignaling_function = Qnil;
3768 3774
3775 inhibit_lisp_code = Qnil;
3776
3769 defsubr (&Sor); 3777 defsubr (&Sor);
3770 defsubr (&Sand); 3778 defsubr (&Sand);
3771 defsubr (&Sif); 3779 defsubr (&Sif);
diff --git a/src/frame.c b/src/frame.c
index 8505398a260..1db24cc80e7 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1118,41 +1118,32 @@ Otherwise, include all frames. */)
1118static int 1118static int
1119other_visible_frames (FRAME_PTR f) 1119other_visible_frames (FRAME_PTR f)
1120{ 1120{
1121 /* We know the selected frame is visible, 1121 Lisp_Object frames;
1122 so if F is some other frame, it can't be the sole visible one. */
1123 if (f == SELECTED_FRAME ())
1124 {
1125 Lisp_Object frames;
1126 int count = 0;
1127 1122
1128 for (frames = Vframe_list; 1123 for (frames = Vframe_list; CONSP (frames); frames = XCDR (frames))
1129 CONSP (frames); 1124 {
1130 frames = XCDR (frames)) 1125 Lisp_Object this = XCAR (frames);
1131 { 1126 if (f == XFRAME (this))
1132 Lisp_Object this; 1127 continue;
1133 1128
1134 this = XCAR (frames); 1129 /* Verify that we can still talk to the frame's X window,
1135 /* Verify that the frame's window still exists 1130 and note any recent change in visibility. */
1136 and we can still talk to it. And note any recent change
1137 in visibility. */
1138#ifdef HAVE_WINDOW_SYSTEM 1131#ifdef HAVE_WINDOW_SYSTEM
1139 if (FRAME_WINDOW_P (XFRAME (this))) 1132 if (FRAME_WINDOW_P (XFRAME (this)))
1140 { 1133 {
1141 x_sync (XFRAME (this)); 1134 x_sync (XFRAME (this));
1142 FRAME_SAMPLE_VISIBILITY (XFRAME (this)); 1135 FRAME_SAMPLE_VISIBILITY (XFRAME (this));
1143 } 1136 }
1144#endif 1137#endif
1145 1138
1146 if (FRAME_VISIBLE_P (XFRAME (this)) 1139 if (FRAME_VISIBLE_P (XFRAME (this))
1147 || FRAME_ICONIFIED_P (XFRAME (this)) 1140 || FRAME_ICONIFIED_P (XFRAME (this))
1148 /* Allow deleting the terminal frame when at least 1141 /* Allow deleting the terminal frame when at least one X
1149 one X frame exists! */ 1142 frame exists. */
1150 || (FRAME_WINDOW_P (XFRAME (this)) && !FRAME_WINDOW_P (f))) 1143 || (FRAME_WINDOW_P (XFRAME (this)) && !FRAME_WINDOW_P (f)))
1151 count++; 1144 return 1;
1152 }
1153 return count > 1;
1154 } 1145 }
1155 return 1; 1146 return 0;
1156} 1147}
1157 1148
1158/* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME 1149/* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 1ed5833bd5c..4dbef65dedf 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1304,10 +1304,13 @@ x_wm_set_size_hint (FRAME_PTR f, long int flags, int user_position)
1304 1304
1305 hint_flags |= GDK_HINT_BASE_SIZE; 1305 hint_flags |= GDK_HINT_BASE_SIZE;
1306 base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0) + FRAME_TOOLBAR_WIDTH (f); 1306 base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0) + FRAME_TOOLBAR_WIDTH (f);
1307 base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0) 1307 /* Use one row here so base_height does not become zero.
1308 Gtk+ and/or Unity on Ubuntu 12.04 can't handle it. */
1309 base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
1308 + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f); 1310 + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
1309 1311
1310 check_frame_size (f, &min_rows, &min_cols); 1312 check_frame_size (f, &min_rows, &min_cols);
1313 if (min_rows > 0) --min_rows; /* We used one row in base_height = ... 1); */
1311 1314
1312 size_hints.base_width = base_width; 1315 size_hints.base_width = base_width;
1313 size_hints.base_height = base_height; 1316 size_hints.base_height = base_height;
diff --git a/src/keymap.c b/src/keymap.c
index 0ae055213c3..ecaeb32896e 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2043,8 +2043,9 @@ static Lisp_Object Qsingle_key_description, Qkey_description;
2043DEFUN ("key-description", Fkey_description, Skey_description, 1, 2, 0, 2043DEFUN ("key-description", Fkey_description, Skey_description, 1, 2, 0,
2044 doc: /* Return a pretty description of key-sequence KEYS. 2044 doc: /* Return a pretty description of key-sequence KEYS.
2045Optional arg PREFIX is the sequence of keys leading up to KEYS. 2045Optional arg PREFIX is the sequence of keys leading up to KEYS.
2046Control characters turn into "C-foo" sequences, meta into "M-foo", 2046For example, [?\C-x ?l] is converted into the string \"C-x l\".
2047spaces are put between sequence elements, etc. */) 2047
2048The `kbd' macro is an approximate inverse of this. */)
2048 (Lisp_Object keys, Lisp_Object prefix) 2049 (Lisp_Object keys, Lisp_Object prefix)
2049{ 2050{
2050 int len = 0; 2051 int len = 0;
diff --git a/src/lisp.h b/src/lisp.h
index f2177ad789d..678c48e8ff3 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2941,6 +2941,7 @@ extern Lisp_Object Qinhibit_quit, Qclosure;
2941extern Lisp_Object Qand_rest; 2941extern Lisp_Object Qand_rest;
2942extern Lisp_Object Vautoload_queue; 2942extern Lisp_Object Vautoload_queue;
2943extern Lisp_Object Vsignaling_function; 2943extern Lisp_Object Vsignaling_function;
2944extern Lisp_Object inhibit_lisp_code;
2944extern int handling_signal; 2945extern int handling_signal;
2945#if BYTE_MARK_STACK 2946#if BYTE_MARK_STACK
2946extern struct catchtag *catchlist; 2947extern struct catchtag *catchlist;
diff --git a/src/window.c b/src/window.c
index df315a2366c..2a9d308b836 100644
--- a/src/window.c
+++ b/src/window.c
@@ -124,9 +124,6 @@ static int window_initialized;
124/* Hook to run when window config changes. */ 124/* Hook to run when window config changes. */
125static Lisp_Object Qwindow_configuration_change_hook; 125static Lisp_Object Qwindow_configuration_change_hook;
126 126
127/* If non-nil, run_window_configuration_change_hook does nothing. */
128Lisp_Object inhibit_window_configuration_change_hook;
129
130/* Used by the function window_scroll_pixel_based */ 127/* Used by the function window_scroll_pixel_based */
131static int window_scroll_pixel_based_preserve_x; 128static int window_scroll_pixel_based_preserve_x;
132static int window_scroll_pixel_based_preserve_y; 129static int window_scroll_pixel_based_preserve_y;
@@ -2899,7 +2896,7 @@ run_window_configuration_change_hook (struct frame *f)
2899 = Fdefault_value (Qwindow_configuration_change_hook); 2896 = Fdefault_value (Qwindow_configuration_change_hook);
2900 XSETFRAME (frame, f); 2897 XSETFRAME (frame, f);
2901 2898
2902 if (NILP (Vrun_hooks) || !NILP (inhibit_window_configuration_change_hook)) 2899 if (NILP (Vrun_hooks) || !NILP (inhibit_lisp_code))
2903 return; 2900 return;
2904 2901
2905 /* Use the right buffer. Matters when running the local hooks. */ 2902 /* Use the right buffer. Matters when running the local hooks. */
@@ -6532,8 +6529,6 @@ syms_of_window (void)
6532 window_scroll_preserve_hpos = -1; 6529 window_scroll_preserve_hpos = -1;
6533 window_scroll_preserve_vpos = -1; 6530 window_scroll_preserve_vpos = -1;
6534 6531
6535 inhibit_window_configuration_change_hook = Qnil;
6536
6537 DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function, 6532 DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
6538 doc: /* Non-nil means call as function to display a help buffer. 6533 doc: /* Non-nil means call as function to display a help buffer.
6539The function is called with one argument, the buffer to be displayed. 6534The function is called with one argument, the buffer to be displayed.
diff --git a/src/window.h b/src/window.h
index f4a5f52b9a5..ea127ca95a8 100644
--- a/src/window.h
+++ b/src/window.h
@@ -810,10 +810,6 @@ extern Lisp_Object Vmouse_window;
810 810
811extern Lisp_Object Vmouse_event; 811extern Lisp_Object Vmouse_event;
812 812
813/* If non-nil, run_window_configuration_change_hook does nothing. */
814
815extern Lisp_Object inhibit_window_configuration_change_hook;
816
817EXFUN (Fnext_window, 3); 813EXFUN (Fnext_window, 3);
818EXFUN (Fselect_window, 2); 814EXFUN (Fselect_window, 2);
819EXFUN (Fset_window_buffer, 3); 815EXFUN (Fset_window_buffer, 3);
diff --git a/src/xfns.c b/src/xfns.c
index 6fcd129e4a4..6f08ada1bb9 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2952,7 +2952,7 @@ unwind_create_frame (Lisp_Object frame)
2952static Lisp_Object 2952static Lisp_Object
2953unwind_create_frame_1 (Lisp_Object val) 2953unwind_create_frame_1 (Lisp_Object val)
2954{ 2954{
2955 inhibit_window_configuration_change_hook = val; 2955 inhibit_lisp_code = val;
2956 return Qnil; 2956 return Qnil;
2957} 2957}
2958 2958
@@ -3337,9 +3337,8 @@ This function is an internal primitive--use `make-frame' instead. */)
3337 Vframe_list. */ 3337 Vframe_list. */
3338 { 3338 {
3339 int count2 = SPECPDL_INDEX (); 3339 int count2 = SPECPDL_INDEX ();
3340 record_unwind_protect (unwind_create_frame_1, 3340 record_unwind_protect (unwind_create_frame_1, inhibit_lisp_code);
3341 inhibit_window_configuration_change_hook); 3341 inhibit_lisp_code = Qt;
3342 inhibit_window_configuration_change_hook = Qt;
3343 3342
3344 x_default_parameter (f, parms, Qmenu_bar_lines, 3343 x_default_parameter (f, parms, Qmenu_bar_lines,
3345 NILP (Vmenu_bar_mode) 3344 NILP (Vmenu_bar_mode)