This patch changes the --ad-hoc flag to be positional. That is, the
packages that appear before --ad-hoc are interpreted as packages whose
inputs should be in the environment; the packages that appear after are
interpreted as packages to be directly added to the environment.
* guix/scripts/environment.scm (tag-package-arg, compact): New
procedures.
(%options): Tweak the handlers for --load and --expression options.
(options/resolve-packages): Preserve package mode tag.
(parse-args): Tweak argument handler to use package tagging procedure.
(guix-environment): Apply ad-hoc behavior on a per package basis.
* tests/guix-environment.sh: Add test.
* doc/guix.texi ("invoking guix environment"): Document new behavior of
--ad-hoc.