emacs-devel
[Top][All Lists]
Advanced

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

Re: using libmagic in Emacs?


From: Eli Zaretskii
Subject: Re: using libmagic in Emacs?
Date: Sun, 23 Aug 2009 06:24:16 +0300

> From: address@hidden
> Cc: Eli Zaretskii <address@hidden>, address@hidden,
>         address@hidden
> Date: Sat, 22 Aug 2009 22:18:26 +0200
> 
> +  magic_setflags (cookie, MAGIC_MIME_TYPE | MAGIC_ERROR);  
> +  rvs = magic_file (cookie, f);
> +  if (rvs == NULL) goto libmagic_error;
> +  file_mime = intern (rvs);
> +
> +  magic_setflags (cookie, MAGIC_MIME_ENCODING | MAGIC_ERROR);
> +  rvs=magic_file (cookie, f);
> +  if (rvs == NULL) goto libmagic_error;
> +  file_encoding = build_string(rvs);  

Since you are returning strings for MIME type and MIME encoding, not
symbols, I suggest to state that in the doc string.  Normally, when we
say "SOMETHING is an encoding", we mean it's a symbol.

Alternatively, use MIME-ENCODING-NAME etc., to indicate that it's just
a name of the thing, not the thing itself.




reply via email to

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