• Michael Albinus's avatar
    Code cleanup wrt file locks · a6a92e3a
    Michael Albinus authored
    * lisp/files.el (make-lock-file-name): Fix docstring.
    
    * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
    * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
    * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
    * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
    * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
    * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
    * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
    * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
    * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
    Add `make-lock-file-name'.
    
    * lisp/net/tramp.el (tramp-file-name-for-operation):
    Add `make-lock-file-name'.
    (tramp-handle-unlock-file): Call `userlock--handle-unlock-error'
    in case of error.
    
    * src/buffer.c (Frestore_buffer_modified_p):
    * src/editfns.c (Freplace_buffer_contents):
    * src/fileio.c (Finsert_file_contents, write_region): Call Funlock_file.
    
    * src/filelock.c (unlock_file): Rename from unlock_file_body.
    Remove the other declarations of unlock_file.  Move file name
    handler check to ...
    (Funlock_file): ... here.  Adapt argument numbers.  Call
    unlock_file wrapped by internal_condition_case.
    (Flock_file): Adapt argument numbers.
    (unlock_all_files, Funlock_buffer, unlock_buffer): Call Funlock_file.
    
    * src/lisp.h (unlock_file): Remove.
    a6a92e3a
tramp-sshfs.el 15 KB