4 ms·
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
by kazinator 11y ago
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-local-variables-in-elisp http://stackoverflow.com/questions/6858894/how-to-increment-...
- PuercoPop 11y agoFirst 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.