]> git.eshelyaron.com Git - emacs.git/commit
* lisp/wdired.el: Apply text properties lazily
authorArthur Miller <arthur.miller@live.com>
Sat, 27 Mar 2021 07:29:44 +0000 (08:29 +0100)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 27 Mar 2021 13:10:39 +0000 (09:10 -0400)
commit4dbc44550da640529c7ded7378caf0db439b0bbd
treec8964c3cdc24dcab8c120235e4bcd9e1405d1bcf
parent47ec253a5d7c6b9ae3dd988cdcdcf88b015e5e8e
* lisp/wdired.el: Apply text properties lazily

Entering wdired was taking time proportional to the size of the directory,
making it inconvenient to quickly enter wdired just to rename one or two
files in a large directory.

(wdired-mode-map): Rebind `self-insert-command`.
(wdired--perm-beg, wdired--perm-end): New vars.
(wdired--col-perm, wdired--old-content, wdired--old-point)
(wdired--old-marks): Rename vars, using "--" rather than "-".
All users updated.
(wdired--before-change-fn): New function.
(wdired-change-to-wdired-mode): Use it `before-change-functions`
instead of eagerly putting the various text properties here.
(wdired--set-permission-bounds, wdired--current-column)
(wdired--point-at-perms-p, wdired--line-preprocessed-p):
New auxiliary functions.
(wdired--self-insert): New command.
(wdired--preprocess-files, wdired--preprocess-symlinks)
(wdired--preprocess-perms): Add "--" to the name.  Make it operate only
on the current line.  Use `with-silent-modifications`.
(wdired-abort-changes): Use `with-silent-modifications`.
lisp/wdired.el