summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/float-sup.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-04-01 13:19:36 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-04-01 13:19:36 -0700
commit6ddae4efd9e8a3035eb610c39fb2c8f79e7f9893 (patch)
tree1b704b34e4f2f2bd4a6f13e4d1dd058c61c8a6ff /lisp/emacs-lisp/float-sup.el
parent0b918413f336dbfa9a9c266ae857bce103556c57 (diff)
parent034086489cff2a23cb4d9f8c536e18456be617ef (diff)
downloademacs-6ddae4efd9e8a3035eb610c39fb2c8f79e7f9893.tar.gz
emacs-6ddae4efd9e8a3035eb610c39fb2c8f79e7f9893.tar.bz2
emacs-6ddae4efd9e8a3035eb610c39fb2c8f79e7f9893.zip
Merge from mainline.
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...).")