Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
61c6f873
Commit
61c6f873
authored
Nov 16, 1994
by
Richard M. Stallman
Browse files
(dired-collect-file-versions): Discard version #s from
arg; then do nothing if already in dired-file-version-alist.
parent
d0011c11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
lisp/dired-aux.el
lisp/dired-aux.el
+18
-13
No files found.
lisp/dired-aux.el
View file @
61c6f873
...
...
@@ -246,19 +246,24 @@ with a prefix argument."
(
forward-line
1
)))))
(
defun
dired-collect-file-versions
(
fn
)
;; "If it looks like file FN has versions, return a list of the versions.
;;That is a list of strings which are file names.
;;The caller may want to flag some of these files for deletion."
(
let*
((
base-versions
(
concat
(
file-name-nondirectory
fn
)
".~"
))
(
bv-length
(
length
base-versions
))
(
possibilities
(
file-name-all-completions
base-versions
(
file-name-directory
fn
)))
(
versions
(
mapcar
'backup-extract-version
possibilities
)))
(
if
versions
(
setq
dired-file-version-alist
(
cons
(
cons
fn
versions
)
dired-file-version-alist
)))))
(
let
((
fn
(
file-name-sans-versions
fn
)))
;; Only do work if this file is not already in the alist.
(
if
(
assoc
fn
dired-file-version-alist
)
nil
;; If it looks like file FN has versions, return a list of the versions.
;;That is a list of strings which are file names.
;;The caller may want to flag some of these files for deletion."
(
let*
((
base-versions
(
concat
(
file-name-nondirectory
fn
)
".~"
))
(
bv-length
(
length
base-versions
))
(
possibilities
(
file-name-all-completions
base-versions
(
file-name-directory
fn
)))
(
versions
(
mapcar
'backup-extract-version
possibilities
)))
(
if
versions
(
setq
dired-file-version-alist
(
cons
(
cons
fn
versions
)
dired-file-version-alist
)))))))
(
defun
dired-trample-file-versions
(
fn
)
(
let*
((
start-vn
(
string-match
"\\.~[0-9]+~$"
fn
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment