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
1 changed files with 8 additions and 7 deletions

View File

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