aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmds.c
diff options
context:
space:
mode:
authorEli Zaretskii2010-05-15 16:23:48 +0300
committerEli Zaretskii2010-05-15 16:23:48 +0300
commitd20e1419fda6f29478d79f69db8e128d043d4ee1 (patch)
tree6c3d55edc1c753f3578111b10802397974fc61cc /src/cmds.c
parent98d8b17e45bb1246df61e51f8917b98faa9f1cdd (diff)
downloademacs-d20e1419fda6f29478d79f69db8e128d043d4ee1.tar.gz
emacs-d20e1419fda6f29478d79f69db8e128d043d4ee1.zip
Implement bidi-sensitive movement with arrow keys.
src/bidi.c (bidi_paragraph_init): Don't leave alone garbage values of bidi_it->paragraph_dir. Call bidi_initialize if needed. src/xdisp.c (Fcurrent_bidi_paragraph_direction): New function. (syms_of_xdisp): Defsubr it. src/cmds.c (Fforward_char, Fbackward_char): Doc fix. src/subr.el (right-arrow-command, left-arrow-command): New functions. src/bindings.el (global-map): Bind them to right and left arrow keys. etc/NEWS: Mention current-bidi-paragraph-direction
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/cmds.c b/src/cmds.c
index 5d450fe9a13..b8a65324e9f 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -57,8 +57,12 @@ DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0,
57} 57}
58 58
59DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p", 59DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p",
60 doc: /* Move point right N characters (left if N is negative). 60 doc: /* Move point N characters forward (backward if N is negative).
61On reaching end of buffer, stop and signal error. */) 61On reaching end or beginning of buffer, stop and signal error.
62
63Depending on the bidirectional context, the movement may be to the
64right or to the left on the screen. This is in contrast with
65\\[right-arrow-command], which see. */)
62 (n) 66 (n)
63 Lisp_Object n; 67 Lisp_Object n;
64{ 68{
@@ -93,8 +97,12 @@ On reaching end of buffer, stop and signal error. */)
93} 97}
94 98
95DEFUN ("backward-char", Fbackward_char, Sbackward_char, 0, 1, "^p", 99DEFUN ("backward-char", Fbackward_char, Sbackward_char, 0, 1, "^p",
96 doc: /* Move point left N characters (right if N is negative). 100 doc: /* Move point N characters backward (forward if N is negative).
97On attempt to pass beginning or end of buffer, stop and signal error. */) 101On attempt to pass beginning or end of buffer, stop and signal error.
102
103Depending on the bidirectional context, the movement may be to the
104right or to the left on the screen. This is in contrast with
105\\[left-arrow-command], which see. */)
98 (n) 106 (n)
99 Lisp_Object n; 107 Lisp_Object n;
100{ 108{