diff options
| author | Chong Yidong | 2012-05-31 14:08:06 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-05-31 14:08:06 +0800 |
| commit | efc00ab16e2890b75d7224434ac43fe944ade4dd (patch) | |
| tree | 28c1078ca32b96402cd1a5f618a17b3526143f27 /src | |
| parent | ba93a18774352c97d6dd73c73141cbff6305581b (diff) | |
| parent | dd41169b6cb0105b0766f3d368c657ebafc19cba (diff) | |
| download | emacs-efc00ab16e2890b75d7224434ac43fe944ade4dd.tar.gz emacs-efc00ab16e2890b75d7224434ac43fe944ade4dd.zip | |
Merge from emacs-24; up to 2012-04-24T21:47:24Z!michael.albinus@gmx.de
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 31 | ||||
| -rw-r--r-- | src/charset.c | 9 | ||||
| -rw-r--r-- | src/doc.c | 21 | ||||
| -rw-r--r-- | src/keymap.c | 8 | ||||
| -rw-r--r-- | src/keymap.h | 2 | ||||
| -rw-r--r-- | src/ralloc.c | 7 | ||||
| -rw-r--r-- | src/search.c | 20 | ||||
| -rw-r--r-- | src/xdisp.c | 2 |
8 files changed, 66 insertions, 34 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 32bd9e2d18c..8622adbf0ce 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,34 @@ | |||
| 1 | 2012-05-31 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (handle_stop): Detect whether we have overlay strings | ||
| 4 | loaded by testing it->current.overlay_string_index to be | ||
| 5 | non-negative, instead of checking whether n_overlay_strings is | ||
| 6 | positive. (Bug#11587) | ||
| 7 | |||
| 8 | 2012-05-31 Chong Yidong <cyd@gnu.org> | ||
| 9 | |||
| 10 | * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169). | ||
| 11 | |||
| 12 | * doc.c (Fsubstitute_command_keys): Doc fix. | ||
| 13 | |||
| 14 | 2012-05-31 Eli Zaretskii <eliz@gnu.org> | ||
| 15 | |||
| 16 | * search.c (search_buffer): Remove calls to | ||
| 17 | r_alloc_inhibit_buffer_relocation, as it is now called by | ||
| 18 | maybe_unify_char, which was the cause of relocation of buffer text | ||
| 19 | in bug#11519. | ||
| 20 | |||
| 21 | 2012-05-31 Eli Zaretskii <eliz@gnu.org> | ||
| 22 | |||
| 23 | * charset.c (maybe_unify_char): Inhibit relocation of buffer text | ||
| 24 | for the duration of call to load_charset, to avoid problems with | ||
| 25 | callers of maybe_unify_char that access buffer text through C | ||
| 26 | pointers. | ||
| 27 | |||
| 28 | * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and | ||
| 29 | decrement the inhibition flag, instead of just setting or | ||
| 30 | resetting it. | ||
| 31 | |||
| 1 | 2012-05-31 Paul Eggert <eggert@cs.ucla.edu> | 32 | 2012-05-31 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 33 | ||
| 3 | Remove obsolete '#define static' cruft. | 34 | Remove obsolete '#define static' cruft. |
diff --git a/src/charset.c b/src/charset.c index 6ecc8d2c4d1..8ce972ebf37 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -1633,6 +1633,12 @@ maybe_unify_char (int c, Lisp_Object val) | |||
| 1633 | return c; | 1633 | return c; |
| 1634 | 1634 | ||
| 1635 | CHECK_CHARSET_GET_CHARSET (val, charset); | 1635 | CHECK_CHARSET_GET_CHARSET (val, charset); |
| 1636 | #ifdef REL_ALLOC | ||
| 1637 | /* The call to load_charset below can allocate memory, which screws | ||
| 1638 | callers of this function through STRING_CHAR_* macros that hold C | ||
| 1639 | pointers to buffer text, if REL_ALLOC is used. */ | ||
| 1640 | r_alloc_inhibit_buffer_relocation (1); | ||
| 1641 | #endif | ||
| 1636 | load_charset (charset, 1); | 1642 | load_charset (charset, 1); |
| 1637 | if (! inhibit_load_charset_map) | 1643 | if (! inhibit_load_charset_map) |
| 1638 | { | 1644 | { |
| @@ -1648,6 +1654,9 @@ maybe_unify_char (int c, Lisp_Object val) | |||
| 1648 | if (unified > 0) | 1654 | if (unified > 0) |
| 1649 | c = unified; | 1655 | c = unified; |
| 1650 | } | 1656 | } |
| 1657 | #ifdef REL_ALLOC | ||
| 1658 | r_alloc_inhibit_buffer_relocation (0); | ||
| 1659 | #endif | ||
| 1651 | return c; | 1660 | return c; |
| 1652 | } | 1661 | } |
| 1653 | 1662 | ||
| @@ -705,18 +705,23 @@ the same file name is found in the `doc-directory'. */) | |||
| 705 | DEFUN ("substitute-command-keys", Fsubstitute_command_keys, | 705 | DEFUN ("substitute-command-keys", Fsubstitute_command_keys, |
| 706 | Ssubstitute_command_keys, 1, 1, 0, | 706 | Ssubstitute_command_keys, 1, 1, 0, |
| 707 | doc: /* Substitute key descriptions for command names in STRING. | 707 | doc: /* Substitute key descriptions for command names in STRING. |
| 708 | Substrings of the form \\=\\[COMMAND] replaced by either: a keystroke | 708 | Each substring of the form \\=\\[COMMAND] is replaced by either a |
| 709 | sequence that will invoke COMMAND, or "M-x COMMAND" if COMMAND is not | 709 | keystroke sequence that invokes COMMAND, or "M-x COMMAND" if COMMAND |
| 710 | on any keys. | 710 | is not on any keys. |
| 711 | Substrings of the form \\=\\{MAPVAR} are replaced by summaries | 711 | |
| 712 | \(made by `describe-bindings') of the value of MAPVAR, taken as a keymap. | 712 | Each substring of the form \\=\\{MAPVAR} is replaced by a summary of |
| 713 | Substrings of the form \\=\\<MAPVAR> specify to use the value of MAPVAR | 713 | the value of MAPVAR as a keymap. This summary is similar to the one |
| 714 | produced by `describe-bindings'. The summary ends in two newlines | ||
| 715 | \(used by the helper function `help-make-xrefs' to find the end of the | ||
| 716 | summary). | ||
| 717 | |||
| 718 | Each substring of the form \\=\\<MAPVAR> specifies the use of MAPVAR | ||
| 714 | as the keymap for future \\=\\[COMMAND] substrings. | 719 | as the keymap for future \\=\\[COMMAND] substrings. |
| 715 | \\=\\= quotes the following character and is discarded; | 720 | \\=\\= quotes the following character and is discarded; |
| 716 | thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ into the output. | 721 | thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ into the output. |
| 717 | 722 | ||
| 718 | Returns original STRING if no substitutions were made. Otherwise, | 723 | Return the original STRING if no substitutions are made. |
| 719 | a new string, without any text properties, is returned. */) | 724 | Otherwise, return a new string, without any text properties. */) |
| 720 | (Lisp_Object string) | 725 | (Lisp_Object string) |
| 721 | { | 726 | { |
| 722 | char *buf; | 727 | char *buf; |
diff --git a/src/keymap.c b/src/keymap.c index 2a03dda5a5e..2f5558c171f 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2996,9 +2996,9 @@ You type Translation\n\ | |||
| 2996 | If MENTION_SHADOW is nonzero, then when something is shadowed by SHADOW, | 2996 | If MENTION_SHADOW is nonzero, then when something is shadowed by SHADOW, |
| 2997 | don't omit it; instead, mention it but say it is shadowed. | 2997 | don't omit it; instead, mention it but say it is shadowed. |
| 2998 | 2998 | ||
| 2999 | Return whether something was inserted or not. */ | 2999 | Any inserted text ends in two newlines (used by `help-make-xrefs'). */ |
| 3000 | 3000 | ||
| 3001 | int | 3001 | void |
| 3002 | describe_map_tree (Lisp_Object startmap, int partial, Lisp_Object shadow, | 3002 | describe_map_tree (Lisp_Object startmap, int partial, Lisp_Object shadow, |
| 3003 | Lisp_Object prefix, const char *title, int nomenu, int transl, | 3003 | Lisp_Object prefix, const char *title, int nomenu, int transl, |
| 3004 | int always_title, int mention_shadow) | 3004 | int always_title, int mention_shadow) |
| @@ -3108,8 +3108,10 @@ key binding\n\ | |||
| 3108 | skip: ; | 3108 | skip: ; |
| 3109 | } | 3109 | } |
| 3110 | 3110 | ||
| 3111 | if (something) | ||
| 3112 | insert_string ("\n"); | ||
| 3113 | |||
| 3111 | UNGCPRO; | 3114 | UNGCPRO; |
| 3112 | return something; | ||
| 3113 | } | 3115 | } |
| 3114 | 3116 | ||
| 3115 | static int previous_description_column; | 3117 | static int previous_description_column; |
diff --git a/src/keymap.h b/src/keymap.h index 234ffce471d..d9334cda0f4 100644 --- a/src/keymap.h +++ b/src/keymap.h | |||
| @@ -47,7 +47,7 @@ EXFUN (Fcurrent_active_maps, 2); | |||
| 47 | extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, int, int, int); | 47 | extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, int, int, int); |
| 48 | extern Lisp_Object get_keymap (Lisp_Object, int, int); | 48 | extern Lisp_Object get_keymap (Lisp_Object, int, int); |
| 49 | EXFUN (Fset_keymap_parent, 2); | 49 | EXFUN (Fset_keymap_parent, 2); |
| 50 | extern int describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object, | 50 | extern void describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object, |
| 51 | const char *, int, int, int, int); | 51 | const char *, int, int, int, int); |
| 52 | extern ptrdiff_t current_minor_maps (Lisp_Object **, Lisp_Object **); | 52 | extern ptrdiff_t current_minor_maps (Lisp_Object **, Lisp_Object **); |
| 53 | extern void initial_define_key (Lisp_Object, int, const char *); | 53 | extern void initial_define_key (Lisp_Object, int, const char *); |
diff --git a/src/ralloc.c b/src/ralloc.c index 7fdef69842a..19d15664eec 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -1142,7 +1142,12 @@ r_alloc_reset_variable (POINTER *old, POINTER *new) | |||
| 1142 | void | 1142 | void |
| 1143 | r_alloc_inhibit_buffer_relocation (int inhibit) | 1143 | r_alloc_inhibit_buffer_relocation (int inhibit) |
| 1144 | { | 1144 | { |
| 1145 | use_relocatable_buffers = !inhibit; | 1145 | if (use_relocatable_buffers < 0) |
| 1146 | use_relocatable_buffers = 0; | ||
| 1147 | if (inhibit) | ||
| 1148 | use_relocatable_buffers++; | ||
| 1149 | else if (use_relocatable_buffers > 0) | ||
| 1150 | use_relocatable_buffers--; | ||
| 1146 | } | 1151 | } |
| 1147 | 1152 | ||
| 1148 | 1153 | ||
diff --git a/src/search.c b/src/search.c index 5608e344e75..99519b839ef 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -1160,24 +1160,12 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, | |||
| 1160 | { | 1160 | { |
| 1161 | ptrdiff_t val; | 1161 | ptrdiff_t val; |
| 1162 | 1162 | ||
| 1163 | #ifdef REL_ALLOC | ||
| 1164 | /* re_search_2 below is passed C pointers to buffer text. | ||
| 1165 | If some code called by it causes memory (re)allocation, | ||
| 1166 | buffer text could be relocated on platforms that use | ||
| 1167 | REL_ALLOC, which invalidates those C pointers. So we | ||
| 1168 | inhibit relocation of buffer text for as long as | ||
| 1169 | re_search_2 runs. */ | ||
| 1170 | r_alloc_inhibit_buffer_relocation (1); | ||
| 1171 | #endif | ||
| 1172 | val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2, | 1163 | val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2, |
| 1173 | pos_byte - BEGV_BYTE, lim_byte - pos_byte, | 1164 | pos_byte - BEGV_BYTE, lim_byte - pos_byte, |
| 1174 | (NILP (Vinhibit_changing_match_data) | 1165 | (NILP (Vinhibit_changing_match_data) |
| 1175 | ? &search_regs : &search_regs_1), | 1166 | ? &search_regs : &search_regs_1), |
| 1176 | /* Don't allow match past current point */ | 1167 | /* Don't allow match past current point */ |
| 1177 | pos_byte - BEGV_BYTE); | 1168 | pos_byte - BEGV_BYTE); |
| 1178 | #ifdef REL_ALLOC | ||
| 1179 | r_alloc_inhibit_buffer_relocation (0); | ||
| 1180 | #endif | ||
| 1181 | if (val == -2) | 1169 | if (val == -2) |
| 1182 | { | 1170 | { |
| 1183 | matcher_overflow (); | 1171 | matcher_overflow (); |
| @@ -1217,19 +1205,11 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, | |||
| 1217 | { | 1205 | { |
| 1218 | ptrdiff_t val; | 1206 | ptrdiff_t val; |
| 1219 | 1207 | ||
| 1220 | #ifdef REL_ALLOC | ||
| 1221 | /* See commentary above for the reasons for inhibiting | ||
| 1222 | buffer text relocation here. */ | ||
| 1223 | r_alloc_inhibit_buffer_relocation (1); | ||
| 1224 | #endif | ||
| 1225 | val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2, | 1208 | val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2, |
| 1226 | pos_byte - BEGV_BYTE, lim_byte - pos_byte, | 1209 | pos_byte - BEGV_BYTE, lim_byte - pos_byte, |
| 1227 | (NILP (Vinhibit_changing_match_data) | 1210 | (NILP (Vinhibit_changing_match_data) |
| 1228 | ? &search_regs : &search_regs_1), | 1211 | ? &search_regs : &search_regs_1), |
| 1229 | lim_byte - BEGV_BYTE); | 1212 | lim_byte - BEGV_BYTE); |
| 1230 | #ifdef REL_ALLOC | ||
| 1231 | r_alloc_inhibit_buffer_relocation (0); | ||
| 1232 | #endif | ||
| 1233 | if (val == -2) | 1213 | if (val == -2) |
| 1234 | { | 1214 | { |
| 1235 | matcher_overflow (); | 1215 | matcher_overflow (); |
diff --git a/src/xdisp.c b/src/xdisp.c index 25aae04f048..f5d17877d1c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -3170,7 +3170,7 @@ handle_stop (struct it *it) | |||
| 3170 | onto the stack one more time, which is not | 3170 | onto the stack one more time, which is not |
| 3171 | expected by the rest of the code that processes | 3171 | expected by the rest of the code that processes |
| 3172 | overlay strings. */ | 3172 | overlay strings. */ |
| 3173 | || (it->n_overlay_strings <= 0 | 3173 | || (it->current.overlay_string_index < 0 |
| 3174 | ? !get_overlay_strings_1 (it, 0, 0) | 3174 | ? !get_overlay_strings_1 (it, 0, 0) |
| 3175 | : 0)) | 3175 | : 0)) |
| 3176 | { | 3176 | { |