Commit 9a0dd02d authored by Glenn Morris's avatar Glenn Morris
Browse files

Support for systems without floats was removed a decade ago.

* lisp/loadup.el: Unconditionally load float-sup.
* lisp/paren.el (show-paren-delay):
* lisp/emacs-lisp/float-sup.el:
* lisp/emulation/cua-base.el (cua-prefix-override-inhibit-delay):
* lisp/obsolete/lazy-lock.el (lazy-lock-defer-time, lazy-lock-stealth-nice)
(lazy-lock-stealth-verbose): Assume float support.
* lisp/ps-print.el: Assume float support on Emacs.
* lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
Remove non-float branch.

* lisp/obsolete/lazy-lock.el: Remove leading `*' from defcustom docs.
parent 2f42e9a2
2010-10-22 Glenn Morris <rgm@gnu.org>
* loadup.el: Unconditionally load float-sup.
* paren.el (show-paren-delay):
* emacs-lisp/float-sup.el:
* emulation/cua-base.el (cua-prefix-override-inhibit-delay):
* obsolete/lazy-lock.el (lazy-lock-defer-time, lazy-lock-stealth-nice)
(lazy-lock-stealth-verbose): Assume float support.
* ps-print.el: Assume float support on Emacs.
* emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
Remove non-float branch.
* emacs-lisp/autoload.el (batch-update-autoloads): Update for
src/Makefile no longer being pre-processed.
......
;;; float-sup.el --- define some constants useful for floating point numbers.
;; Copyright (C) 1985, 1986, 1987, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;; Copyright (C) 1985, 1986, 1987, 2001, 2002, 2003, 2004, 2005, 2006,
;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: internal
......@@ -26,15 +26,8 @@
;;; Code:
;; Provide a meaningful error message if we are running on
;; bare (non-float) emacs.
(if (fboundp 'atan)
nil
(error "Floating point was disabled at compile time"))
;; 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.)
;; 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.")
......@@ -45,7 +38,7 @@
(defconst radians-to-degrees (/ 180.0 float-pi)
"Radian to degree conversion constant.")
;; these expand to a single multiply by a float when byte compiled
;; These expand to a single multiply by a float when byte compiled.
(defmacro degrees-to-radians (x)
"Convert X from degrees to radians."
......@@ -56,5 +49,4 @@
(provide 'lisp-float-type)
;; arch-tag: e7837072-a4af-4d08-9953-8a3e755abf9d
;;; float-sup.el ends here
......@@ -93,31 +93,20 @@ fire each time Emacs is idle for that many seconds."
More precisely, the next value, after TIME, that is an integral multiple
of SECS seconds since the epoch. SECS may be a fraction."
(let ((time-base (ash 1 16)))
(if (fboundp 'atan)
;; Use floating point, taking care to not lose precision.
(let* ((float-time-base (float time-base))
(million 1000000.0)
(time-usec (+ (* million
(+ (* float-time-base (nth 0 time))
(nth 1 time)))
(nth 2 time)))
(secs-usec (* million secs))
(mod-usec (mod time-usec secs-usec))
(next-usec (+ (- time-usec mod-usec) secs-usec))
(time-base-million (* float-time-base million)))
(list (floor next-usec time-base-million)
(floor (mod next-usec time-base-million) million)
(floor (mod next-usec million))))
;; Floating point is not supported.
;; Use integer arithmetic, avoiding overflow if possible.
(let* ((mod-sec (mod (+ (* (mod time-base secs)
(mod (nth 0 time) secs))
(nth 1 time))
secs))
(next-1-sec (+ (- (nth 1 time) mod-sec) secs)))
(list (+ (nth 0 time) (floor next-1-sec time-base))
(mod next-1-sec time-base)
0)))))
;; Use floating point, taking care to not lose precision.
(let* ((float-time-base (float time-base))
(million 1000000.0)
(time-usec (+ (* million
(+ (* float-time-base (nth 0 time))
(nth 1 time)))
(nth 2 time)))
(secs-usec (* million secs))
(mod-usec (mod time-usec secs-usec))
(next-usec (+ (- time-usec mod-usec) secs-usec))
(time-base-million (* float-time-base million)))
(list (floor next-usec time-base-million)
(floor (mod next-usec time-base-million) million)
(floor (mod next-usec million))))))
(defun timer-relative-time (time secs &optional usecs)
"Advance TIME by SECS seconds and optionally USECS microseconds.
......@@ -543,5 +532,4 @@ If the user does not answer after SECONDS seconds, return DEFAULT-VALUE."
(provide 'timer)
;; arch-tag: b1a9237b-7787-4382-9e46-8f2c3b3273e0
;;; timer.el ends here
;;; cua-base.el --- emulate CUA key bindings
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: Kim F. Storm <storm@cua.dk>
;; Keywords: keyboard emulations convenience cua
......@@ -300,8 +300,7 @@ is not turned on."
:type 'boolean
:group 'cua)
(defcustom cua-prefix-override-inhibit-delay
(if (featurep 'lisp-float-type) (/ (float 1) (float 5)) nil)
(defcustom cua-prefix-override-inhibit-delay 0.2
"If non-nil, time in seconds to delay before overriding prefix key.
If there is additional input within this time, the prefix key is
used as a normal prefix key. So typing a key sequence quickly will
......@@ -1637,5 +1636,4 @@ shifted movement key, set `cua-highlight-region-shift-only'."
(provide 'cua-base)
;; arch-tag: 21fb6289-ba25-4fee-bfdc-f9fb351acf05
;;; cua-base.el ends here
......@@ -240,9 +240,8 @@
;; Do it after loading term/foo-win.el since the value of the
;; mouse-wheel-*-event vars depends on those files being loaded or not.
(load "mwheel"))
(if (fboundp 'atan) ; preload some constants and
(progn ; floating pt. functions if we have float support.
(load "emacs-lisp/float-sup")))
;; Preload some constants and floating point functions.
(load "emacs-lisp/float-sup")
(load "vc/vc-hooks")
(load "vc/ediff-hook")
......@@ -403,5 +402,4 @@
;; no-update-autoloads: t
;; End:
;; arch-tag: 121e1dd4-36e1-45ac-860e-239f577a6335
;;; loadup.el ends here
......@@ -310,7 +310,7 @@ until TEST returns nil."
;; User Variables:
(defcustom lazy-lock-minimum-size 25600
"*Minimum size of a buffer for demand-driven fontification.
"Minimum size of a buffer for demand-driven fontification.
On-demand fontification occurs if the buffer size is greater than this value.
If nil, means demand-driven fontification is never performed.
If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),
......@@ -334,7 +334,7 @@ The value of this variable is used when Lazy Lock mode is turned on."
:group 'lazy-lock)
(defcustom lazy-lock-defer-on-the-fly t
"*If non-nil, means fontification after a change should be deferred.
"If non-nil, means fontification after a change should be deferred.
If nil, means on-the-fly fontification is performed. This means when changes
occur in the buffer, those areas are immediately fontified.
If a list, it should be a list of `major-mode' symbol names for which deferred
......@@ -354,7 +354,7 @@ The value of this variable is used when Lazy Lock mode is turned on."
:group 'lazy-lock)
(defcustom lazy-lock-defer-on-scrolling nil
"*If non-nil, means fontification after a scroll should be deferred.
"If non-nil, means fontification after a scroll should be deferred.
If nil, means demand-driven fontification is performed. This means when
scrolling into unfontified areas of the buffer, those areas are immediately
fontified. Thus scrolling never presents unfontified areas. However, since
......@@ -379,7 +379,7 @@ The value of this variable is used when Lazy Lock mode is turned on."
:group 'lazy-lock)
(defcustom lazy-lock-defer-contextually 'syntax-driven
"*If non-nil, means deferred fontification should be syntactically true.
"If non-nil, means deferred fontification should be syntactically true.
If nil, means deferred fontification occurs only on those lines modified. This
means where modification on a line causes syntactic change on subsequent lines,
those subsequent lines are not refontified to reflect their new context.
......@@ -396,9 +396,8 @@ The value of this variable is used when Lazy Lock mode is turned on."
(other :tag "syntax-driven" syntax-driven))
:group 'lazy-lock)
(defcustom lazy-lock-defer-time
(if (featurep 'lisp-float-type) (/ (float 1) (float 4)) 1)
"*Time in seconds to delay before beginning deferred fontification.
(defcustom lazy-lock-defer-time 0.25
"Time in seconds to delay before beginning deferred fontification.
Deferred fontification occurs if there is no input within this time.
If nil, means fontification is never deferred, regardless of the values of the
variables `lazy-lock-defer-on-the-fly', `lazy-lock-defer-on-scrolling' and
......@@ -410,7 +409,7 @@ The value of this variable is used when Lazy Lock mode is turned on."
:group 'lazy-lock)
(defcustom lazy-lock-stealth-time 30
"*Time in seconds to delay before beginning stealth fontification.
"Time in seconds to delay before beginning stealth fontification.
Stealth fontification occurs if there is no input within this time.
If nil, means stealth fontification is never performed.
......@@ -420,7 +419,7 @@ The value of this variable is used when Lazy Lock mode is turned on."
:group 'lazy-lock)
(defcustom lazy-lock-stealth-lines (if font-lock-maximum-decoration 100 250)
"*Maximum size of a chunk of stealth fontification.
"Maximum size of a chunk of stealth fontification.
Each iteration of stealth fontification can fontify this number of lines.
To speed up input response during stealth fontification, at the cost of stealth
taking longer to fontify, you could reduce the value of this variable."
......@@ -429,7 +428,7 @@ taking longer to fontify, you could reduce the value of this variable."
(defcustom lazy-lock-stealth-load
(if (condition-case nil (load-average) (error)) 200)
"*Load in percentage above which stealth fontification is suspended.
"Load in percentage above which stealth fontification is suspended.
Stealth fontification pauses when the system short-term load average (as
returned by the function `load-average' if supported) goes above this level,
thus reducing the demand that stealth fontification makes on the system.
......@@ -443,9 +442,8 @@ See also `lazy-lock-stealth-nice'."
'(const :format "%t: unsupported\n" nil))
:group 'lazy-lock)
(defcustom lazy-lock-stealth-nice
(if (featurep 'lisp-float-type) (/ (float 1) (float 8)) 1)
"*Time in seconds to pause between chunks of stealth fontification.
(defcustom lazy-lock-stealth-nice 0.125
"Time in seconds to pause between chunks of stealth fontification.
Each iteration of stealth fontification is separated by this amount of time,
thus reducing the demand that stealth fontification makes on the system.
If nil, means stealth fontification is never paused.
......@@ -457,9 +455,8 @@ See also `lazy-lock-stealth-load'."
:group 'lazy-lock)
(defcustom lazy-lock-stealth-verbose
(if (featurep 'lisp-float-type)
(and (not lazy-lock-defer-contextually) (not (null font-lock-verbose))))
"*If non-nil, means stealth fontification should show status messages."
(and (not lazy-lock-defer-contextually) (not (null font-lock-verbose)))
"If non-nil, means stealth fontification should show status messages."
:type 'boolean
:group 'lazy-lock)
......@@ -1058,5 +1055,4 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
;; byte-compile-warnings: (not obsolete)
;; End:
;; arch-tag: c1776846-f046-4a45-9684-54b951b12fc9
;;; lazy-lock.el ends here
......@@ -52,8 +52,7 @@ otherwise)."
:type '(choice (const parenthesis) (const expression) (const mixed))
:group 'paren-showing)
(defcustom show-paren-delay
(if (featurep 'lisp-float-type) (/ (float 1) (float 8)) 1)
(defcustom show-paren-delay 0.125
"Time in seconds to delay before showing a matching paren."
:type '(number :tag "seconds")
:group 'paren-showing)
......@@ -253,5 +252,4 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
(provide 'paren)
;; arch-tag: d0969b88-7ac0-4bd0-bd53-e73b892b86a9
;;; paren.el ends here
......@@ -1466,12 +1466,9 @@ Please send all bug fixes and enhancements to
(require 'lpr)
(or (featurep 'lisp-float-type)
(error "`ps-print' requires floating point support"))
(if (featurep 'xemacs)
()
(or (featurep 'lisp-float-type)
(error "`ps-print' requires floating point support"))
(unless (and (boundp 'emacs-major-version)
(>= emacs-major-version 23))
(error "`ps-print' only supports Emacs 23 and higher")))
......@@ -6726,5 +6723,4 @@ Finish printing job for multi-byte chars.
(provide 'ps-print)
;; arch-tag: fb06a585-1112-4206-885d-a57d95d50579
;;; ps-print.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment