Subject: bug#8534: 24.0.50; Documentation bug in ns-read-file-name

From: Eli Zaretskii <[email-masked]>
Date: Sun, 24 Apr 2011 21:28:42 +0300

> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00
> 	autolearn=unavailable version=3.3.1
> Resent-From: Chong Yidong <[email-masked]>
> Original-Sender: [email-masked]
> Resent-To: [email-masked]
> Resent-CC: [email-masked]
> Resent-Sender: [email-masked]
> From: Chong Yidong <[email-masked]>
> Date: Sun, 24 Apr 2011 13:51:21 -0400
> Cc: [email-masked]
> 
> Harald Hanche-Olsen <[email-masked]> writes:
> 
> > The doc string for ns-read-file-name (defined in src/nsfns.m) says
> >
> > Optional arg ISLOAD, if non-nil, means read a file name for saving.
> >
> > However the exact opposite is true, as the name of the variable also
> > indicates.
> 
> I can patch up the docstring if you explain to me what the opposite of
> "read a file name for saving" is, and what is the difference between the
> two kinds of file dialogs (I don't use OSX).

I guess it means that "non-nil" is backwards, as this part of
ns-read-file-name shows:

  panel = NILP (isLoad) ?
    (id)[EmacsSavePanel savePanel] : (id)[EmacsOpenPanel openPanel];

This seems to say that if isLoad is non-nil, we pop up a File Open
dialog, while when it's nil, we pop up a File Save dialog.