unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Quoted while loop on calccomp.el
@ 2011-04-16  2:30 Juanma Barranquero
  2011-04-17  3:01 ` Jay Belanger
  0 siblings, 1 reply; 3+ messages in thread
From: Juanma Barranquero @ 2011-04-16  2:30 UTC (permalink / raw)
  To: Emacs developers

In this bit from lisp/calc/calccomp.el, at lines 1284-1290:

		   (if (> mrg 12)  ; indenting too far, go back to far left
		       (let ((j i) (new (if calc-line-numbering 5 1)))
			 '(while (<= j math-comp-level)
			   (aset math-comp-buf-margin j
				 (+ (aref math-comp-buf-margin j) (- new mrg)))
			   (setq j (1+ j)))
			 (setq mrg new)))

it is the '(while stuff an ugly, but intended way to comment out the
while loop, or a mistake? Seems like the the latter, but if so, it's
been there since the initial import of Calc 2.02f on revno:40770
(2001-11-06), which makes that code suspiciously unneeded...

    Juanma



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Quoted while loop on calccomp.el
  2011-04-16  2:30 Quoted while loop on calccomp.el Juanma Barranquero
@ 2011-04-17  3:01 ` Jay Belanger
  2011-04-17  5:40   ` Juanma Barranquero
  0 siblings, 1 reply; 3+ messages in thread
From: Jay Belanger @ 2011-04-17  3:01 UTC (permalink / raw)
  To: Emacs developers; +Cc: jay.p.belanger


Juanma Barranquero <lekktu@gmail.com> writes:
...
> it is the '(while stuff an ugly, but intended way to comment out the
> while loop, or a mistake? Seems like the the latter, but if so, it's
> been there since the initial import of Calc 2.02f on revno:40770
> (2001-11-06), which makes that code suspiciously unneeded...

It's been there longer than that.  It's in calc-comp.el from Calc 2.02,
which goes back to 1991 or so.  (The quoted "while" may well be older than
that, but that's the earliest version of Calc I can find.)  At this
point, I suppose replacing the "if" with something simpler is in order.

Jay




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Quoted while loop on calccomp.el
  2011-04-17  3:01 ` Jay Belanger
@ 2011-04-17  5:40   ` Juanma Barranquero
  0 siblings, 0 replies; 3+ messages in thread
From: Juanma Barranquero @ 2011-04-17  5:40 UTC (permalink / raw)
  To: jay.p.belanger; +Cc: Emacs developers

On Sun, Apr 17, 2011 at 05:01, Jay Belanger <jay.p.belanger@gmail.com> wrote:

> At this
> point, I suppose replacing the "if" with something simpler is in order.

Well, what the "if" has been doing all these years is just

		   (if (> mrg 12)  ; indenting too far, go back to far left
                       (setq mrg (if calc-line-numbering 5 1)))

so let's change it so.

    Juanma



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-17  5:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-16  2:30 Quoted while loop on calccomp.el Juanma Barranquero
2011-04-17  3:01 ` Jay Belanger
2011-04-17  5:40   ` Juanma Barranquero

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).