emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multibyte and unibyte file names


From: Eli Zaretskii
Subject: Re: Multibyte and unibyte file names
Date: Sun, 27 Jan 2013 08:14:57 +0200

> From: Stefan Monnier <address@hidden>
> Cc: "Stephen J. Turnbull" <address@hidden>,  address@hidden
> Date: Sat, 26 Jan 2013 16:44:55 -0500
> 
> > No such coding standards in Emacs, and the C code does manipulate
> > unibyte strings as long as they don't need to be passed to Lisp.
> > I suggested converting to internal representation at entry to all
> > primitives in this thread, but it looks like Stefan disagrees, or at
> > least not completely agrees.
> 
> Indeed, I may not completely agree, but I think I don't really know what
> is your suggestion because "entry to all primitives" is too vague (I
> obviously misunderstood it at first, and even now that I know that it
> doesn't mean what I thought it meant, I still don't really know what it
> means).

It means this:

DEFUN ("file-name-directory", Ffile_name_directory, Sfile_name_directory,
       1, 1, 0,
       doc: /* Return the directory component in file name FILENAME.
Return nil if FILENAME does not include a directory.
Otherwise return a directory name.
Given a Unix syntax file name, returns a string ending in slash.  */)
  (Lisp_Object filename)
{
#ifndef DOS_NT
  register const char *beg;
#else
  register char *beg;
  Lisp_Object tem_fn;
#endif
  register const char *p;
  Lisp_Object handler;

  CHECK_STRING (filename);
  if (!STRING_MULTIBYTE (filename))      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    filename = DECODE_FILE (filename);   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<



reply via email to

[Prev in Thread] Current Thread [Next in Thread]