]> git.eshelyaron.com Git - emacs.git/commit
* lisp/wdired.el: Fix minor regressions and simplify a bit
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 27 Mar 2021 14:54:10 +0000 (10:54 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 27 Mar 2021 15:33:43 +0000 (11:33 -0400)
commit6838cc50f94f7b1f1d985961761cc5db232f6c02
tree8e860c7c88dac4a18f74aed763a8faa816b1956e
parente26d0e611aaf477a88119c506f942036c338688f
* lisp/wdired.el: Fix minor regressions and simplify a bit

Use `wdired--current-column` more consistently to avoid mayhem when it
doesn't return the same result as `current-column`.

(wdired-get-filename): Fix the unprocessed case.
(wdired-finish-edit): Don't force processing all the lines.
(wdired--col-perm): Remove, redundant with `wdired--perm-beg`.
(wdired-change-to-wdired-mode): Don't error in empty directory.
(wdired--set-permission-bounds): Set `wdired--perm-beg` when we can't
find permissions.  Move `wdired--perm-beg` 1 char further (like
`wdired--col-perm`).  Use `wdired--current-column`.
(wdired--point-at-perms-p): Fix when `wdired--perm-beg` is nil.
(wdired--self-insert): Lookup the keymap to know command to call.
(wdired--before-change-fn): Just use `point` instead of `beg`.
Use `with-silent-modifications` here rather than in each of the
`wdired--preprocess-*` functions.
(wdired--preprocess-files): Presume we're at BOL and within
`with-silent-modifications`.  Fix application of `read-only`.
(wdired-abort-changes): Don't use `with-silent-modifications` since
we're really modifying the buffer.
(wdired--preprocess-symlinks): Presume we're at BOL and within
`with-silent-modifications`.
(wdired--preprocess-perms): Presume we're at BOL and within
`with-silent-modifications`.
(wdired-set-bit): Add `char` argument.  Use `wdired--current-column`.
Copy previous text properties rather than duplicating the code of
`wdired--preprocess-perms`.
(wdired-toggle-bit): Delegate to `wdired-set-bit`.
lisp/wdired.el