From 740a1e8f3392a305a8f0512bb2c9099168dcce57 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 8 Sep 2023 19:24:53 -0400 Subject: [PATCH] * lisp/tempo.el (tempo-find-match-string): Simplify --- lisp/tempo.el | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lisp/tempo.el b/lisp/tempo.el index 7d8d17cfebc..98521c54eb9 100644 --- a/lisp/tempo.el +++ b/lisp/tempo.el @@ -643,16 +643,10 @@ If `tempo-dirty-collection' is nil, the old collection is reused." FINDER is a function or a string. Returns (STRING . POS), or nil if no reasonable string is found." (cond ((stringp finder) - (let (successful) - (save-excursion - (or (setq successful (re-search-backward finder nil t)) - 0)) - (if successful - (cons (buffer-substring (match-beginning 1) - (match-end 1)) ; This seems to be a - ; bug in emacs - (match-beginning 1)) - nil))) + (if (save-excursion (re-search-backward finder nil t)) + (cons (match-string 1) ; This seems to be a bug in Emacs (?) + (match-beginning 1)) + nil)) (t (funcall finder)))) -- 2.39.5