diff options
| author | Glenn Morris | 2012-05-26 18:06:44 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-05-26 18:06:44 -0700 |
| commit | 33017fafd17d722e82a268e9b272f27df261e09d (patch) | |
| tree | 9c34640f09d51059804961d697ed9b07e19571d3 /src | |
| parent | caf8a9b2b301aba06735d403317b75b41df59bfe (diff) | |
| parent | ed7bebbb489cf6f893fc35a2a6714b0d8e7e8a90 (diff) | |
| download | emacs-33017fafd17d722e82a268e9b272f27df261e09d.tar.gz emacs-33017fafd17d722e82a268e9b272f27df261e09d.zip | |
Merge from emacs-24; up to 2012-04-24T08:35:02Z!lekktu@gmail.com
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 31 | ||||
| -rw-r--r-- | src/callproc.c | 2 | ||||
| -rw-r--r-- | src/lisp.h | 9 | ||||
| -rw-r--r-- | src/msdos.c | 2 | ||||
| -rw-r--r-- | src/ralloc.c | 6 | ||||
| -rw-r--r-- | src/search.c | 22 | ||||
| -rw-r--r-- | src/xdisp.c | 12 |
7 files changed, 81 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1ade4691184..a9dae7f68aa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,34 @@ | |||
| 1 | 2012-05-27 Ken Brown <kbrown@cornell.edu> | ||
| 2 | |||
| 3 | * callproc.c (Fcall_process): Restore a line that was accidentally | ||
| 4 | commented out in the 2011-02-13 change (bug#11547). | ||
| 5 | |||
| 6 | 2012-05-27 Eli Zaretskii <eliz@gnu.org> | ||
| 7 | |||
| 8 | * lisp.h [REL_ALLOC]: Add prototypes for external functions | ||
| 9 | defined on ralloc.c. | ||
| 10 | |||
| 11 | * buffer.c [REL_ALLOC]: Remove prototypes of | ||
| 12 | r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free, | ||
| 13 | they are now on lisp.h. | ||
| 14 | |||
| 15 | * ralloc.c (r_alloc_inhibit_buffer_relocation): New function. | ||
| 16 | |||
| 17 | * search.c (search_buffer): Use it to inhibit relocation of buffer | ||
| 18 | text while re_search_2 is doing its job, because re_search_2 is | ||
| 19 | passed C pointers to buffer text. (Bug#11519) | ||
| 20 | |||
| 21 | * msdos.c (internal_terminal_init) <Vwindow_system_version>: | ||
| 22 | Update value to 24. | ||
| 23 | |||
| 24 | * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator | ||
| 25 | state after an additional call to move_it_in_display_line_to, keep | ||
| 26 | the values of it->max_ascent and it->max_descent found for the | ||
| 27 | entire line. | ||
| 28 | (pos_visible_p): Revert the comparison against bottom_y to what it | ||
| 29 | was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb. | ||
| 30 | (Bug#11464) | ||
| 31 | |||
| 1 | 2012-05-26 Paul Eggert <eggert@cs.ucla.edu> | 32 | 2012-05-26 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 33 | ||
| 3 | Fix coding-related core dumps with gcc -ftrapv. | 34 | Fix coding-related core dumps with gcc -ftrapv. |
diff --git a/src/callproc.c b/src/callproc.c index 1dd56749e16..f7c9971907d 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -652,7 +652,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 652 | 652 | ||
| 653 | /* GConf causes us to ignore SIGPIPE, make sure it is restored | 653 | /* GConf causes us to ignore SIGPIPE, make sure it is restored |
| 654 | in the child. */ | 654 | in the child. */ |
| 655 | //signal (SIGPIPE, SIG_DFL); | 655 | signal (SIGPIPE, SIG_DFL); |
| 656 | #ifdef HAVE_WORKING_VFORK | 656 | #ifdef HAVE_WORKING_VFORK |
| 657 | pthread_sigmask (SIG_SETMASK, &procmask, 0); | 657 | pthread_sigmask (SIG_SETMASK, &procmask, 0); |
| 658 | #endif | 658 | #endif |
diff --git a/src/lisp.h b/src/lisp.h index 551c15473a7..522f7cec634 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3633,6 +3633,15 @@ void syms_of_dbusbind (void); | |||
| 3633 | /* Defined in msdos.c, w32.c */ | 3633 | /* Defined in msdos.c, w32.c */ |
| 3634 | extern char *emacs_root_dir (void); | 3634 | extern char *emacs_root_dir (void); |
| 3635 | #endif /* DOS_NT */ | 3635 | #endif /* DOS_NT */ |
| 3636 | |||
| 3637 | #ifdef REL_ALLOC | ||
| 3638 | /* Defined in ralloc.c */ | ||
| 3639 | extern void r_alloc_reset_variable (POINTER_TYPE **, POINTER_TYPE **); | ||
| 3640 | extern POINTER_TYPE *r_alloc (POINTER_TYPE **, size_t); | ||
| 3641 | extern POINTER_TYPE *r_re_alloc (POINTER_TYPE **, size_t); | ||
| 3642 | extern void r_alloc_free (POINTER_TYPE **ptr); | ||
| 3643 | extern void r_alloc_inhibit_buffer_relocation (int); | ||
| 3644 | #endif /* REL_ALLOC */ | ||
| 3636 | 3645 | ||
| 3637 | /* Nonzero means Emacs has already been initialized. | 3646 | /* Nonzero means Emacs has already been initialized. |
| 3638 | Used during startup to detect startup of dumped Emacs. */ | 3647 | Used during startup to detect startup of dumped Emacs. */ |
diff --git a/src/msdos.c b/src/msdos.c index 5f46829aefd..c6213b566b8 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -1813,7 +1813,7 @@ internal_terminal_init (void) | |||
| 1813 | } | 1813 | } |
| 1814 | 1814 | ||
| 1815 | Vinitial_window_system = Qpc; | 1815 | Vinitial_window_system = Qpc; |
| 1816 | Vwindow_system_version = make_number (23); /* RE Emacs version */ | 1816 | Vwindow_system_version = make_number (24); /* RE Emacs version */ |
| 1817 | tty->terminal->type = output_msdos_raw; | 1817 | tty->terminal->type = output_msdos_raw; |
| 1818 | 1818 | ||
| 1819 | /* If Emacs was dumped on DOS/V machine, forget the stale VRAM | 1819 | /* If Emacs was dumped on DOS/V machine, forget the stale VRAM |
diff --git a/src/ralloc.c b/src/ralloc.c index d736e279520..7fdef69842a 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -1139,6 +1139,12 @@ r_alloc_reset_variable (POINTER *old, POINTER *new) | |||
| 1139 | bloc->variable = new; | 1139 | bloc->variable = new; |
| 1140 | } | 1140 | } |
| 1141 | 1141 | ||
| 1142 | void | ||
| 1143 | r_alloc_inhibit_buffer_relocation (int inhibit) | ||
| 1144 | { | ||
| 1145 | use_relocatable_buffers = !inhibit; | ||
| 1146 | } | ||
| 1147 | |||
| 1142 | 1148 | ||
| 1143 | /*********************************************************************** | 1149 | /*********************************************************************** |
| 1144 | Initialization | 1150 | Initialization |
diff --git a/src/search.c b/src/search.c index a9542a2ed97..5608e344e75 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -1159,12 +1159,25 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, | |||
| 1159 | while (n < 0) | 1159 | while (n < 0) |
| 1160 | { | 1160 | { |
| 1161 | ptrdiff_t val; | 1161 | ptrdiff_t val; |
| 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 | ||
| 1162 | val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2, | 1172 | val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2, |
| 1163 | pos_byte - BEGV_BYTE, lim_byte - pos_byte, | 1173 | pos_byte - BEGV_BYTE, lim_byte - pos_byte, |
| 1164 | (NILP (Vinhibit_changing_match_data) | 1174 | (NILP (Vinhibit_changing_match_data) |
| 1165 | ? &search_regs : &search_regs_1), | 1175 | ? &search_regs : &search_regs_1), |
| 1166 | /* Don't allow match past current point */ | 1176 | /* Don't allow match past current point */ |
| 1167 | pos_byte - BEGV_BYTE); | 1177 | pos_byte - BEGV_BYTE); |
| 1178 | #ifdef REL_ALLOC | ||
| 1179 | r_alloc_inhibit_buffer_relocation (0); | ||
| 1180 | #endif | ||
| 1168 | if (val == -2) | 1181 | if (val == -2) |
| 1169 | { | 1182 | { |
| 1170 | matcher_overflow (); | 1183 | matcher_overflow (); |
| @@ -1203,11 +1216,20 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, | |||
| 1203 | while (n > 0) | 1216 | while (n > 0) |
| 1204 | { | 1217 | { |
| 1205 | ptrdiff_t val; | 1218 | ptrdiff_t val; |
| 1219 | |||
| 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 | ||
| 1206 | val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2, | 1225 | val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2, |
| 1207 | pos_byte - BEGV_BYTE, lim_byte - pos_byte, | 1226 | pos_byte - BEGV_BYTE, lim_byte - pos_byte, |
| 1208 | (NILP (Vinhibit_changing_match_data) | 1227 | (NILP (Vinhibit_changing_match_data) |
| 1209 | ? &search_regs : &search_regs_1), | 1228 | ? &search_regs : &search_regs_1), |
| 1210 | lim_byte - BEGV_BYTE); | 1229 | lim_byte - BEGV_BYTE); |
| 1230 | #ifdef REL_ALLOC | ||
| 1231 | r_alloc_inhibit_buffer_relocation (0); | ||
| 1232 | #endif | ||
| 1211 | if (val == -2) | 1233 | if (val == -2) |
| 1212 | { | 1234 | { |
| 1213 | matcher_overflow (); | 1235 | matcher_overflow (); |
diff --git a/src/xdisp.c b/src/xdisp.c index 794355af153..25aae04f048 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -8705,8 +8705,18 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos | |||
| 8705 | { | 8705 | { |
| 8706 | /* If TO_Y is in this line and TO_X was reached | 8706 | /* If TO_Y is in this line and TO_X was reached |
| 8707 | above, we scanned too far. We have to restore | 8707 | above, we scanned too far. We have to restore |
| 8708 | IT's settings to the ones before skipping. */ | 8708 | IT's settings to the ones before skipping. But |
| 8709 | keep the more accurate values of max_ascent and | ||
| 8710 | max_descent we've found while skipping the rest | ||
| 8711 | of the line, for the sake of callers, such as | ||
| 8712 | pos_visible_p, that need to know the line | ||
| 8713 | height. */ | ||
| 8714 | int max_ascent = it->max_ascent; | ||
| 8715 | int max_descent = it->max_descent; | ||
| 8716 | |||
| 8709 | RESTORE_IT (it, &it_backup, backup_data); | 8717 | RESTORE_IT (it, &it_backup, backup_data); |
| 8718 | it->max_ascent = max_ascent; | ||
| 8719 | it->max_descent = max_descent; | ||
| 8710 | reached = 6; | 8720 | reached = 6; |
| 8711 | } | 8721 | } |
| 8712 | else | 8722 | else |