aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2012-04-27 11:10:38 +0800
committerChong Yidong2012-04-27 11:10:38 +0800
commita8e7d6d783219972c08fd49a3a2afaf26eb139c2 (patch)
tree5e86d23d9285389791dc8321d8a8a2ece2247bea /src
parentb360839071ef6c7a9e917fe57a4aaeb39138e8c0 (diff)
parentc5bb756916baa63cc663d68d4c24e5ad33a764e8 (diff)
downloademacs-a8e7d6d783219972c08fd49a3a2afaf26eb139c2.tar.gz
emacs-a8e7d6d783219972c08fd49a3a2afaf26eb139c2.zip
Merge changes from emacs-24 branch
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog27
-rw-r--r--src/dispnew.c12
-rw-r--r--src/fileio.c12
-rw-r--r--src/keymap.c17
-rw-r--r--src/window.c5
-rw-r--r--src/xdisp.c5
-rw-r--r--src/xselect.c1
7 files changed, 66 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index df0e6135498..55caf3c607c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,30 @@
12012-04-27 Chong Yidong <cyd@gnu.org>
2
3 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
4
52012-04-27 Eli Zaretskii <eliz@gnu.org>
6
7 * xdisp.c (pos_visible_p): If the window start position is beyond
8 ZV, start the display from buffer beginning. Prevents assertion
9 violation in init_iterator when the minibuffer window is scrolled
10 via the scroll bar.
11
12 * window.c (window_scroll_pixel_based): Likewise.
13
142012-04-27 Chong Yidong <cyd@gnu.org>
15
16 * keymap.c (where_is_internal): Doc fix (Bug#10872).
17
182012-04-27 Glenn Morris <rgm@gnu.org>
19
20 * fileio.c (Fcopy_file, Fset_file_selinux_context):
21 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
22
232012-04-27 Eli Zaretskii <eliz@gnu.org>
24
25 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers): Don't
26 overrun array limits of glyph row's used[] array. (Bug#11288)
27
12012-04-26 Eli Zaretskii <eliz@gnu.org> 282012-04-26 Eli Zaretskii <eliz@gnu.org>
2 29
3 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded 30 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
diff --git a/src/dispnew.c b/src/dispnew.c
index 02d6de53bbf..b313852efe2 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1085,12 +1085,16 @@ swap_glyph_pointers (struct glyph_row *a, struct glyph_row *b)
1085 for (i = 0; i < LAST_AREA + 1; ++i) 1085 for (i = 0; i < LAST_AREA + 1; ++i)
1086 { 1086 {
1087 struct glyph *temp = a->glyphs[i]; 1087 struct glyph *temp = a->glyphs[i];
1088 short used_tem = a->used[i];
1089 1088
1090 a->glyphs[i] = b->glyphs[i]; 1089 a->glyphs[i] = b->glyphs[i];
1091 b->glyphs[i] = temp; 1090 b->glyphs[i] = temp;
1092 a->used[i] = b->used[i]; 1091 if (i < LAST_AREA)
1093 b->used[i] = used_tem; 1092 {
1093 short used_tem = a->used[i];
1094
1095 a->used[i] = b->used[i];
1096 b->used[i] = used_tem;
1097 }
1094 } 1098 }
1095 a->hash = b->hash; 1099 a->hash = b->hash;
1096 b->hash = hash_tem; 1100 b->hash = hash_tem;
@@ -1105,7 +1109,7 @@ static inline void
1105copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from) 1109copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from)
1106{ 1110{
1107 struct glyph *pointers[1 + LAST_AREA]; 1111 struct glyph *pointers[1 + LAST_AREA];
1108 short used[1 + LAST_AREA]; 1112 short used[LAST_AREA];
1109 unsigned hashval; 1113 unsigned hashval;
1110 1114
1111 /* Save glyph pointers of TO. */ 1115 /* Save glyph pointers of TO. */
diff --git a/src/fileio.c b/src/fileio.c
index 3a74672b9a6..69b2c9cb0f2 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1,6 +1,6 @@
1/* File IO for GNU Emacs. 1/* File IO for GNU Emacs.
2 2
3Copyright (C) 1985-1988, 1993-2012 Free Software Foundation, Inc. 3Copyright (C) 1985-1988, 1993-2012 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -2044,9 +2044,10 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */)
2044#if HAVE_LIBSELINUX 2044#if HAVE_LIBSELINUX
2045 if (conlength > 0) 2045 if (conlength > 0)
2046 { 2046 {
2047 /* Set the modified context back to the file. */ 2047 /* Set the modified context back to the file. */
2048 fail = fsetfilecon (ofd, con); 2048 fail = fsetfilecon (ofd, con);
2049 if (fail) 2049 /* See http://debbugs.gnu.org/11245 for ENOTSUP. */
2050 if (fail && errno != ENOTSUP)
2050 report_file_error ("Doing fsetfilecon", Fcons (newname, Qnil)); 2051 report_file_error ("Doing fsetfilecon", Fcons (newname, Qnil));
2051 2052
2052 freecon (con); 2053 freecon (con);
@@ -2917,10 +2918,11 @@ compiled with SELinux support. */)
2917 error ("Doing context_range_set"); 2918 error ("Doing context_range_set");
2918 } 2919 }
2919 2920
2920 /* Set the modified context back to the file. */ 2921 /* Set the modified context back to the file. */
2921 fail = lsetfilecon (SSDATA (encoded_absname), 2922 fail = lsetfilecon (SSDATA (encoded_absname),
2922 context_str (parsed_con)); 2923 context_str (parsed_con));
2923 if (fail) 2924 /* See http://debbugs.gnu.org/11245 for ENOTSUP. */
2925 if (fail && errno != ENOTSUP)
2924 report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil)); 2926 report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil));
2925 2927
2926 context_free (parsed_con); 2928 context_free (parsed_con);
diff --git a/src/keymap.c b/src/keymap.c
index ecaeb32896e..9f82175edc0 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2553,7 +2553,8 @@ where_is_internal (Lisp_Object definition, Lisp_Object keymaps,
2553DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0, 2553DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0,
2554 doc: /* Return list of keys that invoke DEFINITION. 2554 doc: /* Return list of keys that invoke DEFINITION.
2555If KEYMAP is a keymap, search only KEYMAP and the global keymap. 2555If KEYMAP is a keymap, search only KEYMAP and the global keymap.
2556If KEYMAP is nil, search all the currently active keymaps. 2556If KEYMAP is nil, search all the currently active keymaps, except
2557 for `overriding-local-map' (which is ignored).
2557If KEYMAP is a list of keymaps, search only those keymaps. 2558If KEYMAP is a list of keymaps, search only those keymaps.
2558 2559
2559If optional 3rd arg FIRSTONLY is non-nil, return the first key sequence found, 2560If optional 3rd arg FIRSTONLY is non-nil, return the first key sequence found,
@@ -2568,9 +2569,17 @@ If optional 4th arg NOINDIRECT is non-nil, don't follow indirections
2568to other keymaps or slots. This makes it possible to search for an 2569to other keymaps or slots. This makes it possible to search for an
2569indirect definition itself. 2570indirect definition itself.
2570 2571
2571If optional 5th arg NO-REMAP is non-nil, don't search for key sequences 2572The optional 5th arg NO-REMAP alters how command remapping is handled:
2572that invoke a command which is remapped to DEFINITION, but include the 2573
2573remapped command in the returned list. */) 2574- If another command OTHER-COMMAND is remapped to DEFINITION, normally
2575 search for the bindings of OTHER-COMMAND and include them in the
2576 returned list. But if NO-REMAP is non-nil, include the vector
2577 [remap OTHER-COMMAND] in the returned list instead, without
2578 searching for those other bindings.
2579
2580- If DEFINITION is remapped to OTHER-COMMAND, normally return the
2581 bindings for OTHER-COMMAND. But if NO-REMAP is non-nil, return the
2582 bindings for DEFINITION instead, ignoring its remapping. */)
2574 (Lisp_Object definition, Lisp_Object keymap, Lisp_Object firstonly, Lisp_Object noindirect, Lisp_Object no_remap) 2583 (Lisp_Object definition, Lisp_Object keymap, Lisp_Object firstonly, Lisp_Object noindirect, Lisp_Object no_remap)
2575{ 2584{
2576 /* The keymaps in which to search. */ 2585 /* The keymaps in which to search. */
diff --git a/src/window.c b/src/window.c
index 1f27cba444b..048779d6830 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4221,6 +4221,11 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror)
4221 void *itdata = NULL; 4221 void *itdata = NULL;
4222 4222
4223 SET_TEXT_POS_FROM_MARKER (start, w->start); 4223 SET_TEXT_POS_FROM_MARKER (start, w->start);
4224 /* Scrolling a minibuffer window via scroll bar when the echo area
4225 shows long text sometimes resets the minibuffer contents behind
4226 our backs. */
4227 if (CHARPOS (start) > ZV)
4228 SET_TEXT_POS (start, BEGV, BEGV_BYTE);
4224 4229
4225 /* If PT is not visible in WINDOW, move back one half of 4230 /* If PT is not visible in WINDOW, move back one half of
4226 the screen. Allow PT to be partially visible, otherwise 4231 the screen. Allow PT to be partially visible, otherwise
diff --git a/src/xdisp.c b/src/xdisp.c
index f2700bd6d25..307331627f5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1275,6 +1275,11 @@ pos_visible_p (struct window *w, EMACS_INT charpos, int *x, int *y,
1275 } 1275 }
1276 1276
1277 SET_TEXT_POS_FROM_MARKER (top, w->start); 1277 SET_TEXT_POS_FROM_MARKER (top, w->start);
1278 /* Scrolling a minibuffer window via scroll bar when the echo area
1279 shows long text sometimes resets the minibuffer contents behind
1280 our backs. */
1281 if (CHARPOS (top) > ZV)
1282 SET_TEXT_POS (top, BEGV, BEGV_BYTE);
1278 1283
1279 /* Compute exact mode line heights. */ 1284 /* Compute exact mode line heights. */
1280 if (WINDOW_WANTS_MODELINE_P (w)) 1285 if (WINDOW_WANTS_MODELINE_P (w))
diff --git a/src/xselect.c b/src/xselect.c
index 173cf78bdaa..15ce8d487fa 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -931,6 +931,7 @@ x_convert_selection (struct input_event *event, Lisp_Object selection_symbol,
931 931
932 /* Otherwise, record the converted selection to binary. */ 932 /* Otherwise, record the converted selection to binary. */
933 cs = xmalloc (sizeof (struct selection_data)); 933 cs = xmalloc (sizeof (struct selection_data));
934 cs->data = NULL;
934 cs->nofree = 1; 935 cs->nofree = 1;
935 cs->property = property; 936 cs->property = property;
936 cs->wait_object = NULL; 937 cs->wait_object = NULL;