]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/float-sup.el
When running under emacs -q, always refuse to save the customisations, even if the...
[gnu-emacs] / lisp / emacs-lisp / float-sup.el
index ceb1eb3bafb05cb8404c692cbf47bb80b9349e8e..7e40fdad35236297ffc796066388bb34708c1978 100644 (file)
 ;; 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...).")