diff options
| author | Glenn Morris | 2014-05-25 19:28:09 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-05-25 19:28:09 -0700 |
| commit | 015936fba1bcaa51b7886a73144d4c088200c0aa (patch) | |
| tree | c9628339352c1a97e574df28966e977143c43e41 /src | |
| parent | 5e26d9849a79bf78fda821979fc937f7e5e6df52 (diff) | |
| parent | e8f2cc26e712f42f6391fa52cd67c3e791096f1e (diff) | |
| download | emacs-015936fba1bcaa51b7886a73144d4c088200c0aa.tar.gz emacs-015936fba1bcaa51b7886a73144d4c088200c0aa.zip | |
Merge from emacs-24; up to 2014-05-26T10:21:18Z!rgm@gnu.org
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 49 | ||||
| -rw-r--r-- | src/lisp.h | 4 | ||||
| -rw-r--r-- | src/minibuf.c | 3 | ||||
| -rw-r--r-- | src/unexaix.c | 4 | ||||
| -rw-r--r-- | src/w32fns.c | 14 | ||||
| -rw-r--r-- | src/w32term.c | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 62 |
7 files changed, 120 insertions, 20 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f40931cbabc..76117451b16 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,52 @@ | |||
| 1 | 2014-05-26 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (move_it_in_display_line_to): Don't record wrap position | ||
| 4 | if we are iterating over an object that generates glyphs for | ||
| 5 | marginal areas. (Bug#17585) | ||
| 6 | |||
| 7 | 2014-05-26 Paul Eggert <eggert@cs.ucla.edu> | ||
| 8 | |||
| 9 | * xdisp.c (safe__call1, safe__eval): Now static. | ||
| 10 | |||
| 11 | 2014-05-26 Eli Zaretskii <eliz@gnu.org> | ||
| 12 | |||
| 13 | * xdisp.c (safe__call): Accept va_list argument instead of '...'. | ||
| 14 | (safe_call, safe__call1): Construct a va_list argument for safe_call. | ||
| 15 | (safe_call1): Call safe_call instead of safe__call directly. | ||
| 16 | |||
| 17 | 2014-05-26 Ken Brown <kbrown@cornell.edu> | ||
| 18 | |||
| 19 | * w32term.c (x_delete_display) [CYGWIN]: Don't free | ||
| 20 | dpyinfo->w32_id_name, to make sure it doesn't get freed more than | ||
| 21 | once. (Bug#17510) | ||
| 22 | |||
| 23 | 2014-05-26 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 24 | |||
| 25 | * xdisp.c: Bind inhibit-quit during pre-redisplay-function. | ||
| 26 | (safe__call, safe__call1, safe__eval): New functions. | ||
| 27 | (safe_call): Use it. | ||
| 28 | (prepare_menu_bars): Use it for pre-redisplay-function (bug#17577). | ||
| 29 | (display_mode_element): Same for `:eval'. | ||
| 30 | |||
| 31 | 2014-05-26 Paul Eggert <eggert@cs.ucla.edu> | ||
| 32 | |||
| 33 | Fix port to 32-bit AIX (Bug#17540). | ||
| 34 | * unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr | ||
| 35 | twice. _text already includes this offset. | ||
| 36 | (unrelocate_symbols): Don't cast 64-bit integer to pointer. | ||
| 37 | |||
| 38 | 2014-05-26 Eli Zaretskii <eliz@gnu.org> | ||
| 39 | |||
| 40 | * xdisp.c (move_it_in_display_line_to): Avoid infinite recursion: | ||
| 41 | when closest_pos is identical to to_charpos, don't recurse, since | ||
| 42 | we already tried that, and failed. (Bug#17539) | ||
| 43 | |||
| 44 | * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are | ||
| 45 | unwinding when frame's faces were not initialized yet, increment | ||
| 46 | the frame's image-cache reference count before calling | ||
| 47 | x_free_frame_resources. Don't dereference | ||
| 48 | dpyinfo->terminal->image_cache if it is NULL. (Bug#17524) | ||
| 49 | |||
| 1 | 2014-05-25 Jan Djärv <jan.h.d@swipnet.se> | 50 | 2014-05-25 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 51 | ||
| 3 | * nsfont.m (nsfont_draw): Simplify as arguments are adjusted in | 52 | * nsfont.m (nsfont_draw): Simplify as arguments are adjusted in |
diff --git a/src/lisp.h b/src/lisp.h index 40dd03c4fc4..2fd28359868 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1718,8 +1718,8 @@ struct Lisp_Hash_Table | |||
| 1718 | ratio, a float. */ | 1718 | ratio, a float. */ |
| 1719 | Lisp_Object rehash_threshold; | 1719 | Lisp_Object rehash_threshold; |
| 1720 | 1720 | ||
| 1721 | /* Vector of hash codes.. If hash[I] is nil, this means that that | 1721 | /* Vector of hash codes. If hash[I] is nil, this means that the |
| 1722 | entry I is unused. */ | 1722 | I-th entry is unused. */ |
| 1723 | Lisp_Object hash; | 1723 | Lisp_Object hash; |
| 1724 | 1724 | ||
| 1725 | /* Vector used to chain entries. If entry I is free, next[I] is the | 1725 | /* Vector used to chain entries. If entry I is free, next[I] is the |
diff --git a/src/minibuf.c b/src/minibuf.c index 06fe0c07df6..3042b13b7d6 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -396,7 +396,8 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, | |||
| 396 | in previous recursive minibuffer, but was not set explicitly | 396 | in previous recursive minibuffer, but was not set explicitly |
| 397 | to t for this invocation, so set it to nil in this minibuffer. | 397 | to t for this invocation, so set it to nil in this minibuffer. |
| 398 | Save the old value now, before we change it. */ | 398 | Save the old value now, before we change it. */ |
| 399 | specbind (intern ("minibuffer-completing-file-name"), Vminibuffer_completing_file_name); | 399 | specbind (intern ("minibuffer-completing-file-name"), |
| 400 | Vminibuffer_completing_file_name); | ||
| 400 | if (EQ (Vminibuffer_completing_file_name, Qlambda)) | 401 | if (EQ (Vminibuffer_completing_file_name, Qlambda)) |
| 401 | Vminibuffer_completing_file_name = Qnil; | 402 | Vminibuffer_completing_file_name = Qnil; |
| 402 | 403 | ||
diff --git a/src/unexaix.c b/src/unexaix.c index c08d192b32c..c97d5cae2a8 100644 --- a/src/unexaix.c +++ b/src/unexaix.c | |||
| @@ -379,7 +379,7 @@ copy_text_and_data (int new) | |||
| 379 | char *ptr; | 379 | char *ptr; |
| 380 | 380 | ||
| 381 | lseek (new, text_scnptr, SEEK_SET); | 381 | lseek (new, text_scnptr, SEEK_SET); |
| 382 | ptr = _text + text_scnptr; | 382 | ptr = _text; |
| 383 | end = ptr + f_ohdr.tsize; | 383 | end = ptr + f_ohdr.tsize; |
| 384 | write_segment (new, ptr, end); | 384 | write_segment (new, ptr, end); |
| 385 | 385 | ||
| @@ -606,7 +606,7 @@ unrelocate_symbols (int new, int a_out, | |||
| 606 | PERROR (a_name); | 606 | PERROR (a_name); |
| 607 | } | 607 | } |
| 608 | 608 | ||
| 609 | p = (int *) (ldrel.l_vaddr + d_reloc); | 609 | p = (int *) (intptr_t) (ldrel.l_vaddr + d_reloc); |
| 610 | 610 | ||
| 611 | switch (ldrel.l_symndx) { | 611 | switch (ldrel.l_symndx) { |
| 612 | case SYMNDX_TEXT: | 612 | case SYMNDX_TEXT: |
diff --git a/src/w32fns.c b/src/w32fns.c index fa988583f33..c9a83c98234 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -4244,6 +4244,17 @@ unwind_create_frame (Lisp_Object frame) | |||
| 4244 | { | 4244 | { |
| 4245 | #ifdef GLYPH_DEBUG | 4245 | #ifdef GLYPH_DEBUG |
| 4246 | struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); | 4246 | struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); |
| 4247 | |||
| 4248 | /* If the frame's image cache refcount is still the same as our | ||
| 4249 | private shadow variable, it means we are unwinding a frame | ||
| 4250 | for which we didn't yet call init_frame_faces, where the | ||
| 4251 | refcount is incremented. Therefore, we increment it here, so | ||
| 4252 | that free_frame_faces, called in x_free_frame_resources | ||
| 4253 | below, will not mistakenly decrement the counter that was not | ||
| 4254 | incremented yet to account for this new frame. */ | ||
| 4255 | if (FRAME_IMAGE_CACHE (f) != NULL | ||
| 4256 | && FRAME_IMAGE_CACHE (f)->refcount == image_cache_refcount) | ||
| 4257 | FRAME_IMAGE_CACHE (f)->refcount++; | ||
| 4247 | #endif | 4258 | #endif |
| 4248 | 4259 | ||
| 4249 | x_free_frame_resources (f); | 4260 | x_free_frame_resources (f); |
| @@ -4254,7 +4265,8 @@ unwind_create_frame (Lisp_Object frame) | |||
| 4254 | eassert (dpyinfo->reference_count == dpyinfo_refcount); | 4265 | eassert (dpyinfo->reference_count == dpyinfo_refcount); |
| 4255 | eassert ((dpyinfo->terminal->image_cache == NULL | 4266 | eassert ((dpyinfo->terminal->image_cache == NULL |
| 4256 | && image_cache_refcount == 0) | 4267 | && image_cache_refcount == 0) |
| 4257 | || dpyinfo->terminal->image_cache->refcount == image_cache_refcount); | 4268 | || (dpyinfo->terminal->image_cache != NULL |
| 4269 | && dpyinfo->terminal->image_cache->refcount == image_cache_refcount)); | ||
| 4258 | #endif | 4270 | #endif |
| 4259 | return Qt; | 4271 | return Qt; |
| 4260 | } | 4272 | } |
diff --git a/src/w32term.c b/src/w32term.c index aa65af4afd3..8ca023a86cb 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -6419,7 +6419,11 @@ x_delete_display (struct w32_display_info *dpyinfo) | |||
| 6419 | if (dpyinfo->palette) | 6419 | if (dpyinfo->palette) |
| 6420 | DeleteObject (dpyinfo->palette); | 6420 | DeleteObject (dpyinfo->palette); |
| 6421 | } | 6421 | } |
| 6422 | /* Avoid freeing dpyinfo->w32_id_name more than once if emacs is | ||
| 6423 | running as a daemon; see bug#17510. */ | ||
| 6424 | #ifndef CYGWIN | ||
| 6422 | xfree (dpyinfo->w32_id_name); | 6425 | xfree (dpyinfo->w32_id_name); |
| 6426 | #endif | ||
| 6423 | 6427 | ||
| 6424 | w32_reset_fringes (); | 6428 | w32_reset_fringes (); |
| 6425 | } | 6429 | } |
diff --git a/src/xdisp.c b/src/xdisp.c index ab492d098d0..1585164f439 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2591,8 +2591,8 @@ safe_eval_handler (Lisp_Object arg, ptrdiff_t nargs, Lisp_Object *args) | |||
| 2591 | following. Return the result, or nil if something went | 2591 | following. Return the result, or nil if something went |
| 2592 | wrong. Prevent redisplay during the evaluation. */ | 2592 | wrong. Prevent redisplay during the evaluation. */ |
| 2593 | 2593 | ||
| 2594 | Lisp_Object | 2594 | static Lisp_Object |
| 2595 | safe_call (ptrdiff_t nargs, Lisp_Object func, ...) | 2595 | safe__call (bool inhibit_quit, ptrdiff_t nargs, Lisp_Object func, va_list ap) |
| 2596 | { | 2596 | { |
| 2597 | Lisp_Object val; | 2597 | Lisp_Object val; |
| 2598 | 2598 | ||
| @@ -2600,21 +2600,20 @@ safe_call (ptrdiff_t nargs, Lisp_Object func, ...) | |||
| 2600 | val = Qnil; | 2600 | val = Qnil; |
| 2601 | else | 2601 | else |
| 2602 | { | 2602 | { |
| 2603 | va_list ap; | ||
| 2604 | ptrdiff_t i; | 2603 | ptrdiff_t i; |
| 2605 | ptrdiff_t count = SPECPDL_INDEX (); | 2604 | ptrdiff_t count = SPECPDL_INDEX (); |
| 2606 | struct gcpro gcpro1; | 2605 | struct gcpro gcpro1; |
| 2607 | Lisp_Object *args = alloca (nargs * word_size); | 2606 | Lisp_Object *args = alloca (nargs * word_size); |
| 2608 | 2607 | ||
| 2609 | args[0] = func; | 2608 | args[0] = func; |
| 2610 | va_start (ap, func); | ||
| 2611 | for (i = 1; i < nargs; i++) | 2609 | for (i = 1; i < nargs; i++) |
| 2612 | args[i] = va_arg (ap, Lisp_Object); | 2610 | args[i] = va_arg (ap, Lisp_Object); |
| 2613 | va_end (ap); | ||
| 2614 | 2611 | ||
| 2615 | GCPRO1 (args[0]); | 2612 | GCPRO1 (args[0]); |
| 2616 | gcpro1.nvars = nargs; | 2613 | gcpro1.nvars = nargs; |
| 2617 | specbind (Qinhibit_redisplay, Qt); | 2614 | specbind (Qinhibit_redisplay, Qt); |
| 2615 | if (inhibit_quit) | ||
| 2616 | specbind (Qinhibit_quit, Qt); | ||
| 2618 | /* Use Qt to ensure debugger does not run, | 2617 | /* Use Qt to ensure debugger does not run, |
| 2619 | so there is no possibility of wanting to redisplay. */ | 2618 | so there is no possibility of wanting to redisplay. */ |
| 2620 | val = internal_condition_case_n (Ffuncall, nargs, args, Qt, | 2619 | val = internal_condition_case_n (Ffuncall, nargs, args, Qt, |
| @@ -2626,6 +2625,17 @@ safe_call (ptrdiff_t nargs, Lisp_Object func, ...) | |||
| 2626 | return val; | 2625 | return val; |
| 2627 | } | 2626 | } |
| 2628 | 2627 | ||
| 2628 | Lisp_Object | ||
| 2629 | safe_call (ptrdiff_t nargs, Lisp_Object func, ...) | ||
| 2630 | { | ||
| 2631 | Lisp_Object retval; | ||
| 2632 | va_list ap; | ||
| 2633 | |||
| 2634 | va_start (ap, func); | ||
| 2635 | retval = safe__call (false, nargs, func, ap); | ||
| 2636 | va_end (ap); | ||
| 2637 | return retval; | ||
| 2638 | } | ||
| 2629 | 2639 | ||
| 2630 | /* Call function FN with one argument ARG. | 2640 | /* Call function FN with one argument ARG. |
| 2631 | Return the result, or nil if something went wrong. */ | 2641 | Return the result, or nil if something went wrong. */ |
| @@ -2636,12 +2646,30 @@ safe_call1 (Lisp_Object fn, Lisp_Object arg) | |||
| 2636 | return safe_call (2, fn, arg); | 2646 | return safe_call (2, fn, arg); |
| 2637 | } | 2647 | } |
| 2638 | 2648 | ||
| 2649 | static Lisp_Object | ||
| 2650 | safe__call1 (bool inhibit_quit, Lisp_Object fn, ...) | ||
| 2651 | { | ||
| 2652 | Lisp_Object retval; | ||
| 2653 | va_list ap; | ||
| 2654 | |||
| 2655 | va_start (ap, fn); | ||
| 2656 | retval = safe__call (inhibit_quit, 2, fn, ap); | ||
| 2657 | va_end (ap); | ||
| 2658 | return retval; | ||
| 2659 | } | ||
| 2660 | |||
| 2639 | static Lisp_Object Qeval; | 2661 | static Lisp_Object Qeval; |
| 2640 | 2662 | ||
| 2641 | Lisp_Object | 2663 | Lisp_Object |
| 2642 | safe_eval (Lisp_Object sexpr) | 2664 | safe_eval (Lisp_Object sexpr) |
| 2643 | { | 2665 | { |
| 2644 | return safe_call1 (Qeval, sexpr); | 2666 | return safe__call1 (false, Qeval, sexpr); |
| 2667 | } | ||
| 2668 | |||
| 2669 | static Lisp_Object | ||
| 2670 | safe__eval (bool inhibit_quit, Lisp_Object sexpr) | ||
| 2671 | { | ||
| 2672 | return safe__call1 (inhibit_quit, Qeval, sexpr); | ||
| 2645 | } | 2673 | } |
| 2646 | 2674 | ||
| 2647 | /* Call function FN with two arguments ARG1 and ARG2. | 2675 | /* Call function FN with two arguments ARG1 and ARG2. |
| @@ -8528,7 +8556,7 @@ move_it_in_display_line_to (struct it *it, | |||
| 8528 | } | 8556 | } |
| 8529 | else | 8557 | else |
| 8530 | { | 8558 | { |
| 8531 | if (it->line_wrap == WORD_WRAP) | 8559 | if (it->line_wrap == WORD_WRAP && it->area == TEXT_AREA) |
| 8532 | { | 8560 | { |
| 8533 | if (IT_DISPLAYING_WHITESPACE (it)) | 8561 | if (IT_DISPLAYING_WHITESPACE (it)) |
| 8534 | may_wrap = 1; | 8562 | may_wrap = 1; |
| @@ -8812,8 +8840,11 @@ move_it_in_display_line_to (struct it *it, | |||
| 8812 | if (closest_pos < ZV) | 8840 | if (closest_pos < ZV) |
| 8813 | { | 8841 | { |
| 8814 | RESTORE_IT (it, &ppos_it, ppos_data); | 8842 | RESTORE_IT (it, &ppos_it, ppos_data); |
| 8815 | move_it_in_display_line_to (it, closest_pos, -1, | 8843 | /* Don't recurse if closest_pos is equal to |
| 8816 | MOVE_TO_POS); | 8844 | to_charpos, since we have just tried that. */ |
| 8845 | if (closest_pos != to_charpos) | ||
| 8846 | move_it_in_display_line_to (it, closest_pos, -1, | ||
| 8847 | MOVE_TO_POS); | ||
| 8817 | result = MOVE_POS_MATCH_OR_ZV; | 8848 | result = MOVE_POS_MATCH_OR_ZV; |
| 8818 | } | 8849 | } |
| 8819 | else | 8850 | else |
| @@ -8874,8 +8905,9 @@ move_it_in_display_line_to (struct it *it, | |||
| 8874 | && !at_eob_p && closest_pos < ZV) | 8905 | && !at_eob_p && closest_pos < ZV) |
| 8875 | { | 8906 | { |
| 8876 | RESTORE_IT (it, &ppos_it, ppos_data); | 8907 | RESTORE_IT (it, &ppos_it, ppos_data); |
| 8877 | move_it_in_display_line_to (it, closest_pos, -1, | 8908 | if (closest_pos != to_charpos) |
| 8878 | MOVE_TO_POS); | 8909 | move_it_in_display_line_to (it, closest_pos, -1, |
| 8910 | MOVE_TO_POS); | ||
| 8879 | } | 8911 | } |
| 8880 | result = MOVE_POS_MATCH_OR_ZV; | 8912 | result = MOVE_POS_MATCH_OR_ZV; |
| 8881 | break; | 8913 | break; |
| @@ -8893,7 +8925,9 @@ move_it_in_display_line_to (struct it *it, | |||
| 8893 | if (closest_pos < ZV) | 8925 | if (closest_pos < ZV) |
| 8894 | { | 8926 | { |
| 8895 | RESTORE_IT (it, &ppos_it, ppos_data); | 8927 | RESTORE_IT (it, &ppos_it, ppos_data); |
| 8896 | move_it_in_display_line_to (it, closest_pos, -1, MOVE_TO_POS); | 8928 | if (closest_pos != to_charpos) |
| 8929 | move_it_in_display_line_to (it, closest_pos, -1, | ||
| 8930 | MOVE_TO_POS); | ||
| 8897 | } | 8931 | } |
| 8898 | result = MOVE_POS_MATCH_OR_ZV; | 8932 | result = MOVE_POS_MATCH_OR_ZV; |
| 8899 | break; | 8933 | break; |
| @@ -11543,7 +11577,7 @@ prepare_menu_bars (void) | |||
| 11543 | } | 11577 | } |
| 11544 | } | 11578 | } |
| 11545 | } | 11579 | } |
| 11546 | safe_call1 (Vpre_redisplay_function, windows); | 11580 | safe__call1 (true, Vpre_redisplay_function, windows); |
| 11547 | } | 11581 | } |
| 11548 | 11582 | ||
| 11549 | /* Update all frame titles based on their buffer names, etc. We do | 11583 | /* Update all frame titles based on their buffer names, etc. We do |
| @@ -21857,7 +21891,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, | |||
| 21857 | if (CONSP (XCDR (elt))) | 21891 | if (CONSP (XCDR (elt))) |
| 21858 | { | 21892 | { |
| 21859 | Lisp_Object spec; | 21893 | Lisp_Object spec; |
| 21860 | spec = safe_eval (XCAR (XCDR (elt))); | 21894 | spec = safe__eval (true, XCAR (XCDR (elt))); |
| 21861 | n += display_mode_element (it, depth, field_width - n, | 21895 | n += display_mode_element (it, depth, field_width - n, |
| 21862 | precision - n, spec, props, | 21896 | precision - n, spec, props, |
| 21863 | risky); | 21897 | risky); |