diff options
| author | Philipp Stephani | 2017-05-07 21:01:53 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2017-06-17 15:40:58 +0200 |
| commit | d682f0daa3c0bfdd5ee8ce0e9226353d505e85a9 (patch) | |
| tree | ef0a6de2163d2f3c3c9bcb5012875e0018ef496f /admin | |
| parent | 46279c1ea117bab75bdeccfd04703033c9e7d26d (diff) | |
| download | emacs-d682f0daa3c0bfdd5ee8ce0e9226353d505e85a9.tar.gz emacs-d682f0daa3c0bfdd5ee8ce0e9226353d505e85a9.zip | |
Add command to replace buffer contents
Add a new command 'replace-buffer-contents' that uses the Myers diff
algorithm to non-destructively replace the accessible portion of the
current buffer. The Myers algorithm is implemented in Gnulib.
* src/editfns.c (Freplace_buffer_contents): New command.
(set_bit, bit_is_set, buffer_chars_equal): New helper functions.
(syms_of_editfns): Define new command.
* test/src/editfns-tests.el (replace-buffer-contents-1)
(replace-buffer-contents-2): New unit tests.
* src/buffer.h (BUF_FETCH_CHAR_AS_MULTIBYTE): New helper macro.
* admin/merge-gnulib (GNULIB_MODULES): Add diffseq.h and minmax.h.
Diffstat (limited to 'admin')
| -rwxr-xr-x | admin/merge-gnulib | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/admin/merge-gnulib b/admin/merge-gnulib index e5fb0f59fb3..d4bbf17cb3d 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib | |||
| @@ -30,12 +30,12 @@ GNULIB_MODULES=' | |||
| 30 | careadlinkat close-stream | 30 | careadlinkat close-stream |
| 31 | count-leading-zeros count-one-bits count-trailing-zeros | 31 | count-leading-zeros count-one-bits count-trailing-zeros |
| 32 | crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 | 32 | crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 |
| 33 | dtoastr dtotimespec dup2 environ execinfo faccessat | 33 | diffseq dtoastr dtotimespec dup2 environ execinfo faccessat |
| 34 | fcntl fcntl-h fdatasync fdopendir | 34 | fcntl fcntl-h fdatasync fdopendir |
| 35 | filemode filevercmp flexmember fstatat fsync | 35 | filemode filevercmp flexmember fstatat fsync |
| 36 | getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog | 36 | getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog |
| 37 | ignore-value intprops largefile lstat | 37 | ignore-value intprops largefile lstat |
| 38 | manywarnings memrchr mkostemp mktime | 38 | manywarnings memrchr minmax mkostemp mktime |
| 39 | pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat | 39 | pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat |
| 40 | sig2str socklen stat-time std-gnu11 stdalign stddef stdio | 40 | sig2str socklen stat-time std-gnu11 stdalign stddef stdio |
| 41 | stpcpy strftime strtoimax symlink sys_stat | 41 | stpcpy strftime strtoimax symlink sys_stat |