aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark A. Hershberger2010-01-24 23:52:26 -0500
committerMark A. Hershberger2010-01-24 23:52:26 -0500
commitb1bb0a2570b8a40017220097c40c6057cfe17efe (patch)
treed308182f02f1d459ea9a21c31a8ca8b0f3b4f787 /src
parentaaef4f91fad60716fa070b912d71b9f1ccd2e7b4 (diff)
parent8dc1adf681df162bfd305debef0e1ab31bed3ebd (diff)
downloademacs-b1bb0a2570b8a40017220097c40c6057cfe17efe.tar.gz
emacs-b1bb0a2570b8a40017220097c40c6057cfe17efe.zip
merge conflict
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog56
-rw-r--r--src/alloc.c10
-rw-r--r--src/coding.c3
-rw-r--r--src/filelock.c2
-rw-r--r--src/image.c14
-rw-r--r--src/keymap.c43
-rw-r--r--src/lisp.h2
-rw-r--r--src/lread.c2
-rw-r--r--src/xdisp.c3
9 files changed, 97 insertions, 38 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3832808dc09..3a62f0a2a17 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,52 @@
12010-01-24 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 Try and fix bug#788, hopefully for real this time.
4 * keymap.c (shadow_lookup): Add `remap' arg.
5 (describe_map, describe_vector): Update calls to shadow_lookup.
6 (Fwhere_is_internal): Fix up handling of `remapped_sequences' and
7 `remapped' so this flag is applicable to `sequence'. Be careful to
8 perform remapping during shadow_lookup check of remapped_sequences.
9
102010-01-24 Eric Bélanger <snowmaniscool@gmail.com> (tiny change)
11
12 * image.c (png_load): Use png_sig_cmp instead of the obsolete
13 png_check_sig, which has been removed in libpng 1.4.
14
152010-01-23 Giorgos Keramidas <keramida@ceid.upatras.gr> (tiny change)
16
17 * filelock.c: Include utmp.h only when HAVE_UTMP_H (FreeBSD 9.x
18 lacks this header file).
19
202010-01-23 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
21
22 * xdisp.c (draw_glyphs): Update `start' for left_overwritten case
23 as in Emacs 22.
24
252010-01-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
26
27 * lisp.h (make_pure_string): String pointer arg now points to const.
28
29 * alloc.c (find_string_data_in_pure, make_pure_string): String pointer
30 args now point to const.
31
322010-01-22 Eli Zaretskii <eliz@gnu.org>
33
34 * lread.c (Fload): Don't treat files without .elc extension as
35 byte-compiled if they are ``magic'', i.e. `openp' returned -2 for
36 them. (bug#5303)
37
382010-01-20 Kenichi Handa <handa@m17n.org>
39
40 * coding.c (consume_chars): If ! multibyte and the encoder is ccl,
41 treat the source as actual byte sequence.
42
432010-01-19 Alan Mackenzie <acm@muc.de>
44
45 Fix spurious before-change-functions invocation from (insert ?\n).
46 * textprop.c (set_text_properties): rename parameter
47 `signal_after_change_p' to `coherent_change_p', and make the
48 invocation of `modify_region' conditional on it.
49
12010-01-19 Jan Djärv <jan.h.d@swipnet.se> 502010-01-19 Jan Djärv <jan.h.d@swipnet.se>
2 51
3 * xsettings.c (apply_xft_settings): Save settings in Vxft_settings 52 * xsettings.c (apply_xft_settings): Save settings in Vxft_settings
@@ -182,13 +231,6 @@
182 * dispnew.c (change_frame_size_1): newwidth == FRAME_COLS (f) must 231 * dispnew.c (change_frame_size_1): newwidth == FRAME_COLS (f) must
183 also be true before we can return early (bug #5339). 232 also be true before we can return early (bug #5339).
184 233
1852010-01-08 Alan Mackenzie <acm@muc.de>
186
187 Fix spurious before-change-functions invocation from (insert ?\n).
188 * textprop.c (set_text_properties): rename parameter
189 `signal_after_change_p' to `coherent_change_p', and make the
190 invocation of `modify_region' conditional on it.
191
1922010-01-06 David Reitter <david.reitter@gmail.com> 2342010-01-06 David Reitter <david.reitter@gmail.com>
193 235
194 * nsfns.m (ns_get_screen): Rewrite, returning NULL for non-NS. 236 * nsfns.m (ns_get_screen): Rewrite, returning NULL for non-NS.
diff --git a/src/alloc.c b/src/alloc.c
index 3c48f8762f8..9a935cc8952 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4725,11 +4725,11 @@ check_pure_size ()
4725 4725
4726static char * 4726static char *
4727find_string_data_in_pure (data, nbytes) 4727find_string_data_in_pure (data, nbytes)
4728 char *data; 4728 const char *data;
4729 int nbytes; 4729 int nbytes;
4730{ 4730{
4731 int i, skip, bm_skip[256], last_char_skip, infinity, start, start_max; 4731 int i, skip, bm_skip[256], last_char_skip, infinity, start, start_max;
4732 unsigned char *p; 4732 const unsigned char *p;
4733 char *non_lisp_beg; 4733 char *non_lisp_beg;
4734 4734
4735 if (pure_bytes_used_non_lisp < nbytes + 1) 4735 if (pure_bytes_used_non_lisp < nbytes + 1)
@@ -4740,7 +4740,7 @@ find_string_data_in_pure (data, nbytes)
4740 for (i = 0; i < 256; i++) 4740 for (i = 0; i < 256; i++)
4741 bm_skip[i] = skip; 4741 bm_skip[i] = skip;
4742 4742
4743 p = (unsigned char *) data; 4743 p = (const unsigned char *) data;
4744 while (--skip > 0) 4744 while (--skip > 0)
4745 bm_skip[*p++] = skip; 4745 bm_skip[*p++] = skip;
4746 4746
@@ -4754,7 +4754,7 @@ find_string_data_in_pure (data, nbytes)
4754 infinity = pure_bytes_used_non_lisp + 1; 4754 infinity = pure_bytes_used_non_lisp + 1;
4755 bm_skip['\0'] = infinity; 4755 bm_skip['\0'] = infinity;
4756 4756
4757 p = (unsigned char *) non_lisp_beg + nbytes; 4757 p = (const unsigned char *) non_lisp_beg + nbytes;
4758 start = 0; 4758 start = 0;
4759 do 4759 do
4760 { 4760 {
@@ -4796,7 +4796,7 @@ find_string_data_in_pure (data, nbytes)
4796 4796
4797Lisp_Object 4797Lisp_Object
4798make_pure_string (data, nchars, nbytes, multibyte) 4798make_pure_string (data, nchars, nbytes, multibyte)
4799 char *data; 4799 const char *data;
4800 int nchars, nbytes; 4800 int nchars, nbytes;
4801 int multibyte; 4801 int multibyte;
4802{ 4802{
diff --git a/src/coding.c b/src/coding.c
index b3a51eb0c4c..935d32e6a58 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -7417,7 +7417,8 @@ consume_chars (coding, translation_table, max_lookup)
7417 { 7417 {
7418 EMACS_INT bytes; 7418 EMACS_INT bytes;
7419 7419
7420 if (coding->encoder == encode_coding_raw_text) 7420 if (coding->encoder == encode_coding_raw_text
7421 || coding->encoder == encode_coding_ccl)
7421 c = *src++, pos++; 7422 c = *src++, pos++;
7422 else if ((bytes = MULTIBYTE_LENGTH (src, src_end)) > 0) 7423 else if ((bytes = MULTIBYTE_LENGTH (src, src_end)) > 0)
7423 c = STRING_CHAR_ADVANCE_NO_UNIFY (src), pos += bytes; 7424 c = STRING_CHAR_ADVANCE_NO_UNIFY (src), pos += bytes;
diff --git a/src/filelock.c b/src/filelock.c
index 3c92d495060..7c69ea954fc 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -63,7 +63,9 @@ Lisp_Object Vtemporary_file_directory;
63 63
64#ifdef CLASH_DETECTION 64#ifdef CLASH_DETECTION
65 65
66#ifdef HAVE_UTMP_H
66#include <utmp.h> 67#include <utmp.h>
68#endif
67 69
68#if !defined (S_ISLNK) && defined (S_IFLNK) 70#if !defined (S_ISLNK) && defined (S_IFLNK)
69#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) 71#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
diff --git a/src/image.c b/src/image.c
index 9c11f466807..1265b900c6c 100644
--- a/src/image.c
+++ b/src/image.c
@@ -33,7 +33,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
33#else 33#else
34# include <png.h> 34# include <png.h>
35#endif 35#endif
36#endif 36#endif
37 37
38#include <setjmp.h> 38#include <setjmp.h>
39 39
@@ -3051,7 +3051,7 @@ xbm_load (f, img)
3051 int nbytes, i; 3051 int nbytes, i;
3052 /* Windows mono bitmaps are reversed compared with X. */ 3052 /* Windows mono bitmaps are reversed compared with X. */
3053 invertedBits = bits; 3053 invertedBits = bits;
3054 nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR 3054 nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR
3055 * img->height; 3055 * img->height;
3056 bits = (char *) alloca(nbytes); 3056 bits = (char *) alloca(nbytes);
3057 for (i = 0; i < nbytes; i++) 3057 for (i = 0; i < nbytes; i++)
@@ -5559,7 +5559,7 @@ png_image_p (object)
5559/* PNG library details. */ 5559/* PNG library details. */
5560 5560
5561DEF_IMGLIB_FN (png_get_io_ptr); 5561DEF_IMGLIB_FN (png_get_io_ptr);
5562DEF_IMGLIB_FN (png_check_sig); 5562DEF_IMGLIB_FN (png_sig_cmp);
5563DEF_IMGLIB_FN (png_create_read_struct); 5563DEF_IMGLIB_FN (png_create_read_struct);
5564DEF_IMGLIB_FN (png_create_info_struct); 5564DEF_IMGLIB_FN (png_create_info_struct);
5565DEF_IMGLIB_FN (png_destroy_read_struct); 5565DEF_IMGLIB_FN (png_destroy_read_struct);
@@ -5590,7 +5590,7 @@ init_png_functions (Lisp_Object libraries)
5590 return 0; 5590 return 0;
5591 5591
5592 LOAD_IMGLIB_FN (library, png_get_io_ptr); 5592 LOAD_IMGLIB_FN (library, png_get_io_ptr);
5593 LOAD_IMGLIB_FN (library, png_check_sig); 5593 LOAD_IMGLIB_FN (library, png_sig_cmp);
5594 LOAD_IMGLIB_FN (library, png_create_read_struct); 5594 LOAD_IMGLIB_FN (library, png_create_read_struct);
5595 LOAD_IMGLIB_FN (library, png_create_info_struct); 5595 LOAD_IMGLIB_FN (library, png_create_info_struct);
5596 LOAD_IMGLIB_FN (library, png_destroy_read_struct); 5596 LOAD_IMGLIB_FN (library, png_destroy_read_struct);
@@ -5615,7 +5615,7 @@ init_png_functions (Lisp_Object libraries)
5615#else 5615#else
5616 5616
5617#define fn_png_get_io_ptr png_get_io_ptr 5617#define fn_png_get_io_ptr png_get_io_ptr
5618#define fn_png_check_sig png_check_sig 5618#define fn_png_sig_cmp png_sig_cmp
5619#define fn_png_create_read_struct png_create_read_struct 5619#define fn_png_create_read_struct png_create_read_struct
5620#define fn_png_create_info_struct png_create_info_struct 5620#define fn_png_create_info_struct png_create_info_struct
5621#define fn_png_destroy_read_struct png_destroy_read_struct 5621#define fn_png_destroy_read_struct png_destroy_read_struct
@@ -5762,7 +5762,7 @@ png_load (f, img)
5762 5762
5763 /* Check PNG signature. */ 5763 /* Check PNG signature. */
5764 if (fread (sig, 1, sizeof sig, fp) != sizeof sig 5764 if (fread (sig, 1, sizeof sig, fp) != sizeof sig
5765 || !fn_png_check_sig (sig, sizeof sig)) 5765 || fn_png_sig_cmp (sig, 0, sizeof sig))
5766 { 5766 {
5767 image_error ("Not a PNG file: `%s'", file, Qnil); 5767 image_error ("Not a PNG file: `%s'", file, Qnil);
5768 UNGCPRO; 5768 UNGCPRO;
@@ -5779,7 +5779,7 @@ png_load (f, img)
5779 5779
5780 /* Check PNG signature. */ 5780 /* Check PNG signature. */
5781 if (tbr.len < sizeof sig 5781 if (tbr.len < sizeof sig
5782 || !fn_png_check_sig (tbr.bytes, sizeof sig)) 5782 || fn_png_sig_cmp (tbr.bytes, 0, sizeof sig))
5783 { 5783 {
5784 image_error ("Not a PNG image: `%s'", img->spec, Qnil); 5784 image_error ("Not a PNG image: `%s'", img->spec, Qnil);
5785 UNGCPRO; 5785 UNGCPRO;
diff --git a/src/keymap.c b/src/keymap.c
index 17666c7efcc..98774d5d685 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2650,11 +2650,13 @@ static void where_is_internal_1 P_ ((Lisp_Object key, Lisp_Object binding,
2650 Lisp_Object args, void *data)); 2650 Lisp_Object args, void *data));
2651 2651
2652/* Like Flookup_key, but uses a list of keymaps SHADOW instead of a single map. 2652/* Like Flookup_key, but uses a list of keymaps SHADOW instead of a single map.
2653 Returns the first non-nil binding found in any of those maps. */ 2653 Returns the first non-nil binding found in any of those maps.
2654 If REMAP is true, pass the result of the lookup through command
2655 remapping before returning it. */
2654 2656
2655static Lisp_Object 2657static Lisp_Object
2656shadow_lookup (shadow, key, flag) 2658shadow_lookup (Lisp_Object shadow, Lisp_Object key, Lisp_Object flag,
2657 Lisp_Object shadow, key, flag; 2659 int remap)
2658{ 2660{
2659 Lisp_Object tail, value; 2661 Lisp_Object tail, value;
2660 2662
@@ -2669,7 +2671,15 @@ shadow_lookup (shadow, key, flag)
2669 return Qnil; 2671 return Qnil;
2670 } 2672 }
2671 else if (!NILP (value)) 2673 else if (!NILP (value))
2672 return value; 2674 {
2675 Lisp_Object remapping;
2676 if (remap && SYMBOLP (value)
2677 && (remapping = Fcommand_remapping (value, Qnil, shadow),
2678 !NILP (remapping)))
2679 return remapping;
2680 else
2681 return value;
2682 }
2673 } 2683 }
2674 return Qnil; 2684 return Qnil;
2675} 2685}
@@ -2860,30 +2870,30 @@ remapped command in the returned list. */)
2860 { 2870 {
2861 /* We have a list of advertized bindings. */ 2871 /* We have a list of advertized bindings. */
2862 while (CONSP (tem)) 2872 while (CONSP (tem))
2863 if (EQ (shadow_lookup (keymaps, XCAR (tem), Qnil), definition)) 2873 if (EQ (shadow_lookup (keymaps, XCAR (tem), Qnil, 0), definition))
2864 return XCAR (tem); 2874 return XCAR (tem);
2865 else 2875 else
2866 tem = XCDR (tem); 2876 tem = XCDR (tem);
2867 if (EQ (shadow_lookup (keymaps, tem, Qnil), definition)) 2877 if (EQ (shadow_lookup (keymaps, tem, Qnil, 0), definition))
2868 return tem; 2878 return tem;
2869 } 2879 }
2870 2880
2871 sequences = Freverse (where_is_internal (definition, keymaps, 2881 sequences = Freverse (where_is_internal (definition, keymaps,
2872 !NILP (noindirect), nomenus)); 2882 !NILP (noindirect), nomenus));
2873 2883
2874 while (CONSP (sequences)) 2884 while (CONSP (sequences)
2885 /* If we're at the end of the `sequences' list and we haven't
2886 considered remapped sequences yet, copy them over and
2887 process them. */
2888 || (!remapped && (sequences = remapped_sequences,
2889 remapped = 1),
2890 CONSP (sequences)))
2875 { 2891 {
2876 Lisp_Object sequence, function; 2892 Lisp_Object sequence, function;
2877 2893
2878 sequence = XCAR (sequences); 2894 sequence = XCAR (sequences);
2879 sequences = XCDR (sequences); 2895 sequences = XCDR (sequences);
2880 2896
2881 if (NILP (sequences) && !remapped)
2882 {
2883 sequences = remapped_sequences;
2884 remapped = 1;
2885 }
2886
2887 /* Verify that this key binding is not shadowed by another 2897 /* Verify that this key binding is not shadowed by another
2888 binding for the same key, before we say it exists. 2898 binding for the same key, before we say it exists.
2889 2899
@@ -2893,7 +2903,8 @@ remapped command in the returned list. */)
2893 2903
2894 Either nil or number as value from Flookup_key 2904 Either nil or number as value from Flookup_key
2895 means undefined. */ 2905 means undefined. */
2896 if (!EQ (shadow_lookup (keymaps, sequence, Qnil), definition)) 2906 if (!EQ (shadow_lookup (keymaps, sequence, Qnil, remapped),
2907 definition))
2897 continue; 2908 continue;
2898 2909
2899 /* If the current sequence is a command remapping with 2910 /* If the current sequence is a command remapping with
@@ -3506,7 +3517,7 @@ describe_map (map, prefix, elt_describer, partial, shadow,
3506 ASET (kludge, 0, event); 3517 ASET (kludge, 0, event);
3507 if (!NILP (shadow)) 3518 if (!NILP (shadow))
3508 { 3519 {
3509 tem = shadow_lookup (shadow, kludge, Qt); 3520 tem = shadow_lookup (shadow, kludge, Qt, 0);
3510 if (!NILP (tem)) 3521 if (!NILP (tem))
3511 { 3522 {
3512 /* If both bindings are keymaps, this key is a prefix key, 3523 /* If both bindings are keymaps, this key is a prefix key,
@@ -3776,7 +3787,7 @@ describe_vector (vector, prefix, args, elt_describer,
3776 { 3787 {
3777 Lisp_Object tem; 3788 Lisp_Object tem;
3778 3789
3779 tem = shadow_lookup (shadow, kludge, Qt); 3790 tem = shadow_lookup (shadow, kludge, Qt, 0);
3780 3791
3781 if (!NILP (tem)) 3792 if (!NILP (tem))
3782 { 3793 {
diff --git a/src/lisp.h b/src/lisp.h
index 5ea0303976d..7032a3f48f4 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2686,7 +2686,7 @@ extern Lisp_Object make_uninit_multibyte_string P_ ((int, int));
2686extern Lisp_Object make_string_from_bytes P_ ((const char *, int, int)); 2686extern Lisp_Object make_string_from_bytes P_ ((const char *, int, int));
2687extern Lisp_Object make_specified_string P_ ((const char *, int, int, int)); 2687extern Lisp_Object make_specified_string P_ ((const char *, int, int, int));
2688EXFUN (Fpurecopy, 1); 2688EXFUN (Fpurecopy, 1);
2689extern Lisp_Object make_pure_string P_ ((char *, int, int, int)); 2689extern Lisp_Object make_pure_string P_ ((const char *, int, int, int));
2690extern Lisp_Object make_pure_c_string (const char *data); 2690extern Lisp_Object make_pure_c_string (const char *data);
2691extern Lisp_Object pure_cons P_ ((Lisp_Object, Lisp_Object)); 2691extern Lisp_Object pure_cons P_ ((Lisp_Object, Lisp_Object));
2692extern Lisp_Object make_pure_vector P_ ((EMACS_INT)); 2692extern Lisp_Object make_pure_vector P_ ((EMACS_INT));
diff --git a/src/lread.c b/src/lread.c
index db425b82299..ba9d5378104 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1155,7 +1155,7 @@ Return t if the file exists and loads successfully. */)
1155 1155
1156 if (!bcmp (SDATA (found) + SBYTES (found) - 4, 1156 if (!bcmp (SDATA (found) + SBYTES (found) - 4,
1157 ".elc", 4) 1157 ".elc", 4)
1158 || (version = safe_to_load_p (fd)) > 0) 1158 || (fd >= 0 && (version = safe_to_load_p (fd)) > 0))
1159 /* Load .elc files directly, but not when they are 1159 /* Load .elc files directly, but not when they are
1160 remote and have no handler! */ 1160 remote and have no handler! */
1161 { 1161 {
diff --git a/src/xdisp.c b/src/xdisp.c
index 7d43f2d8bef..8e356224c8a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20401,6 +20401,7 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps)
20401 j = i; 20401 j = i;
20402 BUILD_GLYPH_STRINGS (j, start, h, t, 20402 BUILD_GLYPH_STRINGS (j, start, h, t,
20403 overlap_hl, dummy_x, last_x); 20403 overlap_hl, dummy_x, last_x);
20404 start = i;
20404 compute_overhangs_and_x (t, head->x, 1); 20405 compute_overhangs_and_x (t, head->x, 1);
20405 prepend_glyph_string_lists (&head, &tail, h, t); 20406 prepend_glyph_string_lists (&head, &tail, h, t);
20406 clip_head = head; 20407 clip_head = head;
@@ -20450,6 +20451,8 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps)
20450 20451
20451 BUILD_GLYPH_STRINGS (end, i, h, t, 20452 BUILD_GLYPH_STRINGS (end, i, h, t,
20452 overlap_hl, x, last_x); 20453 overlap_hl, x, last_x);
20454 /* Because BUILD_GLYPH_STRINGS updates the first argument,
20455 we don't have `end = i;' here. */
20453 compute_overhangs_and_x (h, tail->x + tail->width, 0); 20456 compute_overhangs_and_x (h, tail->x + tail->width, 0);
20454 append_glyph_string_lists (&head, &tail, h, t); 20457 append_glyph_string_lists (&head, &tail, h, t);
20455 clip_tail = tail; 20458 clip_tail = tail;