bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Lars Ingebrigtsen
Subject: bug#13934: Minor bug in `command-line-functions'
Date: Wed, 14 Aug 2019 22:59:54 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Xue Fuqiao <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]