diff options
| author | Glenn Morris | 2020-02-16 07:50:36 -0800 |
|---|---|---|
| committer | Glenn Morris | 2020-02-16 07:50:36 -0800 |
| commit | f633e014aca727b9ccecaf8e6d69386f93c5073f (patch) | |
| tree | 8db3ca5c8726fe382033559ec6a3bdf2cf28b74a /src | |
| parent | 3480071dfab30eaca7f1d014600b864d2ea22f62 (diff) | |
| parent | 7ceb45f61f91d99c045966d8463c8ae30add8930 (diff) | |
| download | emacs-f633e014aca727b9ccecaf8e6d69386f93c5073f.tar.gz emacs-f633e014aca727b9ccecaf8e6d69386f93c5073f.zip | |
Merge from origin/emacs-27
7ceb45f61f (origin/emacs-27) Reformulate c-end-of-macro, handling mul...
888ffd960c Fix unexec failure on macOS 10.15.4
b392c9f365 Fix 'reverse-region' when less than one line is in region
7448834f73 Correct default regexp in 'package-menu-hide-package'
faada7ca42 Remove obsolete menu entry "Redisplay buffer"
78d76cd93c Remove redundant 'msft' compilation error rule (bug#39595)
75a9eee8b8 ; * src/editfns.c (Fbuffer_size): Tiny clarification.
4d8d25d641 * doc/lispref/variables.texi (special-variable-p): Clarify...
9f6a4bbcc9 Remove the optional KEEP-ORDER argument to regexp-opt
d1e8ce8bb6 Make after-change-functions called from call-process get t...
# Conflicts:
# etc/NEWS
Diffstat (limited to 'src')
| -rw-r--r-- | src/callproc.c | 5 | ||||
| -rw-r--r-- | src/editfns.c | 2 | ||||
| -rw-r--r-- | src/unexmacosx.c | 47 |
3 files changed, 28 insertions, 26 deletions
diff --git a/src/callproc.c b/src/callproc.c index 07dcc4c3ae4..8883415f3f5 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -811,7 +811,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, | |||
| 811 | && ! CODING_MAY_REQUIRE_DECODING (&process_coding)) | 811 | && ! CODING_MAY_REQUIRE_DECODING (&process_coding)) |
| 812 | { | 812 | { |
| 813 | insert_1_both (buf, nread, nread, 0, 0, 0); | 813 | insert_1_both (buf, nread, nread, 0, 0, 0); |
| 814 | signal_after_change (PT, 0, nread); | 814 | signal_after_change (PT - nread, 0, nread); |
| 815 | } | 815 | } |
| 816 | else | 816 | else |
| 817 | { /* We have to decode the input. */ | 817 | { /* We have to decode the input. */ |
| @@ -854,7 +854,8 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, | |||
| 854 | 854 | ||
| 855 | TEMP_SET_PT_BOTH (PT + process_coding.produced_char, | 855 | TEMP_SET_PT_BOTH (PT + process_coding.produced_char, |
| 856 | PT_BYTE + process_coding.produced); | 856 | PT_BYTE + process_coding.produced); |
| 857 | signal_after_change (PT, 0, process_coding.produced_char); | 857 | signal_after_change (PT - process_coding.produced_char, |
| 858 | 0, process_coding.produced_char); | ||
| 858 | carryover = process_coding.carryover_bytes; | 859 | carryover = process_coding.carryover_bytes; |
| 859 | if (carryover > 0) | 860 | if (carryover > 0) |
| 860 | memcpy (buf, process_coding.carryover, | 861 | memcpy (buf, process_coding.carryover, |
diff --git a/src/editfns.c b/src/editfns.c index 05ad3925813..ddf190b1752 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -863,7 +863,7 @@ instead. | |||
| 863 | This does not take narrowing into account; to count the number of | 863 | This does not take narrowing into account; to count the number of |
| 864 | characters in the accessible portion of the current buffer, use | 864 | characters in the accessible portion of the current buffer, use |
| 865 | `(- (point-max) (point-min))', and to count the number of characters | 865 | `(- (point-max) (point-min))', and to count the number of characters |
| 866 | in some other BUFFER, use | 866 | in the accessible portion of some other BUFFER, use |
| 867 | `(with-current-buffer BUFFER (- (point-max) (point-min)))'. */) | 867 | `(with-current-buffer BUFFER (- (point-max) (point-min)))'. */) |
| 868 | (Lisp_Object buffer) | 868 | (Lisp_Object buffer) |
| 869 | { | 869 | { |
diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 8d132417e89..59cbe3c18b9 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c | |||
| @@ -503,22 +503,34 @@ unexec_regions_sort_compare (const void *a, const void *b) | |||
| 503 | static void | 503 | static void |
| 504 | unexec_regions_merge (void) | 504 | unexec_regions_merge (void) |
| 505 | { | 505 | { |
| 506 | int i, n; | ||
| 507 | unexec_region_info r; | ||
| 508 | vm_size_t padsize; | ||
| 509 | |||
| 510 | qsort (unexec_regions, num_unexec_regions, sizeof (unexec_regions[0]), | 506 | qsort (unexec_regions, num_unexec_regions, sizeof (unexec_regions[0]), |
| 511 | &unexec_regions_sort_compare); | 507 | &unexec_regions_sort_compare); |
| 512 | n = 0; | 508 | |
| 513 | r = unexec_regions[0]; | 509 | /* Align each region start address to a page boundary. */ |
| 514 | padsize = r.range.address & (pagesize - 1); | 510 | for (unexec_region_info *cur = unexec_regions; |
| 515 | if (padsize) | 511 | cur < unexec_regions + num_unexec_regions; cur++) |
| 516 | { | 512 | { |
| 517 | r.range.address -= padsize; | 513 | vm_size_t padsize = cur->range.address & (pagesize - 1); |
| 518 | r.range.size += padsize; | 514 | if (padsize) |
| 519 | r.filesize += padsize; | 515 | { |
| 516 | cur->range.address -= padsize; | ||
| 517 | cur->range.size += padsize; | ||
| 518 | cur->filesize += padsize; | ||
| 519 | |||
| 520 | unexec_region_info *prev = cur == unexec_regions ? NULL : cur - 1; | ||
| 521 | if (prev | ||
| 522 | && prev->range.address + prev->range.size > cur->range.address) | ||
| 523 | { | ||
| 524 | prev->range.size = cur->range.address - prev->range.address; | ||
| 525 | if (prev->filesize > prev->range.size) | ||
| 526 | prev->filesize = prev->range.size; | ||
| 527 | } | ||
| 528 | } | ||
| 520 | } | 529 | } |
| 521 | for (i = 1; i < num_unexec_regions; i++) | 530 | |
| 531 | int n = 0; | ||
| 532 | unexec_region_info r = unexec_regions[0]; | ||
| 533 | for (int i = 1; i < num_unexec_regions; i++) | ||
| 522 | { | 534 | { |
| 523 | if (r.range.address + r.range.size == unexec_regions[i].range.address | 535 | if (r.range.address + r.range.size == unexec_regions[i].range.address |
| 524 | && r.range.size - r.filesize < 2 * pagesize) | 536 | && r.range.size - r.filesize < 2 * pagesize) |
| @@ -530,17 +542,6 @@ unexec_regions_merge (void) | |||
| 530 | { | 542 | { |
| 531 | unexec_regions[n++] = r; | 543 | unexec_regions[n++] = r; |
| 532 | r = unexec_regions[i]; | 544 | r = unexec_regions[i]; |
| 533 | padsize = r.range.address & (pagesize - 1); | ||
| 534 | if (padsize) | ||
| 535 | { | ||
| 536 | if ((unexec_regions[n-1].range.address | ||
| 537 | + unexec_regions[n-1].range.size) == r.range.address) | ||
| 538 | unexec_regions[n-1].range.size -= padsize; | ||
| 539 | |||
| 540 | r.range.address -= padsize; | ||
| 541 | r.range.size += padsize; | ||
| 542 | r.filesize += padsize; | ||
| 543 | } | ||
| 544 | } | 545 | } |
| 545 | } | 546 | } |
| 546 | unexec_regions[n++] = r; | 547 | unexec_regions[n++] = r; |