• Michael Albinus's avatar
    Further cleanup for file locks · 9ce6541a
    Michael Albinus authored
    * doc/misc/tramp.texi (Top, Configuration): Adapt node name for
    file locks.
    (Auto-save File Lock and Backup): Rename node name and section
    title.  Add file-lock to @cindex.  Describe file locks.
    
    * lisp/dired.el (dired-trivial-filenames): Add lock files.
    (dired-font-lock-keywords): Move files suffixed with
    `completion-ignored-extensions' up.  Add lock files to these checks.
    
    * lisp/net/tramp.el (tramp-get-lock-file, tramp-handle-unlock-file):
    Use `when-let'
    (tramp-lock-file-info-regexp): Rename from
    `tramp-lock-file-contents-regexp'.
    (tramp-handle-file-locked-p, tramp-handle-lock-file): Adapt callees.
    (tramp-handle-lock-file): Set file modes of lockname.
    
    * src/buffer.c (Frestore_buffer_modified_p):
    * src/fileio.c (write_region):
    * src/insdel.c (prepare_to_modify_buffer_1): Call Flock_file.
    
    * src/filelock.c (Qmake_lock_file_name): Declare symbol.
    (make_lock_file_name): Use it.  Don't check Fboundp, it doesn't
    work for interned symbols.
    (lock_file): Return a Lisp_Object.  Don't check create_lockfiles.
    Remove MSDOS version of the function.
    (Flock_file): Check create_lockfiles.
    (Flock_buffer): Call Flock_file.
    
    * src/lisp.h (lock_file): Remove.
    
    * test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo)
    (shadow-test09-shadow-copy-files): Let-bind `create-lockfiles'.
    
    * test/lisp/net/tramp-tests.el (create-lockfiles): Don't set it
    globally.
    (tramp-test39-lock-file): Check also for `set-visited-file-name'.
    9ce6541a
tramp.el 223 KB