aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
authorEli Zaretskii2017-07-17 17:50:37 +0300
committerEli Zaretskii2017-07-17 17:50:37 +0300
commitd7f7fef1c1cdef206860a7075873de7d6c521d8d (patch)
treeabc7489210594cfdd4324404f1fe8155dfd58953 /src/buffer.h
parent5e2ae74df54d4090c591c79ab13e7713c6654b9c (diff)
downloademacs-d7f7fef1c1cdef206860a7075873de7d6c521d8d.tar.gz
emacs-d7f7fef1c1cdef206860a7075873de7d6c521d8d.zip
Allow user control on what starts and ends a paragraph for bidi
* src/buffer.h (struct buffer): New members bidi_paragraph_separate_re_ and bidi_paragraph_start_re_. * src/buffer.c (bset_bidi_paragraph_start_re) (bset_bidi_paragraph_separate_re): New setters/ (Fbuffer_swap_text): Swap the values of bidi-paragraph-start-re and bidi-paragraph-separate-re. (init_buffer_once): Init the values of bidi-paragraph-start-re and bidi-paragraph-separate-re. (syms_of_buffer) <bidi-paragraph-start-re, bidi-paragraph-separate-re>: New per-buffer variables. * src/bidi.c (bidi_at_paragraph_end, bidi_find_paragraph_start): Support bidi-paragraph-start-re and bidi-paragraph-separate-re. (bidi_move_to_visually_next): Handle correctly the case when the separator matches an empty string. (Bug#27526) * doc/emacs/mule.texi (Bidirectional Editing): * doc/lispref/display.texi (Bidirectional Display): Document bidi-paragraph-start-re and bidi-paragraph-separate-re. * etc/NEWS: Mention bidi-paragraph-start-re and bidi-paragraph-separate-re.
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h
index be270fe4823..46ca6aa7384 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -611,6 +611,12 @@ struct buffer
611 direction dynamically for each paragraph. */ 611 direction dynamically for each paragraph. */
612 Lisp_Object bidi_paragraph_direction_; 612 Lisp_Object bidi_paragraph_direction_;
613 613
614 /* If non-nil, a regular expression for bidi paragraph separator. */
615 Lisp_Object bidi_paragraph_separate_re_;
616
617 /* If non-nil, a regular expression for bidi paragraph start. */
618 Lisp_Object bidi_paragraph_start_re_;
619
614 /* Non-nil means do selective display; 620 /* Non-nil means do selective display;
615 see doc string in syms_of_buffer (buffer.c) for details. */ 621 see doc string in syms_of_buffer (buffer.c) for details. */
616 Lisp_Object selective_display_; 622 Lisp_Object selective_display_;