changeset 847:8d43bfe19803

entered into RCS
author Jim Blandy <jimb@redhat.com>
date Wed, 22 Jul 1992 16:15:36 +0000
parents 20674ae6bf52
children 58d3ed08f776
files src/=xselect.c.old src/dired.c
diffstat 2 files changed, 25 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/=xselect.c.old	Wed Jul 22 04:22:42 1992 +0000
+++ b/src/=xselect.c.old	Wed Jul 22 16:15:36 1992 +0000
@@ -193,11 +193,27 @@
     }
   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
--- a/src/dired.c	Wed Jul 22 04:22:42 1992 +0000
+++ b/src/dired.c	Wed Jul 22 16:15:36 1992 +0000
@@ -68,6 +68,7 @@
 Lisp_Object Qdirectory_files;
 Lisp_Object Qfile_name_completion;
 Lisp_Object Qfile_name_all_completions;
+Lisp_Object Qfile_attributes;
 
 DEFUN ("directory-files", Fdirectory_files, Sdirectory_files, 1, 4, 0,
   "Return a list of names of files in DIRECTORY.\n\
@@ -86,7 +87,7 @@
 
   /* 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];
@@ -190,7 +191,7 @@
 
   /* 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);
 
@@ -208,7 +209,7 @@
 
   /* 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);
 
@@ -505,6 +506,7 @@
   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);