unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40948: 26.3; Docstring of substitute-env-vars
@ 2020-04-28 20:22 Marcus Harnisch
  2020-04-29 11:14 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Marcus Harnisch @ 2020-04-28 20:22 UTC (permalink / raw)
  To: 40948

With commit ee041f2d07b6ed485dc34c115588f973f046c9d4, changes to the
parameters of `substitute-env-vars' were introduced and its docstring
changed. While the optional parameter is named WHEN-UNDEFINED, the
docstring says WHEN-DEFINED. It would appear that the dosctring is
right, but I'll leave that decision to the experts.

Thanks,
Marcus





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#40948: 26.3; Docstring of substitute-env-vars
  2020-04-28 20:22 bug#40948: 26.3; Docstring of substitute-env-vars Marcus Harnisch
@ 2020-04-29 11:14 ` Eli Zaretskii
  2021-01-28  6:39   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2020-04-29 11:14 UTC (permalink / raw)
  To: Marcus Harnisch, Stefan Monnier; +Cc: 40948

> From: Marcus Harnisch <marcus.harnisch@gmx.net>
> Date: Tue, 28 Apr 2020 22:22:52 +0200
> 
> With commit ee041f2d07b6ed485dc34c115588f973f046c9d4, changes to the
> parameters of `substitute-env-vars' were introduced and its docstring
> changed. While the optional parameter is named WHEN-UNDEFINED, the
> docstring says WHEN-DEFINED. It would appear that the dosctring is
> right, but I'll leave that decision to the experts.

I modified the doc string to match the argument name.  (I'm not sure
how to judge which one is correct, because IMO neither WHEN-DEFINED
nor WHEN-UNDEFINED is correct.  I would call that argument
HANDLE-UNDEFINED or something to that effect.)

Also note that there's an inconsistency in how the value of this
variable is used: if it's a function, then the return value of nil
means leave the variable reference unchanged, but if it is not a
function, the value of nil means to replace the reference with an
empty string, and a non-nil value means leave it unchanged.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#40948: 26.3; Docstring of substitute-env-vars
  2020-04-29 11:14 ` Eli Zaretskii
@ 2021-01-28  6:39   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-01-28  6:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, 40948, Marcus Harnisch

Eli Zaretskii <eliz@gnu.org> writes:

> I modified the doc string to match the argument name.  (I'm not sure
> how to judge which one is correct, because IMO neither WHEN-DEFINED
> nor WHEN-UNDEFINED is correct.  I would call that argument
> HANDLE-UNDEFINED or something to that effect.)
>
> Also note that there's an inconsistency in how the value of this
> variable is used: if it's a function, then the return value of nil
> means leave the variable reference unchanged, but if it is not a
> function, the value of nil means to replace the reference with an
> empty string, and a non-nil value means leave it unchanged.

The interface seems odd indeed, but your changes to the doc string has
now made it match what it's doing (I think), so there doesn't seem to be
anything more to be done in this bug report, and I'm closing it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-28  6:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 20:22 bug#40948: 26.3; Docstring of substitute-env-vars Marcus Harnisch
2020-04-29 11:14 ` Eli Zaretskii
2021-01-28  6:39   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).