GNU Info

Info Node: (emacs-lisp-intro.info)Disentangle beginning-of-buffer

(emacs-lisp-intro.info)Disentangle beginning-of-buffer


Next: Large buffer case Prev: beginning-of-buffer opt arg Up: beginning-of-buffer opt arg
Enter node , (file) or (file)node

Disentangle `beginning-of-buffer'
.................................

   Like other complex-looking expressions, the conditional expression
within `beginning-of-buffer' can be disentangled by looking at it as
parts of a template, in this case, the template for an if-then-else
expression.  In skeletal form, the expression looks like this:

     (if (BUFFER-IS-LARGE
         DIVIDE-BUFFER-SIZE-BY-10-AND-MULTIPLY-BY-ARG
       ELSE-USE-ALTERNATE-CALCULATION

   The true-or-false-test of this inner `if' expression checks the size
of the buffer.  The reason for this is that the old Version 18 Emacs
used numbers that are no bigger than eight million or so and in the
computation that followed, the programmer feared that Emacs might try
to use over-large numbers if the buffer were large.  The term
`overflow', mentioned in the comment, means numbers that are over
large.  Version 21 Emacs uses larger numbers, but this code has not
been touched, if only because people now look at buffers that are far,
far larger than ever before.

   There are two cases:  if the buffer is large and if it is not.


automatically generated by info2www version 1.2.2.9