From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MON KEY Newsgroups: gmane.emacs.bugs Subject: bug#6488: put `cl-floor', `cl-ceiling', `cl-truncate', `cl-round', and `cl-mod' side-effect-free Date: Mon, 21 Jun 2010 18:36:22 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1277161144 9997 80.91.229.12 (21 Jun 2010 22:59:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 Jun 2010 22:59:04 +0000 (UTC) To: 6488@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 22 00:59:02 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OQpxG-0004JP-Ch for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Jun 2010 00:59:02 +0200 Original-Received: from localhost ([127.0.0.1]:52280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQpxG-0007Ri-01 for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Jun 2010 18:59:02 -0400 Original-Received: from [140.186.70.92] (port=48081 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQpxA-0007QG-Jl for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2010 18:58:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQpx9-0003XQ-DU for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2010 18:58:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43500) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQpx9-0003XK-Bv for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2010 18:58:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OQpby-0000oM-0D; Mon, 21 Jun 2010 18:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: MON KEY Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Jun 2010 22:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6488 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.12771597943098 (code B ref -1); Mon, 21 Jun 2010 22:37:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jun 2010 22:36:34 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQpbW-0000nv-9c for submit@debbugs.gnu.org; Mon, 21 Jun 2010 18:36:34 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQpbT-0000nm-Uc for submit@debbugs.gnu.org; Mon, 21 Jun 2010 18:36:32 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:52249) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OQpbP-0002fC-TU for submit@debbugs.gnu.org; Mon, 21 Jun 2010 18:36:27 -0400 Original-Received: from [140.186.70.92] (port=34255 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQpbN-00028d-Gd for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2010 18:36:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQpbM-0000xX-CL for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2010 18:36:25 -0400 Original-Received: from mail-gw0-f41.google.com ([74.125.83.41]:54981) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQpbM-0000xE-80 for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2010 18:36:24 -0400 Original-Received: by gwj19 with SMTP id 19so1106124gwj.0 for ; Mon, 21 Jun 2010 15:36:23 -0700 (PDT) Original-Received: by 10.150.254.7 with SMTP id b7mr5282731ybi.293.1277159782565; Mon, 21 Jun 2010 15:36:22 -0700 (PDT) Original-Received: by 10.151.10.5 with HTTP; Mon, 21 Jun 2010 15:36:22 -0700 (PDT) X-Google-Sender-Auth: 6ZdZxwdC8Z8PKv4TDBlKfdKECt8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 21 Jun 2010 18:37:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37936 Archived-At: Following fncns from lisp/emacs-lisp/cl-compat.el `cl-floor' `cl-ceiling' `cl-truncate' `cl-round' `cl-mod' are aliased in cl.el as `floor*' `ceiling*' `round*' `truncate*' The definition of `Values-list' uses cl.el's `values' not cl-compat.el's `Values'. Does this mean that all of the below is redundant: ,---- | (defun cl-floor (a &optional b) (Values-list (floor* a b))) | (defun cl-ceiling (a &optional b) (Values-list (ceiling* a b))) | (defun cl-round (a &optional b) (Values-list (round* a b))) | (defun cl-truncate (a &optional b) (Values-list (truncate* a b))) `---- IOW, are the following not equivalent: (Values-list (truncate* a b)) --> (apply 'values (truncate* 17 9)) --> (apply 'list (truncate* 17 9)) --> (truncate* 17 9) Or, am I missing something? And, if not, and in the off chnace that the byte-compiler would benefit, would it be reasonable to put the 'side-effect-free property on `cl-floor', `cl-ceiling', `cl-truncate', `cl-round', `cl-mod' as they currently don't have it: (let (gthr-sef) (dolist (sefl '(floor* cl-floor ceiling* cl-ceiling truncate* cl-truncate round* cl-round mod* cl-mod) (setq gthr-sef (nreverse gthr-sef))) (if (get sefl 'side-effect-free) (push `(,sefl . side-effect-free) gthr-sef) (push `(,sefl . IS-NOT-side-effect-free) gthr-sef)))) -- /s_P\