diff options
Diffstat (limited to 'lisp/textmodes')
-rw-r--r-- | lisp/textmodes/artist.el | 6 | ||||
-rw-r--r-- | lisp/textmodes/fill.el | 11 | ||||
-rw-r--r-- | lisp/textmodes/reftex-vars.el | 18 |
3 files changed, 22 insertions, 13 deletions
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index ce620821d65..50c00c95320 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -5004,7 +5004,7 @@ The event, EV, is the mouse event." (setq timer (run-at-time interval interval draw-fn x1 y1)))) ;; Read next event - (setq ev (read-event)))) + (setq ev (read--potential-mouse-event)))) ;; Cleanup: get rid of any active timer. (if timer (cancel-timer timer))) @@ -5212,7 +5212,7 @@ The event, EV, is the mouse event." ;; Read next event (only if we should not stop) (if (not done) - (setq ev (read-event))))) + (setq ev (read--potential-mouse-event))))) ;; Reverse point-list (last points are cond'ed first) (setq point-list (reverse point-list)) @@ -5339,7 +5339,7 @@ The event, EV, is the mouse event." ;; Read next event - (setq ev (read-event)))) + (setq ev (read--potential-mouse-event)))) ;; If we are not rubber-banding (that is, we were moving around the `2') ;; draw the shape diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 3346c551d93..6681b03913c 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -743,9 +743,16 @@ space does not end a sentence, so don't break a line there." ;; This is the actual filling loop. (goto-char from) - (let (linebeg) + (let ((first t) + linebeg) (while (< (point) to) - (setq linebeg (point)) + ;; On the first line, there may be text in the fill prefix + ;; zone. In that case, don't consider that area when + ;; trying to find a place to put a line break (bug#45720). + (if (not first) + (setq linebeg (point)) + (setq first nil + linebeg (+ (point) (length fill-prefix)))) (move-to-column (current-fill-column)) (if (when (< (point) to) ;; Find the position where we'll break the line. diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 073059d52e8..1b29eafabf7 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -900,13 +900,14 @@ DOWNCASE t: Downcase words before using them." ,(concat ;; Make sure we search only for optional arguments of ;; environments/macros and don't match any other [. ctable - ;; provides a macro called \ctable, listings/breqn have + ;; provides a macro called \ctable, beamer/breqn/listings have ;; environments. Start with a backslash and a group for names "\\\\\\(?:" ;; begin, optional spaces and opening brace "begin[[:space:]]*{" ;; Build a regexp for env names - (regexp-opt '("lstlisting" "dmath" "dseries" "dgroup" "darray")) + (regexp-opt '("lstlisting" "dmath" "dseries" "dgroup" + "darray" "frame")) ;; closing brace, optional spaces "}[[:space:]]*" ;; Now for macros @@ -919,9 +920,9 @@ DOWNCASE t: Downcase words before using them." "\\[[^][]*" ;; Allow nested levels of chars enclosed in braces "\\(?:{[^}{]*" - "\\(?:{[^}{]*" - "\\(?:{[^}{]*}[^}{]*\\)*" - "}[^}{]*\\)*" + "\\(?:{[^}{]*" + "\\(?:{[^}{]*}[^}{]*\\)*" + "}[^}{]*\\)*" "}[^][]*\\)*" ;; Match the label key "\\<label[[:space:]]*=[[:space:]]*" @@ -935,8 +936,9 @@ The default value matches usual \\label{...} definitions and keyval style [..., label = {...}, ...] label definitions. The regexp for keyval style explicitly looks for environments provided by the packages \"listings\" (\"lstlisting\"), -\"breqn\" (\"dmath\", \"dseries\", \"dgroup\", \"darray\") and -the macro \"\\ctable\" provided by the package of the same name. +\"beamer\" (\"frame\"), \"breqn\" (\"dmath\", \"dseries\", +\"dgroup\", \"darray\") and the macro \"\\ctable\" provided by +the package of the same name. It is assumed that the regexp group 1 matches the label text, so you have to define it using \\(?1:...\\) when adding new regexps. @@ -944,7 +946,7 @@ you have to define it using \\(?1:...\\) when adding new regexps. When changed from Lisp, make sure to call `reftex-compile-variables' afterwards to make the change effective." - :version "27.1" + :version "28.1" :set (lambda (symbol value) (set symbol value) (when (fboundp 'reftex-compile-variables) |