]> git.eshelyaron.com Git - emacs.git/commit
Fix translation-region bug with MAX_CHAR
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 13 Jan 2019 23:45:14 +0000 (15:45 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 13 Jan 2019 23:46:44 +0000 (15:46 -0800)
commit1a722e888454a0cb24dffc35455467688b4b4c60
tree715e89cb287001ec3857aacbe988bf5ec0d9f6fd
parent800d3815e4a82f83b98cf87b205dcfdb0670907f
Fix translation-region bug with MAX_CHAR

Also, clean up the code a bit.
Actually I discovered the bug while cleaning up the code.
* src/editfns.c (Fsubst_char_in_region)
(Ftranslate_region_internal): Use bool for booleans.
(Ftranslate_region_internal): Fix off-by-1 bug when a
translation table translates the maximum char.  Assume C99
decl-after-statement, similar minor cleanups.
* test/src/editfns-tests.el (test-translate-region-internal):
New test.
src/editfns.c
test/src/editfns-tests.el