[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
`menu-find-file-existing' can't open file with non-ascii filename
From: |
Zhang Wei |
Subject: |
`menu-find-file-existing' can't open file with non-ascii filename |
Date: |
Wed, 15 Feb 2006 15:19:16 +0800 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
`read-file-name' returns an undecoded filename if it was invoked with
the mouse, but returns a decoded filename if it was invoked with
the keyboard.
If it is an undecoded non-ascii filename, (file-directory-p filename)
or something like that will report `t' falsely, that cause the file
can't be opened.
I think the `x-file-dialog' function should return a decoded filename,
rather an undecoded filename.
*** xfns.c 14 Feb 2006 19:59:20 +0800 1.658
--- xfns.c 15 Feb 2006 14:54:16 +0800
***************
*** 5329,5334 ****
--- 5329,5335 ----
int result;
struct frame *f = SELECTED_FRAME ();
Lisp_Object file = Qnil;
+ Lisp_Object decoded_file;
Widget dialog, text, help;
Arg al[10];
int ac = 0;
***************
*** 5469,5475 ****
if (NILP (file))
Fsignal (Qquit, Qnil);
! return unbind_to (count, file);
}
#endif /* USE_MOTIF */
--- 5470,5478 ----
if (NILP (file))
Fsignal (Qquit, Qnil);
! decoded_file = DECODE_FILE (file);
!
! return unbind_to (count, decoded_file);
}
#endif /* USE_MOTIF */
***************
*** 5497,5502 ****
--- 5500,5506 ----
FRAME_PTR f = SELECTED_FRAME ();
char *fn;
Lisp_Object file = Qnil;
+ Lisp_Object decoded_file;
int count = SPECPDL_INDEX ();
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
char *cdef_file;
***************
*** 5537,5543 ****
if (NILP (file))
Fsignal (Qquit, Qnil);
! return unbind_to (count, file);
}
#endif /* USE_GTK */
--- 5541,5549 ----
if (NILP (file))
Fsignal (Qquit, Qnil);
! decoded_file = DECODE_FILE (file);
!
! return unbind_to (count, decoded_file);
}
#endif /* USE_GTK */
--
Zhang Wei or Brep
<address@hidden>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- `menu-find-file-existing' can't open file with non-ascii filename,
Zhang Wei <=