1
0
mirror of https://github.com/djcb/mu.git synced 2024-06-21 06:56:48 +02:00

Use and instead of progn and fix some long lines

This commit is contained in:
Thierry Volpiatto 2021-08-17 16:11:21 +02:00
parent 58cff913fe
commit 7929b9a852
No known key found for this signature in database
GPG Key ID: 08FDB07A7433A7F2

View File

@ -506,13 +506,14 @@ containing commas."
do (mm-save-part-to-file do (mm-save-part-to-file
h (let ((file (expand-file-name f dir))) h (let ((file (expand-file-name f dir)))
(if (file-exists-p file) (if (file-exists-p file)
(let (newname (let (newname (count 1))
(count 1)) (while (and
(while (progn (setq newname
(setq newname (concat (file-name-sans-extension file) (concat
(format "(%s)" count) (file-name-sans-extension file)
(file-name-extension file t))) (format "(%s)" count)
(file-exists-p newname)) (file-name-extension file t)))
(file-exists-p newname))
(cl-incf count)) (cl-incf count))
newname) newname)
file))))) file)))))