diff options
| author | Andrea Corallo | 2021-03-31 10:48:02 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2021-03-31 10:48:02 +0200 |
| commit | 515378434a44b9979e8c8a6e04203695095bdc40 (patch) | |
| tree | 9e2a43dae1f43b49bce8bd3858954dd5751b13e1 /src | |
| parent | aa159bf6963ef3f741bfbd787507405c02cc4974 (diff) | |
| parent | 3b1c646202ec715d6a1d8e6c127eaad14d81b6d4 (diff) | |
| download | emacs-515378434a44b9979e8c8a6e04203695095bdc40.tar.gz emacs-515378434a44b9979e8c8a6e04203695095bdc40.zip | |
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'src')
| -rw-r--r-- | src/coding.c | 6 | ||||
| -rw-r--r-- | src/data.c | 1 | ||||
| -rw-r--r-- | src/filelock.c | 26 | ||||
| -rw-r--r-- | src/fns.c | 10 | ||||
| -rw-r--r-- | src/pdumper.c | 6 | ||||
| -rw-r--r-- | src/xfns.c | 2 |
6 files changed, 40 insertions, 11 deletions
diff --git a/src/coding.c b/src/coding.c index 739dd6adcb5..46e7fca0f43 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -7799,7 +7799,13 @@ encode_coding (struct coding_system *coding) | |||
| 7799 | coding_set_source (coding); | 7799 | coding_set_source (coding); |
| 7800 | consume_chars (coding, translation_table, max_lookup); | 7800 | consume_chars (coding, translation_table, max_lookup); |
| 7801 | coding_set_destination (coding); | 7801 | coding_set_destination (coding); |
| 7802 | /* The CODING_MODE_LAST_BLOCK flag should be set only for the last | ||
| 7803 | iteration of the encoding. */ | ||
| 7804 | unsigned saved_mode = coding->mode; | ||
| 7805 | if (coding->consumed_char < coding->src_chars) | ||
| 7806 | coding->mode &= ~CODING_MODE_LAST_BLOCK; | ||
| 7802 | (*(coding->encoder)) (coding); | 7807 | (*(coding->encoder)) (coding); |
| 7808 | coding->mode = saved_mode; | ||
| 7803 | } while (coding->consumed_char < coding->src_chars); | 7809 | } while (coding->consumed_char < coding->src_chars); |
| 7804 | 7810 | ||
| 7805 | if (BUFFERP (coding->dst_object) && coding->produced_char > 0) | 7811 | if (BUFFERP (coding->dst_object) && coding->produced_char > 0) |
diff --git a/src/data.c b/src/data.c index 50d4374abdd..d547f5da5e0 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -1663,6 +1663,7 @@ All writes to aliases of SYMBOL will call WATCH-FUNCTION too. */) | |||
| 1663 | (Lisp_Object symbol, Lisp_Object watch_function) | 1663 | (Lisp_Object symbol, Lisp_Object watch_function) |
| 1664 | { | 1664 | { |
| 1665 | symbol = Findirect_variable (symbol); | 1665 | symbol = Findirect_variable (symbol); |
| 1666 | CHECK_SYMBOL (symbol); | ||
| 1666 | set_symbol_trapped_write (symbol, SYMBOL_TRAPPED_WRITE); | 1667 | set_symbol_trapped_write (symbol, SYMBOL_TRAPPED_WRITE); |
| 1667 | map_obarray (Vobarray, harmonize_variable_watchers, symbol); | 1668 | map_obarray (Vobarray, harmonize_variable_watchers, symbol); |
| 1668 | 1669 | ||
diff --git a/src/filelock.c b/src/filelock.c index 373fc00a42c..446a262a1ce 100644 --- a/src/filelock.c +++ b/src/filelock.c | |||
| @@ -719,8 +719,8 @@ lock_file (Lisp_Object fn) | |||
| 719 | } | 719 | } |
| 720 | } | 720 | } |
| 721 | 721 | ||
| 722 | void | 722 | static Lisp_Object |
| 723 | unlock_file (Lisp_Object fn) | 723 | unlock_file_body (Lisp_Object fn) |
| 724 | { | 724 | { |
| 725 | char *lfname; | 725 | char *lfname; |
| 726 | USE_SAFE_ALLOCA; | 726 | USE_SAFE_ALLOCA; |
| @@ -737,6 +737,23 @@ unlock_file (Lisp_Object fn) | |||
| 737 | report_file_errno ("Unlocking file", filename, err); | 737 | report_file_errno ("Unlocking file", filename, err); |
| 738 | 738 | ||
| 739 | SAFE_FREE (); | 739 | SAFE_FREE (); |
| 740 | return Qnil; | ||
| 741 | } | ||
| 742 | |||
| 743 | static Lisp_Object | ||
| 744 | unlock_file_handle_error (Lisp_Object err) | ||
| 745 | { | ||
| 746 | call1 (intern ("userlock--handle-unlock-error"), err); | ||
| 747 | return Qnil; | ||
| 748 | } | ||
| 749 | |||
| 750 | void | ||
| 751 | unlock_file (Lisp_Object fn) | ||
| 752 | { | ||
| 753 | internal_condition_case_1 (unlock_file_body, | ||
| 754 | fn, | ||
| 755 | list1(Qfile_error), | ||
| 756 | unlock_file_handle_error); | ||
| 740 | } | 757 | } |
| 741 | 758 | ||
| 742 | #else /* MSDOS */ | 759 | #else /* MSDOS */ |
| @@ -790,7 +807,10 @@ DEFUN ("unlock-buffer", Funlock_buffer, Sunlock_buffer, | |||
| 790 | 0, 0, 0, | 807 | 0, 0, 0, |
| 791 | doc: /* Unlock the file visited in the current buffer. | 808 | doc: /* Unlock the file visited in the current buffer. |
| 792 | If the buffer is not modified, this does nothing because the file | 809 | If the buffer is not modified, this does nothing because the file |
| 793 | should not be locked in that case. */) | 810 | should not be locked in that case. It also does nothing if the |
| 811 | current buffer is not visiting a file, or is not locked. Handles file | ||
| 812 | system errors by calling `display-warning' and continuing as if the | ||
| 813 | error did not occur. */) | ||
| 794 | (void) | 814 | (void) |
| 795 | { | 815 | { |
| 796 | if (SAVE_MODIFF < MODIFF | 816 | if (SAVE_MODIFF < MODIFF |
| @@ -2369,7 +2369,10 @@ This is the last value stored with `(put SYMBOL PROPNAME VALUE)'. */) | |||
| 2369 | DEFUN ("plist-put", Fplist_put, Splist_put, 3, 3, 0, | 2369 | DEFUN ("plist-put", Fplist_put, Splist_put, 3, 3, 0, |
| 2370 | doc: /* Change value in PLIST of PROP to VAL. | 2370 | doc: /* Change value in PLIST of PROP to VAL. |
| 2371 | PLIST is a property list, which is a list of the form | 2371 | PLIST is a property list, which is a list of the form |
| 2372 | \(PROP1 VALUE1 PROP2 VALUE2 ...). PROP is a symbol and VAL is any object. | 2372 | \(PROP1 VALUE1 PROP2 VALUE2 ...). |
| 2373 | |||
| 2374 | The comparison with PROP is done using `eq'. | ||
| 2375 | |||
| 2373 | If PROP is already a property on the list, its value is set to VAL, | 2376 | If PROP is already a property on the list, its value is set to VAL, |
| 2374 | otherwise the new PROP VAL pair is added. The new plist is returned; | 2377 | otherwise the new PROP VAL pair is added. The new plist is returned; |
| 2375 | use `(setq x (plist-put x prop val))' to be sure to use the new value. | 2378 | use `(setq x (plist-put x prop val))' to be sure to use the new value. |
| @@ -3211,7 +3214,10 @@ suppressed. */) | |||
| 3211 | DEFUN ("plist-member", Fplist_member, Splist_member, 2, 2, 0, | 3214 | DEFUN ("plist-member", Fplist_member, Splist_member, 2, 2, 0, |
| 3212 | doc: /* Return non-nil if PLIST has the property PROP. | 3215 | doc: /* Return non-nil if PLIST has the property PROP. |
| 3213 | PLIST is a property list, which is a list of the form | 3216 | PLIST is a property list, which is a list of the form |
| 3214 | \(PROP1 VALUE1 PROP2 VALUE2 ...). PROP is a symbol. | 3217 | \(PROP1 VALUE1 PROP2 VALUE2 ...). |
| 3218 | |||
| 3219 | The comparison with PROP is done using `eq'. | ||
| 3220 | |||
| 3215 | Unlike `plist-get', this allows you to distinguish between a missing | 3221 | Unlike `plist-get', this allows you to distinguish between a missing |
| 3216 | property and a property with the value nil. | 3222 | property and a property with the value nil. |
| 3217 | The value is actually the tail of PLIST whose car is PROP. */) | 3223 | The value is actually the tail of PLIST whose car is PROP. */) |
diff --git a/src/pdumper.c b/src/pdumper.c index 368184b9a6a..9a3b6dce00b 100644 --- a/src/pdumper.c +++ b/src/pdumper.c | |||
| @@ -165,11 +165,7 @@ ptrdiff_t_to_dump_off (ptrdiff_t value) | |||
| 165 | static int | 165 | static int |
| 166 | dump_get_page_size (void) | 166 | dump_get_page_size (void) |
| 167 | { | 167 | { |
| 168 | #if defined (WINDOWSNT) || defined (CYGWIN) | 168 | return 64 * 1024; |
| 169 | return 64 * 1024; /* Worst-case allocation granularity. */ | ||
| 170 | #else | ||
| 171 | return getpagesize (); | ||
| 172 | #endif | ||
| 173 | } | 169 | } |
| 174 | 170 | ||
| 175 | #define dump_offsetof(type, member) \ | 171 | #define dump_offsetof(type, member) \ |
diff --git a/src/xfns.c b/src/xfns.c index d90644819b6..0507dc8f61d 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -2783,7 +2783,7 @@ xic_set_preeditarea (struct window *w, int x, int y) | |||
| 2783 | XVaNestedList attr; | 2783 | XVaNestedList attr; |
| 2784 | XPoint spot; | 2784 | XPoint spot; |
| 2785 | 2785 | ||
| 2786 | spot.x = WINDOW_TO_FRAME_PIXEL_X (w, x) + WINDOW_LEFT_FRINGE_WIDTH (w); | 2786 | spot.x = WINDOW_TO_FRAME_PIXEL_X (w, x) + WINDOW_LEFT_FRINGE_WIDTH (w) + WINDOW_LEFT_MARGIN_WIDTH(w); |
| 2787 | spot.y = WINDOW_TO_FRAME_PIXEL_Y (w, y) + FONT_BASE (FRAME_FONT (f)); | 2787 | spot.y = WINDOW_TO_FRAME_PIXEL_Y (w, y) + FONT_BASE (FRAME_FONT (f)); |
| 2788 | attr = XVaCreateNestedList (0, XNSpotLocation, &spot, NULL); | 2788 | attr = XVaCreateNestedList (0, XNSpotLocation, &spot, NULL); |
| 2789 | XSetICValues (FRAME_XIC (f), XNPreeditAttributes, attr, NULL); | 2789 | XSetICValues (FRAME_XIC (f), XNPreeditAttributes, attr, NULL); |