673 |
} |
} |
674 |
|
|
675 |
DEFUN ("lock-buffer", Flock_buffer, Slock_buffer, |
DEFUN ("lock-buffer", Flock_buffer, Slock_buffer, |
676 |
0, 1, 0, |
0, 1, 0, |
677 |
"Lock FILE, if current buffer is modified.\n\ |
doc: /* Lock FILE, if current buffer is modified. |
678 |
FILE defaults to current buffer's visited file,\n\ |
FILE defaults to current buffer's visited file, |
679 |
or else nothing is done if current buffer isn't visiting a file.") |
or else nothing is done if current buffer isn't visiting a file. */) |
680 |
(file) |
(file) |
681 |
Lisp_Object file; |
Lisp_Object file; |
682 |
{ |
{ |
683 |
if (NILP (file)) |
if (NILP (file)) |
691 |
} |
} |
692 |
|
|
693 |
DEFUN ("unlock-buffer", Funlock_buffer, Sunlock_buffer, |
DEFUN ("unlock-buffer", Funlock_buffer, Sunlock_buffer, |
694 |
0, 0, 0, |
0, 0, 0, |
695 |
"Unlock the file visited in the current buffer,\n\ |
doc: /* Unlock the file visited in the current buffer, |
696 |
if it should normally be locked.") |
if it should normally be locked. */) |
697 |
() |
() |
698 |
{ |
{ |
699 |
if (SAVE_MODIFF < MODIFF |
if (SAVE_MODIFF < MODIFF |
700 |
&& STRINGP (current_buffer->file_truename)) |
&& STRINGP (current_buffer->file_truename)) |
714 |
} |
} |
715 |
|
|
716 |
DEFUN ("file-locked-p", Ffile_locked_p, Sfile_locked_p, 1, 1, 0, |
DEFUN ("file-locked-p", Ffile_locked_p, Sfile_locked_p, 1, 1, 0, |
717 |
"Return nil if the FILENAME is not locked,\n\ |
doc: /* Return nil if the FILENAME is not locked, |
718 |
t if it is locked by you, else a string of the name of the locker.") |
t if it is locked by you, else a string of the name of the locker. */) |
719 |
(filename) |
(filename) |
720 |
Lisp_Object filename; |
Lisp_Object filename; |
721 |
{ |
{ |
722 |
Lisp_Object ret; |
Lisp_Object ret; |
723 |
register char *lfname; |
register char *lfname; |
755 |
syms_of_filelock () |
syms_of_filelock () |
756 |
{ |
{ |
757 |
DEFVAR_LISP ("temporary-file-directory", &Vtemporary_file_directory, |
DEFVAR_LISP ("temporary-file-directory", &Vtemporary_file_directory, |
758 |
"The directory for writing temporary files."); |
doc: /* The directory for writing temporary files. */); |
759 |
Vtemporary_file_directory = Qnil; |
Vtemporary_file_directory = Qnil; |
760 |
|
|
761 |
defsubr (&Sunlock_buffer); |
defsubr (&Sunlock_buffer); |