emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making 'eq' == 'eql' in bignum branch


From: Tom Tromey
Subject: Re: Making 'eq' == 'eql' in bignum branch
Date: Sun, 26 Aug 2018 10:34:21 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux)

>>>>> "Paul" == Paul Eggert <address@hidden> writes:

Paul> * Several modules assumes that buffer sizes fits into fixnums. This
Paul> assumption is correct for Emacs master, though it will become dubious
Paul> if we change Emacs to support buffer sizes greater than
Paul> most-positive-fixnum. The affected modules are emacs-lisp/syntax.el,
Paul> org/org-list.el, progmodes/cc-engine.el, progmodes/js.el, and
Paul> simple.el.

The js.el uses fall into 2 categories.

One, assuming the maximum paren depth is most-positive-fixnum:

(defconst js--initial-pitem
  (make-js--pitem
   :paren-depth most-negative-fixnum
   :type 'toplevel))

This seems reasonably safe.  You'd need a truly absurd .js file to break
this.


Two, as an argument to forward-comment: (forward-comment most-positive-fixnum).
This also seems safe, as the argument is a comment count, not a buffer position.
That said these could perhaps be changed to (forward-comment (point-max)).

Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]