Skip to content

Commit c08b94b

Browse files
David Friantchrisbra
authored andcommitted
patch 9.1.1640: Unicode has deprecated some code-points
Problem: Unicode has deprecated some code-points Solution: Update the digraph tables to align with the Unicode v16 release (David Friant) This commit updates the digraphs Left-Pointing Angle Bracket '</' and Right-Pointing Angle Bracket '/>' to account for the fact that the old Unicode codepoints for them (2329 and 232A, respectively) have been deprecated. As per the Miscellaneous Technical code chart (https://www.unicode.org/charts/PDF/U2300.pdf), the old digraphs have been reassigned to the CJK Left Angle Bracket and Right Angle Bracket (3008 and 3009) with their declaration moved to the appropriate block. This commit also introduces the new digraphs '<[' and ']>' to represent the Mathematical Left Angle Bracket and Mathematical Right Angle Bracket (27E8 and 27E9) to replace the deprecated code points in the Technical block. Tests have been added and, I believe, the documentation has been updated accordingly. closes: vim#17990 Signed-off-by: David Friant <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent 1e38198 commit c08b94b

File tree

5 files changed

+29
-6
lines changed

5 files changed

+29
-6
lines changed

runtime/doc/digraph.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*digraph.txt* For Vim version 9.1. Last change: 2025 Feb 02
1+
*digraph.txt* For Vim version 9.1. Last change: 2025 Aug 16
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1105,8 +1105,8 @@ char digraph hex dec official name ~
11051105
⌕ TR 2315 8981 TELEPHONE RECORDER
11061106
⌠ Iu 2320 8992 TOP HALF INTEGRAL
11071107
⌡ Il 2321 8993 BOTTOM HALF INTEGRAL
1108-
〈 </ 2329 9001 LEFT-POINTING ANGLE BRACKET
1109-
〉 /> 232A 9002 RIGHT-POINTING ANGLE BRACKET
1108+
⟨ <[ 27E8 10040 LEFT MATHEMATICAL ANGLE BRACKET
1109+
⟩ ]> 27E9 10041 RIGHT MATHEMATICAL ANGLE BRACKET
11101110
␣ Vs 2423 9251 OPEN BOX
11111111
⑀ 1h 2440 9280 OCR HOOK
11121112
⑁ 3h 2441 9281 OCR CHAIR
@@ -1246,6 +1246,8 @@ char digraph hex dec official name ~
12461246
々 *_ 3005 12293 IDEOGRAPHIC ITERATION MARK
12471247
〆 ;_ 3006 12294 IDEOGRAPHIC CLOSING MARK
12481248
〇 0_ 3007 12295 IDEOGRAPHIC NUMBER ZERO
1249+
〈 </ 3008 12296 LEFT ANGLE BRACKET
1250+
〉 /> 3009 12297 RIGHT ANGLE BRACKET
12491251
《 <+ 300A 12298 LEFT DOUBLE ANGLE BRACKET
12501252
》 >+ 300B 12299 RIGHT DOUBLE ANGLE BRACKET
12511253
「 <' 300C 12300 LEFT CORNER BRACKET

runtime/doc/version9.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*version9.txt* For Vim version 9.1. Last change: 2025 Aug 12
1+
*version9.txt* For Vim version 9.1. Last change: 2025 Aug 16
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41739,6 +41739,12 @@ Others: ~
4173941739
- The close button shown in the non-GUI 'tabline' will only be visible if the
4174041740
'mouse' option contains either "a" or any of the flags "n", "v", or "i".
4174141741
- |C-indenting| handles compound literals.
41742+
- The digraphs "</" (LEFT-POINTING ANGLE BRACKET) and ">/" (RIGHT-POINTING
41743+
ANGLE BRACKET) have been changed to represent LEFT ANGLE BRACKET and RIGHT
41744+
ANGLE BRACKET to match the Unicode Miscellaneous Technical code chart from
41745+
Unicode 16.
41746+
- Two additional digraphs have been added: LEFT ANGLE BRACKET "<[" and RIGHT
41747+
ANGLE BRACKET "]>".
4174241748

4174341749
*added-9.2*
4174441750
Added ~

src/digraph.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,8 +1028,8 @@ static digr_T digraphdefault[] = {
10281028
{'T', 'R', 0x2315},
10291029
{'I', 'u', 0x2320},
10301030
{'I', 'l', 0x2321},
1031-
{'<', '/', 0x2329},
1032-
{'/', '>', 0x232a},
1031+
{'<', '[', 0x27e8},
1032+
{']', '>', 0x27e9},
10331033
# define DG_START_OTHER2 0x2423
10341034
{'V', 's', 0x2423},
10351035
{'1', 'h', 0x2440},
@@ -1176,6 +1176,8 @@ static digr_T digraphdefault[] = {
11761176
{'*', '_', 0x3005},
11771177
{';', '_', 0x3006},
11781178
{'0', '_', 0x3007},
1179+
{'<', '/', 0x3008},
1180+
{'/', '>', 0x3009},
11791181
{'<', '+', 0x300a},
11801182
{'>', '+', 0x300b},
11811183
{'<', '\'', 0x300c},

src/testdir/test_digraph.vim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,5 +612,16 @@ func Test_digraph_getlist_function()
612612
call assert_fails('call digraph_getlist(0z12)', 'E1212: Bool required for argument 1')
613613
endfunc
614614

615+
func Test_digraph_angle_bracket_patch()
616+
" Ensure that the deprecated angle brackets 2329/232A ('</','/>') are not used
617+
call assert_notequal('', digraph_get('</'))
618+
call assert_notequal('', digraph_get('/>'))
619+
" Ensure that the CJK angle brackets 3008/3009 ('</','/>') are used
620+
call assert_equal('', digraph_get('</'))
621+
call assert_equal('', digraph_get('/>'))
622+
" Ensure that the mathematical angle brackets 27E8/27E9 ('<[',']>') are defined
623+
call assert_equal('', digraph_get('<['))
624+
call assert_equal('', digraph_get(']>'))
625+
endfunc
615626

616627
" vim: shiftwidth=2 sts=2 expandtab

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,8 @@ static char *(features[]) =
719719

720720
static int included_patches[] =
721721
{ /* Add new patch number below this line */
722+
/**/
723+
1640,
722724
/**/
723725
1639,
724726
/**/

0 commit comments

Comments
 (0)