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 22:59:54 -0700 [thread overview]
Message-ID: <87h86jynmt.fsf@mouse.gnus.org> (raw)
In-Reply-To: <20130312220221.02134854e129b6390469b6ae@gmail.com> (Xue Fuqiao's message of "Tue, 12 Mar 2013 22:02:21 +0800")
Xue Fuqiao <xfq.free@gmail.com> writes:
> In the doc string of `command-line-functions':
> Each function should access the dynamically bound variables `argi'
> (the current argument) and `command-line-args-left' (the remaining
> arguments).
>
> But in startup.el:
>
> (internal-make-var-non-special 'argi)
>
> Originally posted in:
> http://lists.gnu.org/archive/html/help-gnu-emacs/2013-03/msg00145.html
Stefan says that it's a doc bug:
---
List of functions to process unrecognized command-line arguments.
Each function should access the dynamically bound variables
‘argi’ (the current argument) and ‘command-line-args-left’ (the remaining
arguments). The function should return non-nil only if it recognizes and
processes ‘argi’. If it does so, it may consume successive arguments by
altering ‘command-line-args-left’ to remove them.
---
But... if `argi' isn't dynamic, then just about everything here is
incorrect, surely. So should `command-line-functions' just do whatever
they like and never refer to `argi'? And consume
`command-line-args-left' however they like?
It's rather confusing, especially with the:
(with-no-warnings
(defvar argi nil
"Current command-line argument."))
(internal-make-var-non-special 'argi)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2019-08-15 5:59 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 [this message]
2019-08-15 6:06 ` Lars Ingebrigtsen
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=87h86jynmt.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).