News for hackers. Stuff that matters.
Re:Practical Emacs Lisp by kazinator on Friday September 11, 2015 @02:52PM (#10205488)
That is pretty atrocious. All the initializing setq's could just be init forms in the let.

Now you might think that this is also unidiomatic:

  (setq totalCnt (1+ totalCnt))
Turns out, though, that Elisp doesn't have modify macros, except in the CL compatibility package.

What Xah is doing is the same as the accepted SO answer for incrementing a local variable:

http://stackoverflow.com/questions/6858894/how-to-increment-...

Re:Practical Emacs Lisp by PuercoPop on Friday September 11, 2015 @03:21PM (#10205659)
First I forgot to add I Xah Lee's ergo emacs was a valuable resource when learning Emacs. AFAIR it succintly explained emacs base abstractions.

On the setq, I what I meant was iterating through setqs and while (and I seem to recall even catch/throw) as agumonkey mentioned.

Then again, 'in my mind', idiomatic elisp uses cl-lib :D. so (cl-incf total-count) would be better. snakeCase is unidiomatic as well.