diff options
| -rw-r--r-- | lispref/files.texi | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lispref/files.texi b/lispref/files.texi index 2e6a5bcee00..aa97ff83d30 100644 --- a/lispref/files.texi +++ b/lispref/files.texi | |||
| @@ -646,9 +646,10 @@ with-temp-buffer,, The Current Buffer}. | |||
| 646 | @section File Locks | 646 | @section File Locks |
| 647 | @cindex file locks | 647 | @cindex file locks |
| 648 | 648 | ||
| 649 | When two users edit the same file at the same time, they are likely to | 649 | When two users edit the same file at the same time, they are likely |
| 650 | interfere with each other. Emacs tries to prevent this situation from | 650 | to interfere with each other. Emacs tries to prevent this situation |
| 651 | arising by recording a @dfn{file lock} when a file is being modified. | 651 | from arising by recording a @dfn{file lock} when a file is being |
| 652 | modified. (File locks are not implemented on Microsoft systems.) | ||
| 652 | Emacs can then detect the first attempt to modify a buffer visiting a | 653 | Emacs can then detect the first attempt to modify a buffer visiting a |
| 653 | file that is locked by another Emacs job, and ask the user what to do. | 654 | file that is locked by another Emacs job, and ask the user what to do. |
| 654 | The file lock is really a file, a symbolic link with a special name, | 655 | The file lock is really a file, a symbolic link with a special name, |
| @@ -680,14 +681,15 @@ some other job. | |||
| 680 | This function locks the file @var{filename}, if the current buffer is | 681 | This function locks the file @var{filename}, if the current buffer is |
| 681 | modified. The argument @var{filename} defaults to the current buffer's | 682 | modified. The argument @var{filename} defaults to the current buffer's |
| 682 | visited file. Nothing is done if the current buffer is not visiting a | 683 | visited file. Nothing is done if the current buffer is not visiting a |
| 683 | file, or is not modified. | 684 | file, or is not modified, or if the system does not support locking. |
| 684 | @end defun | 685 | @end defun |
| 685 | 686 | ||
| 686 | @defun unlock-buffer | 687 | @defun unlock-buffer |
| 687 | This function unlocks the file being visited in the current buffer, | 688 | This function unlocks the file being visited in the current buffer, |
| 688 | if the buffer is modified. If the buffer is not modified, then | 689 | if the buffer is modified. If the buffer is not modified, then |
| 689 | the file should not be locked, so this function does nothing. It also | 690 | the file should not be locked, so this function does nothing. It also |
| 690 | does nothing if the current buffer is not visiting a file. | 691 | does nothing if the current buffer is not visiting a file, or if the |
| 692 | system does not support locking. | ||
| 691 | @end defun | 693 | @end defun |
| 692 | 694 | ||
| 693 | File locking is not supported on some systems. On systems that do not | 695 | File locking is not supported on some systems. On systems that do not |
| @@ -834,10 +836,11 @@ a directory. | |||
| 834 | @c Emacs 19 feature | 836 | @c Emacs 19 feature |
| 835 | @defun file-accessible-directory-p dirname | 837 | @defun file-accessible-directory-p dirname |
| 836 | This function returns @code{t} if you have permission to open existing | 838 | This function returns @code{t} if you have permission to open existing |
| 837 | files in the directory whose name as a file is @var{dirname}; otherwise | 839 | files in the directory whose name as a file is @var{dirname}; |
| 838 | (or if there is no such directory), it returns @code{nil}. The value | 840 | otherwise (or if there is no such directory), it returns @code{nil}. |
| 839 | of @var{dirname} may be either a directory name or the file name of a | 841 | The value of @var{dirname} may be either a directory name (such as |
| 840 | file which is a directory. | 842 | @file{/foo/}) or the file name of a file which is a directory |
| 843 | (such as @file{/foo}, without the final slash). | ||
| 841 | 844 | ||
| 842 | Example: after the following, | 845 | Example: after the following, |
| 843 | 846 | ||