*** /tmp/ediffH8hUs7 2021-04-06 20:36:48.215610320 +0200 --- /home/albinus/src/emacs/lisp/files.el 2021-04-06 20:36:13.439660165 +0200 *************** *** 392,397 **** --- 392,403 ---- changed to `!' to prevent clashes. This will not work correctly if your filesystem truncates the resulting name. + If the optional element UNIQUIFY is a symbol returned by function + `secure-hash-algorithms', the auto-save file name is constructed + by taking the directory part of the replaced file-name, + concatenated with the buffer file name run through `secure-hash' + instead. This returns a valid name for your filesystem any way. + All the transforms in the list are tried, in the order they are listed. When one transform applies, its result is final; no further transforms are tried. *************** *** 6593,6606 **** uniq (car (cddr (car list))))) (setq list (cdr list))) (if result ! (if uniq ! (setq filename (concat ! (file-name-directory result) ! (subst-char-in-string ! ?/ ?! ! (replace-regexp-in-string "!" "!!" ! filename)))) ! (setq filename result))) (setq result (if (and (eq system-type 'ms-dos) (not (msdos-long-file-names))) --- 6599,6618 ---- uniq (car (cddr (car list))))) (setq list (cdr list))) (if result ! (setq filename ! (cond ! ((member uniq (secure-hash-algorithms)) ! (concat ! (file-name-directory result) ! (secure-hash uniq filename))) ! (uniq ! (concat ! (file-name-directory result) ! (subst-char-in-string ! ?/ ?! ! (replace-regexp-in-string ! "!" "!!" filename)))) ! (t result)))) (setq result (if (and (eq system-type 'ms-dos) (not (msdos-long-file-names)))