aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-07-12 20:45:56 -0700
committerPaul Eggert2011-07-12 20:45:56 -0700
commit89bfafe5d3e767c2f014b2738196411f8ba39d28 (patch)
treeb7ac7e72d430cebfc414d143e98a664b113ad4b2 /src
parent5adf60bc2313a220185c9f22d3d539a0dc51b228 (diff)
parentcd18e7e3f49c014b83ffa5f2e4391a58ded6a287 (diff)
downloademacs-89bfafe5d3e767c2f014b2738196411f8ba39d28.tar.gz
emacs-89bfafe5d3e767c2f014b2738196411f8ba39d28.zip
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog40
-rw-r--r--src/alloc.c2
-rw-r--r--src/buffer.c1
-rw-r--r--src/character.c3
-rw-r--r--src/keymap.c8
-rw-r--r--src/window.c3
-rw-r--r--src/xselect.c11
7 files changed, 53 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9513dfd8e64..fd1644c9b98 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -2,8 +2,6 @@
2 2
3 * image.c (png_load): Don't assume height * row_bytes fits in 'int'. 3 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
4 4
52011-07-12 Paul Eggert <eggert@cs.ucla.edu>
6
7 * bidi.c (bidi_dump_cached_states): Use pD to print ptrdiff_t. 5 * bidi.c (bidi_dump_cached_states): Use pD to print ptrdiff_t.
8 6
9 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug. 7 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
@@ -92,8 +90,8 @@
92 * bidi.c: Integer signedness and overflow fixes. 90 * bidi.c: Integer signedness and overflow fixes.
93 (bidi_cache_idx, bidi_cache_last_idx, bidi_cache_fetch_state) 91 (bidi_cache_idx, bidi_cache_last_idx, bidi_cache_fetch_state)
94 (bidi_cache_search, bidi_cache_find_level_change) 92 (bidi_cache_search, bidi_cache_find_level_change)
95 (bidi_cache_iterator_state, bidi_cache_find, bidi_find_other_level_edge) 93 (bidi_cache_iterator_state, bidi_cache_find)
96 (bidi_dump_cached_states): 94 (bidi_find_other_level_edge, bidi_dump_cached_states):
97 Don't arbitrarily limit cache indexes to int; use ptrdiff_t instead. 95 Don't arbitrarily limit cache indexes to int; use ptrdiff_t instead.
98 (bidi_cache_size): Use ptrdiff_t rather than size_t, as we prefer 96 (bidi_cache_size): Use ptrdiff_t rather than size_t, as we prefer
99 signed integers. 97 signed integers.
@@ -166,6 +164,40 @@
166 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally 164 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
167 well either way, and we prefer signed to unsigned. 165 well either way, and we prefer signed to unsigned.
168 166
1672011-07-13 Johan Bockgård <bojohan@gnu.org>
168
169 Fix execution of x selection hooks.
170 * xselect.c (Qx_lost_selection_functions)
171 (Qx_sent_selection_functions): New vars.
172 (syms_of_xselect): DEFSYM them.
173 (x_handle_selection_request): Pass Qx_sent_selection_functions
174 rather than Vx_sent_selection_functions to Frun_hook_with_args.
175 (x_handle_selection_clear,x_clear_frame_selections):
176 Pass Qx_lost_selection_functions rather than
177 Vx_lost_selection_functions to Frun_hook_with_args.
178
1792011-07-13 Paul Eggert <eggert@cs.ucla.edu>
180
181 * buffer.c (Fget_buffer_create): Initialized inhibit_shrinking.
182 The old code sometimes used this field without initializing it.
183
184 * alloc.c (gc_sweep): Don't read past end of array.
185 In theory, the old code could also have corrupted Emacs internals,
186 though it'd be very unlikely.
187
1882011-07-12 Andreas Schwab <schwab@linux-m68k.org>
189
190 * character.c (Fcharacterp): Don't advertise optional ignored
191 argument. (Bug#4026)
192
1932011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
194
195 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
196 key" (bug#4257).
197
198 * window.c (Fset_window_start): Doc fix (bug#4199).
199 (Fset_window_hscroll): Ditto.
200
1692011-07-12 Paul Eggert <eggert@cs.ucla.edu> 2012011-07-12 Paul Eggert <eggert@cs.ucla.edu>
170 202
171 Fix minor new problems caught by GCC 4.6.1. 203 Fix minor new problems caught by GCC 4.6.1.
diff --git a/src/alloc.c b/src/alloc.c
index f325b6ed449..eb356fd0e83 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5753,7 +5753,7 @@ gc_sweep (void)
5753 int ilim = (lim + BITS_PER_INT - 1) / BITS_PER_INT; 5753 int ilim = (lim + BITS_PER_INT - 1) / BITS_PER_INT;
5754 5754
5755 /* Scan the mark bits an int at a time. */ 5755 /* Scan the mark bits an int at a time. */
5756 for (i = 0; i <= ilim; i++) 5756 for (i = 0; i < ilim; i++)
5757 { 5757 {
5758 if (cblk->gcmarkbits[i] == -1) 5758 if (cblk->gcmarkbits[i] == -1)
5759 { 5759 {
diff --git a/src/buffer.c b/src/buffer.c
index 05e96e85112..7a94bc79be0 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -361,6 +361,7 @@ even if it is dead. The return value is never nil. */)
361 BUF_END_UNCHANGED (b) = 0; 361 BUF_END_UNCHANGED (b) = 0;
362 BUF_BEG_UNCHANGED (b) = 0; 362 BUF_BEG_UNCHANGED (b) = 0;
363 *(BUF_GPT_ADDR (b)) = *(BUF_Z_ADDR (b)) = 0; /* Put an anchor '\0'. */ 363 *(BUF_GPT_ADDR (b)) = *(BUF_Z_ADDR (b)) = 0; /* Put an anchor '\0'. */
364 b->text->inhibit_shrinking = 0;
364 365
365 b->newline_cache = 0; 366 b->newline_cache = 0;
366 b->width_run_cache = 0; 367 b->width_run_cache = 0;
diff --git a/src/character.c b/src/character.c
index 7fc5d647ff5..8e9b3e3775e 100644
--- a/src/character.c
+++ b/src/character.c
@@ -258,7 +258,8 @@ multibyte_char_to_unibyte_safe (int c)
258} 258}
259 259
260DEFUN ("characterp", Fcharacterp, Scharacterp, 1, 2, 0, 260DEFUN ("characterp", Fcharacterp, Scharacterp, 1, 2, 0,
261 doc: /* Return non-nil if OBJECT is a character. */) 261 doc: /* Return non-nil if OBJECT is a character.
262usage: (characterp OBJECT) */)
262 (Lisp_Object object, Lisp_Object ignore) 263 (Lisp_Object object, Lisp_Object ignore)
263{ 264{
264 return (CHARACTERP (object) ? Qt : Qnil); 265 return (CHARACTERP (object) ? Qt : Qnil);
diff --git a/src/keymap.c b/src/keymap.c
index d33af68be48..0169276bef9 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -3712,11 +3712,11 @@ the same way. The "active" keymaps in each alist are used before
3712 Vemulation_mode_map_alists = Qnil; 3712 Vemulation_mode_map_alists = Qnil;
3713 3713
3714 DEFVAR_LISP ("where-is-preferred-modifier", Vwhere_is_preferred_modifier, 3714 DEFVAR_LISP ("where-is-preferred-modifier", Vwhere_is_preferred_modifier,
3715 doc: /* Preferred modifier to use for `where-is'. 3715 doc: /* Preferred modifier key to use for `where-is'.
3716When a single binding is requested, `where-is' will return one that 3716When a single binding is requested, `where-is' will return one that
3717uses this modifier if possible. If nil, or if no such binding exists, 3717uses this modifier key if possible. If nil, or if no such binding
3718bindings using keys without modifiers (or only with meta) will be 3718exists, bindings using keys without modifiers (or only with meta) will
3719preferred. */); 3719be preferred. */);
3720 Vwhere_is_preferred_modifier = Qnil; 3720 Vwhere_is_preferred_modifier = Qnil;
3721 where_is_preferred_modifier = 0; 3721 where_is_preferred_modifier = 0;
3722 3722
diff --git a/src/window.c b/src/window.c
index 154efe4a222..e390c13dce0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -683,6 +683,7 @@ WINDOW must be a live window and defaults to the selected one. */)
683 683
684DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0, 684DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0,
685 doc: /* Set number of columns WINDOW is scrolled from left margin to NCOL. 685 doc: /* Set number of columns WINDOW is scrolled from left margin to NCOL.
686If WINDOW is nil, the selected window is used.
686Return NCOL. NCOL should be zero or positive. 687Return NCOL. NCOL should be zero or positive.
687 688
688Note that if `automatic-hscrolling' is non-nil, you cannot scroll the 689Note that if `automatic-hscrolling' is non-nil, you cannot scroll the
@@ -1410,7 +1411,7 @@ Return POS. */)
1410 1411
1411DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0, 1412DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0,
1412 doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. 1413 doc: /* Make display in WINDOW start at position POS in WINDOW's buffer.
1413WINDOW defaults to the selected window. Return POS. 1414If WINDOW is nil, the selected window is used. Return POS.
1414Optional third arg NOFORCE non-nil inhibits next redisplay from 1415Optional third arg NOFORCE non-nil inhibits next redisplay from
1415overriding motion of point in order to display at this exact start. */) 1416overriding motion of point in order to display at this exact start. */)
1416 (Lisp_Object window, Lisp_Object pos, Lisp_Object noforce) 1417 (Lisp_Object window, Lisp_Object pos, Lisp_Object noforce)
diff --git a/src/xselect.c b/src/xselect.c
index 93a5c8bfa02..f63977a73de 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -112,6 +112,7 @@ static Lisp_Object QUTF8_STRING; /* This is a type of selection. */
112static Lisp_Object Qcompound_text_with_extensions; 112static Lisp_Object Qcompound_text_with_extensions;
113 113
114static Lisp_Object Qforeign_selection; 114static Lisp_Object Qforeign_selection;
115static Lisp_Object Qx_lost_selection_functions, Qx_sent_selection_functions;
115 116
116/* If this is a smaller number than the max-request-size of the display, 117/* If this is a smaller number than the max-request-size of the display,
117 emacs will use INCR selection transfer when the selection is larger 118 emacs will use INCR selection transfer when the selection is larger
@@ -855,7 +856,7 @@ x_handle_selection_request (struct input_event *event)
855 && !EQ (Vx_sent_selection_functions, Qunbound)) 856 && !EQ (Vx_sent_selection_functions, Qunbound))
856 { 857 {
857 Lisp_Object args[4]; 858 Lisp_Object args[4];
858 args[0] = Vx_sent_selection_functions; 859 args[0] = Qx_sent_selection_functions;
859 args[1] = selection_symbol; 860 args[1] = selection_symbol;
860 args[2] = target_symbol; 861 args[2] = target_symbol;
861 args[3] = success ? Qt : Qnil; 862 args[3] = success ? Qt : Qnil;
@@ -979,7 +980,7 @@ x_handle_selection_clear (struct input_event *event)
979 /* Run the `x-lost-selection-functions' abnormal hook. */ 980 /* Run the `x-lost-selection-functions' abnormal hook. */
980 { 981 {
981 Lisp_Object args[2]; 982 Lisp_Object args[2];
982 args[0] = Vx_lost_selection_functions; 983 args[0] = Qx_lost_selection_functions;
983 args[1] = selection_symbol; 984 args[1] = selection_symbol;
984 Frun_hook_with_args (2, args); 985 Frun_hook_with_args (2, args);
985 } 986 }
@@ -1020,7 +1021,7 @@ x_clear_frame_selections (FRAME_PTR f)
1020 { 1021 {
1021 /* Run the `x-lost-selection-functions' abnormal hook. */ 1022 /* Run the `x-lost-selection-functions' abnormal hook. */
1022 Lisp_Object args[2]; 1023 Lisp_Object args[2];
1023 args[0] = Vx_lost_selection_functions; 1024 args[0] = Qx_lost_selection_functions;
1024 args[1] = Fcar (Fcar (t->Vselection_alist)); 1025 args[1] = Fcar (Fcar (t->Vselection_alist));
1025 Frun_hook_with_args (2, args); 1026 Frun_hook_with_args (2, args);
1026 1027
@@ -1033,7 +1034,7 @@ x_clear_frame_selections (FRAME_PTR f)
1033 && EQ (frame, XCAR (XCDR (XCDR (XCDR (XCAR (XCDR (rest)))))))) 1034 && EQ (frame, XCAR (XCDR (XCDR (XCDR (XCAR (XCDR (rest))))))))
1034 { 1035 {
1035 Lisp_Object args[2]; 1036 Lisp_Object args[2];
1036 args[0] = Vx_lost_selection_functions; 1037 args[0] = Qx_lost_selection_functions;
1037 args[1] = XCAR (XCAR (XCDR (rest))); 1038 args[1] = XCAR (XCAR (XCDR (rest)));
1038 Frun_hook_with_args (2, args); 1039 Frun_hook_with_args (2, args);
1039 XSETCDR (rest, XCDR (XCDR (rest))); 1040 XSETCDR (rest, XCDR (XCDR (rest)));
@@ -2682,4 +2683,6 @@ A value of 0 means wait as long as necessary. This is initialized from the
2682 DEFSYM (QNULL, "NULL"); 2683 DEFSYM (QNULL, "NULL");
2683 DEFSYM (Qcompound_text_with_extensions, "compound-text-with-extensions"); 2684 DEFSYM (Qcompound_text_with_extensions, "compound-text-with-extensions");
2684 DEFSYM (Qforeign_selection, "foreign-selection"); 2685 DEFSYM (Qforeign_selection, "foreign-selection");
2686 DEFSYM (Qx_lost_selection_functions, "x-lost-selection-functions");
2687 DEFSYM (Qx_sent_selection_functions, "x-sent-selection-functions");
2685} 2688}