unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Xue Fuqiao <xfq.free@gmail.com>
Cc: 13934@debbugs.gnu.org
Subject: bug#13934: Minor bug in `command-line-functions'
Date: Wed, 14 Aug 2019 23:06:05 -0700	[thread overview]
Message-ID: <87d0h7ynci.fsf@mouse.gnus.org> (raw)
In-Reply-To: <87h86jynmt.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Wed, 14 Aug 2019 22:59:54 -0700")

Lars Ingebrigtsen <larsi@gnus.org> 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





  reply	other threads:[~2019-08-15  6:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12 14:02 bug#13934: Minor bug in `command-line-functions' Xue Fuqiao
2019-08-15  5:59 ` Lars Ingebrigtsen
2019-08-15  6:06   ` Lars Ingebrigtsen [this message]
2019-08-17  7:05     ` Eli Zaretskii
2019-08-17 12:46       ` Stefan Monnier
2019-08-17 21:24         ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d0h7ynci.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=13934@debbugs.gnu.org \
    --cc=xfq.free@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).