X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/3e9fa60a5c99568817a12a1011b0e61cce5d3a67..15c1107a30c274e0d5451b4428efc613edabbdce:/src/fileio.c diff --git a/src/fileio.c b/src/fileio.c index 5659b6555d..f0bd75b170 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -990,7 +990,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) { unsigned char *p = SDATA (name); - while (*p && ASCII_BYTE_P (*p)) + while (*p && ASCII_CHAR_P (*p)) p++; if (*p == '\0') { @@ -2546,7 +2546,9 @@ Use `file-symlink-p' to test for such links. */) DEFUN ("file-executable-p", Ffile_executable_p, Sfile_executable_p, 1, 1, 0, doc: /* Return t if FILENAME can be executed by you. -For a directory, this means you can access files in that directory. */) +For a directory, this means you can access files in that directory. +\(It is generally better to use `file-accessible-directory-p' for that +purpose, though.) */) (Lisp_Object filename) { Lisp_Object absname; @@ -3011,6 +3013,9 @@ was unable to determine the ACL entries. */) acl_t acl; Lisp_Object acl_string; char *str; +# ifndef HAVE_ACL_TYPE_EXTENDED + acl_type_t ACL_TYPE_EXTENDED = ACL_TYPE_ACCESS; +# endif #endif absname = expand_and_dir_to_file (filename, @@ -3025,7 +3030,7 @@ was unable to determine the ACL entries. */) #ifdef HAVE_ACL_SET_FILE absname = ENCODE_FILE (absname); - acl = acl_get_file (SSDATA (absname), ACL_TYPE_ACCESS); + acl = acl_get_file (SSDATA (absname), ACL_TYPE_EXTENDED); if (acl == NULL) return Qnil; @@ -4083,7 +4088,7 @@ by calling `format-decode', which see. */) && !NILP (BVAR (current_buffer, filename)) && SAVE_MODIFF >= MODIFF) we_locked_file = 1; - prepare_to_modify_buffer (GPT, GPT, NULL); + prepare_to_modify_buffer (PT, PT, NULL); } move_gap_both (PT, PT_BYTE); @@ -5760,24 +5765,6 @@ before any other event (mouse or keypress) is handled. */) return Qnil; } -Lisp_Object -Fread_file_name (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object initial, Lisp_Object predicate) -{ - struct gcpro gcpro1; - Lisp_Object args[7]; - - GCPRO1 (default_filename); - args[0] = intern ("read-file-name"); - args[1] = prompt; - args[2] = dir; - args[3] = default_filename; - args[4] = mustmatch; - args[5] = initial; - args[6] = predicate; - RETURN_UNGCPRO (Ffuncall (7, args)); -} - - void init_fileio (void) { @@ -6027,7 +6014,7 @@ file is usually more useful if it contains the deleted text. */); doc: /* Non-nil means don't call fsync in `write-region'. This variable affects calls to `write-region' as well as save commands. Setting this to nil may avoid data loss if the system loses power or -the operating system crashes. */); +the operating system crashes. By default, it is non-nil in batch mode. */); write_region_inhibit_fsync = 0; /* See also `init_fileio' above. */ DEFVAR_BOOL ("delete-by-moving-to-trash", delete_by_moving_to_trash,