summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2020-04-05 07:50:15 -0700
committerGlenn Morris <rgm@gnu.org>2020-04-05 07:50:15 -0700
commit333f63d53706de9d1a1dbc04ed62f9dc0e9698db (patch)
tree8384df145897e7845c3ef738d9b27ff35c63fbf3 /lisp/emacs-lisp
parent0e18fdd1b6e86b8b9704e3a73204f94682ee9450 (diff)
parent6de20c7eab0dd8360e78d744dbf62aecc7f78281 (diff)
downloademacs-333f63d53706de9d1a1dbc04ed62f9dc0e9698db.tar.gz
emacs-333f63d53706de9d1a1dbc04ed62f9dc0e9698db.tar.bz2
emacs-333f63d53706de9d1a1dbc04ed62f9dc0e9698db.zip
Merge from origin/emacs-27
6de20c7eab (origin/emacs-27) Fix syntax error in man page. f8607d3c03 Handle filling of indented ChangeLog function entries 7e78f0d1b2 Fix void-variable n-reb in re-builder (Bug#40409) 452d776a5d Fix small bug in copy_string_contents. fa823653ff Fix invocations of gpg from Gnus d4f51d0a2e Don't draw GTK's internal border and tab bar on top of eac... 38731d504e ; * src/buffer.c (syms_of_buffer) <inhibit-read-only>: Doc... 44ac9e48bb Tweak htmlfontify's generated output
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/re-builder.el17
1 files changed, 8 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 580e91483db..0e1618e010a 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -767,22 +767,21 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions."
(reb-mark-non-matching-parenthesis))
nil)))
-(defsubst reb-while (limit counter where)
- (let ((count (symbol-value counter)))
- (if (= count limit)
- (progn
- (message "Reached (while limit=%s, where=%s)" limit where)
- nil)
- (set counter (1+ count)))))
+(defsubst reb-while (limit current where)
+ (if (< current limit)
+ (1+ current)
+ (message "Reached (while limit=%s, where=%s)" limit where)
+ nil))
(defun reb-mark-non-matching-parenthesis (bound)
;; We have a small string, check the whole of it, but wait until
;; everything else is fontified.
(when (>= bound (point-max))
- (let (left-pars
+ (let ((n-reb 0)
+ left-pars
faces-here)
(goto-char (point-min))
- (while (and (reb-while 100 'n-reb "mark-par")
+ (while (and (setq n-reb (reb-while 100 n-reb "mark-par"))
(not (eobp)))
(skip-chars-forward "^()")
(unless (eobp)