Prune most-positive-fixnum from Lisp source
I looked through all instances of most-negative-fixnum and most-positive-fixnum in the Lisp source code, and when it was easy I removed assumptions that integers fit in fixnums. The remaining instances are either nontrivial to fix, or are inherent to the algorithm. * lisp/arc-mode.el (archive-l-e): Do not convert to float, since we have bignums now. All uses changed. * lisp/calc/calc.el (math-bignum): Don’t special-case most-negative-fixnum. * lisp/calendar/parse-time.el (parse-time-string): * lisp/emacs-lisp/edebug.el (edebug-read-special): * lisp/emacs-lisp/package.el (package--remove-hidden): * lisp/gnus/nnfolder.el (nnfolder-read-folder): * lisp/international/mule-util.el (filepos-to-bufferpos--dos): * lisp/menu-bar.el (menu-bar-update-buffers): * lisp/net/rcirc.el (rcirc-handler-317): * lisp/org/org-agenda.el (org-cmp-ts): * lisp/window.el (window--resize-child-windows): Avoid arbitrary limit to most-positive-fixnum or to most-negative-fixnum. * lisp/calendar/time-date.el (days-to-time): * lisp/erc/erc-dcc.el (erc-unpack-int): Don’t worry about integer overflow. * lisp/cedet/semantic/wisent/comp.el (wisent-BITS-PER-WORD): * lisp/gnus/message.el (message-unique-id): * lisp/org/org-footnote.el (org-footnote-new): Simplify. * lisp/erc/erc-dcc.el (erc-most-positive-int-bytes) (erc-most-positive-int-msb): Remove; no longer needed. * lisp/net/imap.el (imap-string-to-integer): Remove; unused. * lisp/org/org-element.el (org-element--cache-generate-key): Document fixnum limitation.
This commit is contained in:
parent
ee641b87cf
commit
a4a3c92e9d
18 changed files with 55 additions and 124 deletions
|
@ -894,8 +894,7 @@ circular objects. Let `read' read everything else."
|
|||
(while (and (>= (following-char) ?0) (<= (following-char) ?9))
|
||||
(forward-char 1))
|
||||
(let ((n (string-to-number (buffer-substring start (point)))))
|
||||
(when (and read-circle
|
||||
(<= n most-positive-fixnum))
|
||||
(when read-circle
|
||||
(cond
|
||||
((eq ?= (following-char))
|
||||
;; Make a placeholder for #n# to use temporarily.
|
||||
|
@ -910,7 +909,7 @@ circular objects. Let `read' read everything else."
|
|||
(throw 'return (setf (cdr elem) obj)))))
|
||||
((eq ?# (following-char))
|
||||
;; #n# returns a previously read object.
|
||||
(let ((elem (assq n edebug-read-objects)))
|
||||
(let ((elem (assoc n edebug-read-objects)))
|
||||
(when (consp elem)
|
||||
(forward-char 1)
|
||||
(throw 'return (cdr elem))))))))))
|
||||
|
|
|
@ -2673,12 +2673,11 @@ to their archives."
|
|||
((not package-menu-hide-low-priority)
|
||||
pkg-list)
|
||||
((eq package-menu-hide-low-priority 'archive)
|
||||
(let* ((max-priority most-negative-fixnum)
|
||||
(out))
|
||||
(let (max-priority out)
|
||||
(while pkg-list
|
||||
(let ((p (pop pkg-list)))
|
||||
(let ((priority (package-desc-priority p)))
|
||||
(if (< priority max-priority)
|
||||
(if (and max-priority (< priority max-priority))
|
||||
(setq pkg-list nil)
|
||||
(push p out)
|
||||
(setq max-priority priority)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue