summaryrefslogtreecommitdiff
path: root/lisp/startup.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-06-08 09:18:26 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2012-06-08 09:18:26 -0400
commit513749ee1862278385028d6700e1d2ce8abd35e6 (patch)
treecb835ce77cd2aa8d828dca57b55642e85f3942c5 /lisp/startup.el
parent595ef4ad76fb75db4a0adb2baf117ef6d68a2e41 (diff)
downloademacs-513749ee1862278385028d6700e1d2ce8abd35e6.tar.gz
Clean up scoping rule of predefined single-word vars.
* lisp/startup.el (argv, argi): Make lexically scoped. * lisp/emacs-lisp/float-sup.el (pi): Use internal-make-var-non-special. * lisp/emacs-lisp/cl-macs.el: Use lexical-binding. Rename cl-bind-* to cl--bind-*. * lisp/files.el: Don't require `cl' since it doesn't use it. * lisp/emacs-lisp/pcase.el, lisp/emacs-lisp/macroexp.el: Add coding cookie. * src/eval.c (Fmake_var_non_special): New primitive. (syms_of_eval): Defsubr it. * src/lread.c (syms_of_lread): Mark `values' as lexically scoped.
Diffstat (limited to 'lisp/startup.el')
-rw-r--r--lisp/startup.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 862e14f0c9d..59d25626372 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -101,16 +101,15 @@ the remaining command-line args are in the variable `command-line-args-left'.")
"List of command-line args not yet processed.")
(defvaralias 'argv 'command-line-args-left
- ;; FIXME: Bad name for a dynamically bound variable.
"List of command-line args not yet processed.
This is a convenience alias, so that one can write \(pop argv\)
inside of --eval command line arguments in order to access
following arguments.")
+(internal-make-var-non-special 'argv)
-(with-no-warnings
- ;; FIXME: Bad name for a dynamically bound variable
- (defvar argi nil
- "Current command-line argument."))
+(defvar argi nil
+ "Current command-line argument.")
+(internal-make-var-non-special 'argi)
(defvar command-line-functions nil ;; lrs 7/31/89
"List of functions to process unrecognized command-line arguments.