Subject: Re: bug#13934: Minor bug in `command-line-functions'

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 14 Aug 2019 23:06:05 -0700

Lars Ingebrigtsen <[email-masked]> writes:

> It's rather confusing, especially with the:
>
> (with-no-warnings
>   (defvar argi nil
>     "Current command-line argument."))
> (internal-make-var-non-special 'argi)

I tested with

(setq command-line-functions '((lambda () (message "argi %s" argi))))

and `argi' is indeed dynamically bound when 

                     ;; We have almost exhausted our options. See if the
                     ;; user has made any other command-line options available
                     (let ((hooks command-line-functions)
                           (did-hook nil))
                       (while (and hooks
                                   (not (setq did-hook (funcall (car hooks)))))
                         (setq hooks (cdr hooks)))

is executed...  so is argi dynamic in the startup.el file, but not
elsewhere in Emacs?  In which case there is really nothing to fix in the
doc string?

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