From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: master a6b5985: Avoid duplicated character classes in rx Date: Tue, 3 Dec 2019 09:39:50 -0800 (PST) Message-ID: References: <20191203142243.9552.27513@vcs0.savannah.gnu.org> <20191203142246.0615C20A2B@vcs0.savannah.gnu.org> <79A83C7D-610F-4CA4-B5E9-7F11FD8A9365@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="214533"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Juanma Barranquero , Emacs developers To: =?iso-8859-1?B?TWF0dGlhcyBFbmdkZWflcmQ=?= , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 03 19:40:45 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1icD6K-000tZ3-To for ged-emacs-devel@m.gmane.org; Tue, 03 Dec 2019 19:40:45 +0100 Original-Received: from localhost ([::1]:57362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icD6I-0003Xf-Oy for ged-emacs-devel@m.gmane.org; Tue, 03 Dec 2019 13:40:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59196) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icCOq-0000uy-KR for emacs-devel@gnu.org; Tue, 03 Dec 2019 12:55:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icC9d-0002LJ-Ik for emacs-devel@gnu.org; Tue, 03 Dec 2019 12:40:09 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:58932) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1icC9b-0001p9-Te for emacs-devel@gnu.org; Tue, 03 Dec 2019 12:40:05 -0500 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xB3HdFKc074131; Tue, 3 Dec 2019 17:39:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=ml5opi5FcBdhuKTv1gl47cYNNacvS/3PH7U7pGMWcaw=; b=js4ZKETaOeRa9efovegVnJyiB6jjrMaHcDIYrAXnIc/dY89LEu80fiqFbLUtvTqxHRyF Q2xhzzVZjzE2JEjFxZt34wLCa7J9HhgWZDlC6aZhWOB0mbHs21XGzZoe5Dv5WJuoKPQH fVqqF5lC4D1nUKn5X66OAWkaGuVed3RCiY5Ds0D/f+0wKo4V1glqOv7ty+gKj4OsUCZF 2cqLhJ2VtU0h2kLUGZgJROoxi6ISF8Cuds9hxrIk6bJIgzVOe9fqLtSmsYQESDU6ulG+ yqbl3LrQvGVHWEyiIy72qDt6sQt/VyvAG8imSVXkC0ahchZ2ZXrt5ENR5HtQrZh9qsvL qw== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2wkgcq9ap2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 03 Dec 2019 17:39:53 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xB3HciUG044226; Tue, 3 Dec 2019 17:39:53 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 2wn7pqe6tn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 03 Dec 2019 17:39:53 +0000 Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id xB3HdpPK005076; Tue, 3 Dec 2019 17:39:52 GMT In-Reply-To: <79A83C7D-610F-4CA4-B5E9-7F11FD8A9365@acm.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4927.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9460 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912030133 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9460 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912030133 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 141.146.126.78 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243074 Archived-At: > > I'd rather fix the code not to rely on the return value. >=20 > I'm sure a lot more code relies on the return value of 'push'. > It's also well-defined in Common Lisp. Why not just document it? +1. My guess is that this doc lack might have just been an oversight. Prior to Emacs 21 (or possibly 22), `push' was defined only in `cl.el' (with no `cl-' prefix). Its doc string said this: push is a Lisp macro in `cl.el'. (push X PLACE) (push X PLACE): insert X at the head of the list stored in PLACE. Analogous to (setf PLACE (cons X PLACE)), though more careful about evaluating each argument only once and in the right order. PLACE may be a symbol, or any generalized variable allowed by `setf'. IOW, even though that version of `push' was supposed to be an Emacs emulation of Common Lisp `push', there's no mention of the return value. There should have been. `push' was moved outside of `cl.el' in Emacs 22 (or 21 possibly). Its doc string was not fixed to specify the return value. `cl-pushnew' has the same doc problem: no spec of the return value. We should specify the return value for each of these. It is as important to `push' as it is to `pop' (whose doc does specify the return value). Common Lisp specifies the return value: http://clhs.lisp.se/Body/m_push.htm