Subject: bug#9275: 24.0.50; emacs 24 breaks use of 'argi' in command-line-functions from startup.el

From: Juanma Barranquero <[email-masked]>
Date: Thu, 11 Aug 2011 02:02:36 +0200

On Wed, Aug 10, 2011 at 08:57, Glenn Morris <[email-masked]> wrote:

> Clearly this feature is broken by the use of lexical-binding in startup.el.

Yet trivial to fix:

2011-08-11  Juanma Barranquero  <[email-masked]>

	* startup.el (argi): Declare as global variable (bug#9275).

=== modified file 'lisp/startup.el'
--- lisp/startup.el	2011-07-14 12:57:06 +0000
+++ lisp/startup.el	2011-08-10 23:57:40 +0000
@@ -105,6 +105,11 @@
 inside of --eval command line arguments in order to access
 following arguments.")

+(with-no-warnings
+  ;; FIXME: Bad name for a dynamically bound variable
+  (defvar argi nil
+    "Current command-line argument."))
+
 (defvar command-line-functions nil    ;; lrs 7/31/89
   "List of functions to process unrecognized command-line arguments.
 Each function should access the dynamically bound variables