[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110862: * lisp/ido.el (ido-set-m
From: |
Dmitry Gutov |
Subject: |
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110862: * lisp/ido.el (ido-set-matches-1): Improve flex matching performance by |
Date: |
Sat, 10 Nov 2012 06:30:54 +0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) |
What, no fix for 24.3?
I though you were going to commit the one-liner there first.
Leo Liu <address@hidden> writes:
> ------------------------------------------------------------
> revno: 110862
> fixes bug: http://debbugs.gnu.org/12796
> committer: Leo Liu <address@hidden>
> branch nick: trunk
> timestamp: Sat 2012-11-10 09:28:22 +0800
> message:
> * lisp/ido.el (ido-set-matches-1): Improve flex matching performance by
> removing backtracking in the regexp (suggested by Stefan).
> modified:
> lisp/ChangeLog
> lisp/ido.el
> === modified file 'lisp/ChangeLog'
> --- a/lisp/ChangeLog 2012-11-09 22:20:47 +0000
> +++ b/lisp/ChangeLog 2012-11-10 01:28:22 +0000
> @@ -1,3 +1,8 @@
> +2012-11-10 Leo Liu <address@hidden>
> +
> + * ido.el (ido-set-matches-1): Improve flex matching performance by
> + removing backtracking in the regexp (suggested by Stefan). (Bug#12796)
> +
> 2012-11-09 Stefan Monnier <address@hidden>
>
> * emacs-lisp/advice.el (ad-set-advice-info): Set defalias-fset-function.
>
> === modified file 'lisp/ido.el'
> --- a/lisp/ido.el 2012-10-05 07:38:05 +0000
> +++ b/lisp/ido.el 2012-11-10 01:28:22 +0000
> @@ -3764,7 +3764,11 @@
> ido-enable-flex-matching
> (> (length ido-text) 1)
> (not ido-enable-regexp))
> - (setq re (mapconcat #'regexp-quote (split-string ido-text "") ".*"))
> + (setq re (concat (regexp-quote (string (aref ido-text 0)))
> + (mapconcat (lambda (c)
> + (concat "[^" (string c) "]*"
> + (regexp-quote (string c))))
> + (substring ido-text 1) "")))
> (if ido-enable-prefix
> (setq re (concat "\\`" re)))
> (mapc