File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,8 +181,11 @@ to do so), or pressing Esc and then the key.
181181Julia's REPL keybindings may be fully customized to a user's preferences by passing a dictionary
182182to ` REPL.setup_interface ` . The keys of this dictionary may be characters or strings. The key
183183` '*' ` refers to the default action. Control plus character ` x ` bindings are indicated with ` "^x" ` .
184- Meta plus ` x ` can be written ` "\\Mx" ` . The values of the custom keymap must be ` nothing ` (indicating
185- that the input should be ignored) or functions that accept the signature ` (PromptState, AbstractREPL, Char) ` .
184+ Meta plus ` x ` can be written ` "\\M-x" ` or ` "\ex" ` , and Control plus ` x ` can be written
185+ ` "\\C-x" ` or ` "^x" ` .
186+ The values of the custom keymap must be ` nothing ` (indicating
187+ that the input should be ignored) or functions that accept the signature
188+ ` (PromptState, AbstractREPL, Char) ` .
186189The ` REPL.setup_interface ` function must be called before the REPL is initialized, by registering
187190the operation with [ ` atreplinit ` ] ( @ref ) . For example, to bind the up and down arrow keys to move through
188191history without prefix search, one could put the following code in ` ~/.julia/config/startup.jl ` :
Original file line number Diff line number Diff line change @@ -1295,12 +1295,12 @@ function normalize_key(key::AbstractString)
12951295 c, i = iterate (key, i)
12961296 if c == ' C'
12971297 c, i = iterate (key, i)
1298- @assert c == ' -'
1298+ c == ' -' || error ( " the Control key specifier must start with \"\\\\ C- \" " )
12991299 c, i = iterate (key, i)
13001300 write (buf, uppercase (c)- 64 )
13011301 elseif c == ' M'
13021302 c, i = iterate (key, i)
1303- @assert c == ' -'
1303+ c == ' -' || error ( " the Meta key specifier must start with \"\\\\ M- \" " )
13041304 c, i = iterate (key, i)
13051305 write (buf, ' \e ' )
13061306 write (buf, c)
You can’t perform that action at this time.
0 commit comments