diff runtime/doc/eval.txt @ 25378:890fd8211202 v8.2.3226

patch 8.2.3226: new digraph functions use old naming scheme Commit: https://github.com/vim/vim/commit/29b857150c111a455f1a38a8f748243524f692e1 Author: h-east <h.east.727@gmail.com> Date: Mon Jul 26 21:54:04 2021 +0200 patch 8.2.3226: new digraph functions use old naming scheme Problem: New digraph functions use old naming scheme. Solution: Use the digraph_ prefix. (Hirohito Higashi, closes https://github.com/vim/vim/issues/8580)
author Bram Moolenaar <Bram@vim.org>
date Mon, 26 Jul 2021 22:00:07 +0200
parents c626fd34b66f
children 4101d78f78e2
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2548,6 +2548,10 @@ deletebufline({expr}, {first} [, {last}]
 did_filetype()			Number	|TRUE| if FileType autocmd event used
 diff_filler({lnum})		Number	diff filler lines about {lnum}
 diff_hlID({lnum}, {col})	Number	diff highlighting at {lnum}/{col}
+digraph_get({chars})		String	get the digraph of {chars}
+digraph_getlist([{listall}])	List	get all |digraph|s
+digraph_set({chars}, {digraph})	Boolean	register |digraph|
+digraph_setlist({digraphlist})	Boolean	register multiple |digraph|s
 echoraw({expr})			none	output {expr} as-is
 empty({expr})			Number	|TRUE| if {expr} is empty
 environ()			Dict	return environment variables
@@ -2620,8 +2624,6 @@ getcompletion({pat}, {type} [, {filtered
 getcurpos([{winnr}])		List	position of the cursor
 getcursorcharpos([{winnr}])	List	character position of the cursor
 getcwd([{winnr} [, {tabnr}]])	String	get the current working directory
-getdigraph({chars})		String	get the digraph of {chars}
-getdigraphlist([{listall}])	List	get all |digraph|s
 getenv({name})			String	return environment variable
 getfontname([{name}])		String	name of font being used
 getfperm({fname})		String	file permissions of file {fname}
@@ -2888,8 +2890,6 @@ setcharpos({expr}, {list})	Number	set th
 setcharsearch({dict})		Dict	set character search from {dict}
 setcmdpos({pos})		Number	set cursor position in command-line
 setcursorcharpos({list})	Number	move cursor to position in {list}
-setdigraph({chars}, {digraph})	Boolean  register |digraph|
-setdigraphlist({digraphlist})	Boolean  register multiple |digraph|s
 setenv({name}, {val})		none	set environment variable
 setfperm({fname}, {mode})	Number	set {fname} file permissions to {mode}
 setline({lnum}, {line})		Number	set line {lnum} to {line}
@@ -4198,6 +4198,107 @@ diff_hlID({lnum}, {col})				*diff_hlID()
 
 		Can also be used as a |method|: >
 			GetLnum()->diff_hlID(col)
+<
+
+digraph_get({chars})					*digraph_get()* *E1214*
+		Return the digraph of {chars}.  This should be a string with
+		exactly two characters.  If {chars} are not just two
+		characters, or the digraph of {chars} does not exist, an error
+		is given and an empty string is returned.
+
+		The character will be converted from Unicode to 'encoding'
+		when needed.  This does require the conversion to be
+		available, it might fail.
+
+		Also see |digraph_getlist()|.
+
+		Examples: >
+		" Get a built-in digraph
+		:echo digraph_get('00')		" Returns '∞'
+
+		" Get a user-defined digraph
+		:call digraph_set('aa', 'あ')
+		:echo digraph_get('aa')		" Returns 'あ'
+<
+		Can also be used as a |method|: >
+			GetChars()->digraph_get()
+<
+		This function works only when compiled with the |+digraphs|
+		feature.  If this feature is disabled, this function will
+		display an error message.
+
+
+digraph_getlist([{listall}])				*digraph_getlist()*
+		Return a list of digraphs.  If the {listall} argument is given
+		and it is TRUE, return all digraphs, including the default
+		digraphs.  Otherwise, return only user-defined digraphs.
+
+		The characters will be converted from Unicode to 'encoding'
+		when needed.  This does require the conservation to be
+		available, it might fail.
+
+		Also see |digraph_get()|.
+
+		Examples: >
+		" Get user-defined digraphs
+		:echo digraph_getlist()
+
+		" Get all the digraphs, including default digraphs
+		:echo digraph_getlist(1)
+<
+		Can also be used as a |method|: >
+			GetNumber()->digraph_getlist()
+<
+		This function works only when compiled with the |+digraphs|
+		feature.  If this feature is disabled, this function will
+		display an error message.
+
+
+digraph_set({chars}, {digraph})				*digraph_set()* *E1205*
+		Add digraph {chars} to the list.  {chars} must be a string
+		with two characters.  {digraph} is a string with one utf-8
+		encoded character. Be careful, composing characters are NOT
+		ignored.  This function is similar to |:digraphs| command, but
+		useful to add digraphs start with a white space.
+
+		The function result is v:true if |digraph| is registered.  If
+		this fails an error message is given and v:false is returned.
+
+		If you want to define multiple digraphs at once, you can use
+		|digraph_setlist()|.
+
+		Example: >
+			call digraph_set('  ', 'あ')
+<
+		Can be used as a |method|: >
+			GetString()->digraph_set('あ')
+<
+		This function works only when compiled with the |+digraphs|
+		feature.  If this feature is disabled, this function will
+		display an error message.
+
+
+digraph_setlist({digraphlist})				*digraph_setlist()*
+		Similar to |digraph_set()| but this function can add multiple
+		digraphs at once.  {digraphlist} is a list composed of lists,
+		where each list contains two strings with {chars} and
+		{digraph} as in |digraph_set()|.
+		Example: >
+		    call digraph_setlist([['aa', 'あ'], ['ii', 'い']])
+<
+		It is similar to the following: >
+		    for [chars, digraph] in [['aa', 'あ'], ['ii', 'い']]
+			  call digraph_set(chars, digraph)
+		    endfor
+<		Except that the function returns after the first error,
+		following digraphs will not be added.
+
+		Can be used as a |method|: >
+		    GetList()->digraph_setlist()
+<
+		This function works only when compiled with the |+digraphs|
+		feature.  If this feature is disabled, this function will
+		display an error message.
 
 
 echoraw({expr})						*echoraw()*
@@ -5575,61 +5676,6 @@ getcwd([{winnr} [, {tabnr}]])
 
 <		Can also be used as a |method|: >
 			GetWinnr()->getcwd()
-<
-					      *getdigraph()* *E1214*
-getdigraph({chars})
-		Return the digraph of {chars}.  This should be a string with
-		exactly two characters.  If {chars} are not just two
-		characters, or the digraph of {chars} does not exist, an error
-		is given and an empty string is returned.
-
-		The character will be converted from Unicode to 'encoding'
-		when needed.  This does require the conversion to be
-		available, it might fail.
-
-		Also see |getdigraphlist()|.
-
-		Examples: >
-		" Get a built-in digraph
-		:echo getdigraph('00')		" Returns '∞'
-
-		" Get a user-defined digraph
-		:call setdigraph('aa', 'あ')
-		:echo getdigraph('aa')		" Returns 'あ'
-<
-		Can also be used as a |method|: >
-			GetChars()->getdigraph()
-<
-		This function works only when compiled with the |+digraphs|
-		feature.  If this feature is disabled, this function will
-		display an error message.
-
-
-getdigraphlist([{listall}])			*getdigraphlist()*
-		Return a list of digraphs.  If the {listall} argument is given
-		and it is TRUE, return all digraphs, including the default
-		digraphs.  Otherwise, return only user-defined digraphs.
-
-		The characters will be converted from Unicode to 'encoding'
-		when needed.  This does require the conservation to be
-		available, it might fail.
-
-		Also see |getdigraph()|.
-
-		Examples: >
-		" Get user-defined digraphs
-		:echo getdigraphlist()
-
-		" Get all the digraphs, including default digraphs
-		:echo digraphlist(1)
-<
-		Can also be used as a |method|: >
-			GetNumber()->getdigraphlist()
-<
-		This function works only when compiled with the |+digraphs|
-		feature.  If this feature is disabled, this function will
-		display an error message.
-
 
 getenv({name})						*getenv()*
 		Return the value of environment variable {name}.
@@ -9550,53 +9596,6 @@ setcursorcharpos({list})
 			GetCursorPos()->setcursorcharpos()
 
 
-setdigraph({chars}, {digraph})		*setdigraph()* *E1205*
-		Add digraph {chars} to the list.  {chars} must be a string
-		with two characters.  {digraph} is a string with one utf-8
-		encoded character. Be careful, composing characters are NOT
-		ignored.  This function is similar to |:digraphs| command, but
-		useful to add digraphs start with a white space.
-
-		The function result is v:true if |digraph| is registered.  If
-		this fails an error message is given and v:false is returned.
-
-		If you want to define multiple digraphs at once, you can use
-		|setdigraphlist()|.
-
-		Example: >
-			call setdigraph('  ', 'あ')
-<
-		Can be used as a |method|: >
-			GetString()->setdigraph('あ')
-<
-		This function works only when compiled with the |+digraphs|
-		feature.  If this feature is disabled, this function will
-		display an error message.
-
-
-setdigraphlist({digraphlist})			*setdigraphlist()*
-		Similar to |setdigraph()| but this function can add multiple
-		digraphs at once.  {digraphlist} is a list composed of lists,
-		where each list contains two strings with {chars} and
-		{digraph} as in |setdigraph()|.
-		Example: >
-		    call setdigraphlist([['aa', 'あ'], ['ii', 'い']])
-<
-		It is similar to the following: >
-		    for [chars, digraph] in [['aa', 'あ'], ['ii', 'い']]
-			  call setdigraph(chars, digraph)
-		    endfor
-<		Except that the function returns after the first error,
-		following digraphs will not be added.
-
-		Can be used as a |method|: >
-		    GetList()->setdigraphlist()
-<
-		This function works only when compiled with the |+digraphs|
-		feature.  If this feature is disabled, this function will
-		display an error message.
-
-
 setenv({name}, {val})						*setenv()*
 		Set environment variable {name} to {val}.
 		When {val} is |v:null| the environment variable is deleted.