mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-23 22:20:24 -08:00
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.
This commit is contained in:
parent
595ef4ad76
commit
513749ee18
11 changed files with 92 additions and 69 deletions
|
|
@ -28,13 +28,9 @@
|
|||
;; Provide an easy hook to tell if we are running with floats or not.
|
||||
;; Define pi and e via math-lib calls (much less prone to killer typos).
|
||||
(defconst float-pi (* 4 (atan 1)) "The value of Pi (3.1415926...).")
|
||||
(progn
|
||||
;; Simulate a defconst that doesn't declare the variable dynamically bound.
|
||||
(setq-default pi float-pi)
|
||||
(put 'pi 'variable-documentation
|
||||
"Obsolete since Emacs-23.3. Use `float-pi' instead.")
|
||||
(put 'pi 'risky-local-variable t)
|
||||
(push 'pi current-load-list))
|
||||
(defconst pi float-pi
|
||||
"Obsolete since Emacs-23.3. Use `float-pi' instead.")
|
||||
(internal-make-var-non-special 'pi)
|
||||
|
||||
(defconst float-e (exp 1) "The value of e (2.7182818...).")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue