all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#31232: 27.0.50; Obsolete argument RESULT in the macro `dotimes'
@ 2018-04-21 20:53 Juri Linkov
  2018-04-22  0:22 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Juri Linkov @ 2018-04-21 20:53 UTC (permalink / raw)
  To: 31232

If the arg RESULT of dotimes is not yet deprecated,
then to legitimize its usage it needs to be fixed.
At least, this patch tries to do this (maybe not in the best way):

diff --git a/lisp/subr.el b/lisp/subr.el
index 9cf7d59..aa2dc49 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -246,8 +246,8 @@ dotimes
                  ,@body)
                (setq ,counter (1+ ,counter)))
              ,@(if (cddr spec)
-                   ;; FIXME: This let often leads to "unused var" warnings.
-                   `((let ((,(car spec) ,counter)) ,@(cddr spec))))))
+                   ;; No-op ,(car spec) is added to avoid "unused var" warnings.
+                   `((let ((,(car spec) ,counter)) ,(car spec) ,@(cddr spec))))))
       `(let ((,temp ,end)
              (,(car spec) ,start))
          (while (< ,(car spec) ,temp)





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

* bug#31232: 27.0.50; Obsolete argument RESULT in the macro `dotimes'
  2018-04-21 20:53 bug#31232: 27.0.50; Obsolete argument RESULT in the macro `dotimes' Juri Linkov
@ 2018-04-22  0:22 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2018-04-22  0:22 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 31232

Juri Linkov wrote:

> If the arg RESULT of dotimes is not yet deprecated,
> then to legitimize its usage it needs to be fixed.

Or, simply document that RESULT should not be used unless it makes use
of VAR, as suggested in https://debbugs.gnu.org/16206#8 .





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

end of thread, other threads:[~2018-04-22  0:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-21 20:53 bug#31232: 27.0.50; Obsolete argument RESULT in the macro `dotimes' Juri Linkov
2018-04-22  0:22 ` Glenn Morris

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.