summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/float-sup.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-03-24 11:31:56 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2011-03-24 11:31:56 -0400
commit06788a55302c7da6566c7efe8d8d800538a22c0a (patch)
treef7930c0d1743108e09432d13eaac366eb049062b /lisp/emacs-lisp/float-sup.el
parent29a4dcb06d4bd78db96d6305f7434ce464aff8a4 (diff)
downloademacs-06788a55302c7da6566c7efe8d8d800538a22c0a.tar.gz
emacs-06788a55302c7da6566c7efe8d8d800538a22c0a.tar.bz2
emacs-06788a55302c7da6566c7efe8d8d800538a22c0a.zip
Fix C-M-x in lexbind mode. Misc tweaks.
* lisp/startup.el: Convert to lexical-binding. Mark unused arguments. (command-line-1): Get rid of the "cl1-" prefix now that we use lexical scoping instead. * lisp/emacs-lisp/float-sup.el (pi): Leave it lexically scoped. * lisp/emacs-lisp/lisp-mode.el (eval-sexp-add-defvars): New fun. (eval-last-sexp-1): Use eval-sexp-add-defvars. * lisp/emacs-lisp/edebug.el (edebug-eval-defun): Use eval-sexp-add-defvars. * lisp/emacs-lisp/cconv.el (cconv--analyse-function): Fix `report-error/log-warning' mixup.
Diffstat (limited to 'lisp/emacs-lisp/float-sup.el')
-rw-r--r--lisp/emacs-lisp/float-sup.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/float-sup.el b/lisp/emacs-lisp/float-sup.el
index ceb1eb3bafb..7e40fdad352 100644
--- a/lisp/emacs-lisp/float-sup.el
+++ b/lisp/emacs-lisp/float-sup.el
@@ -28,7 +28,13 @@
;; 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...).")
-(defconst pi float-pi "Obsolete since Emacs-23.3. Use `float-pi' instead.")
+(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 float-e (exp 1) "The value of e (2.7182818...).")