Lisp_Object Qdirectory_files;
Lisp_Object Qfile_name_completion;
Lisp_Object Qfile_name_all_completions;
+Lisp_Object Qfile_attributes;
\f
DEFUN ("directory-files", Fdirectory_files, Sdirectory_files, 1, 4, 0,
"Return a list of names of files in DIRECTORY.\n\
/* If the file name has special constructs in it,
call the corresponding file handler. */
- handler = find_file_handler (filename);
+ handler = find_file_handler (dirname);
if (!NILP (handler))
{
Lisp_Object args[6];
/* If the file name has special constructs in it,
call the corresponding file handler. */
- handler = find_file_handler (filename);
+ handler = find_file_handler (dirname);
if (!NILP (handler))
return call3 (handler, Qfile_name_completion, file, dirname);
/* If the file name has special constructs in it,
call the corresponding file handler. */
- handler = find_file_handler (filename);
+ handler = find_file_handler (dirname);
if (!NILP (handler))
return call3 (handler, Qfile_name_all_completions, file, dirname);
Qdirectory_files = intern ("directory-files");
Qfile_name_completion = intern ("file-name-completion");
Qfile_name_all_completions = intern ("file-name-all-completions");
+ Qfile_attributes = intern ("file-attributes");
defsubr (&Sdirectory_files);
defsubr (&Sfile_name_completion);
}
else if (EQ (type, Qcut_buffer0))
{
+ /* DECwindows and some other servers don't seem to like setting
+ properties to values larger than about 20k. For very large
+ values, they signal an error, but for intermediate values
+ they just seem to hang.
+
+ We could just truncate the request, but it's better to let
+ the user know that the strategy he/she's using isn't going to
+ work than to have it work partially, but incorrectly. */
BLOCK_INPUT;
- XStoreBytes (x_current_display,
- (char *) XSTRING (string)->data,
- XSTRING (string)->size);
- val = string;
+ if (XSTRING (string)->size > MAX_SELECTION (x_current_display))
+ {
+ XStoreBytes (x_current_display, (char *) 0, 0);
+ val = Qnil;
+ }
+ else
+ {
+ XStoreBytes (x_current_display,
+ (char *) XSTRING (string)->data,
+ XSTRING (string)->size);
+ val = string;
+ }
UNBLOCK_INPUT;
}
else