From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#23648: [PATCH] `defun-declarations-alist' can be unintentionally modified Date: Mon, 18 Jul 2016 11:53:42 -0400 Message-ID: References: <87twfnd50u.fsf@users.sourceforge.net> <83wpkj10eg.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1468857265 11653 80.91.229.3 (18 Jul 2016 15:54:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Jul 2016 15:54:25 +0000 (UTC) Cc: 23648@debbugs.gnu.org, Paul Pogonyshev To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 18 17:54:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bPAs2-0004kF-5L for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Jul 2016 17:54:14 +0200 Original-Received: from localhost ([::1]:48531 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPAs1-0007ef-6r for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Jul 2016 11:54:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPArt-0007di-6R for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2016 11:54:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPArq-0002Ou-4M for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2016 11:54:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPArq-0002Oo-0s for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2016 11:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bPArp-0001Vm-NJ for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2016 11:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jul 2016 15:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23648 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 23648-submit@debbugs.gnu.org id=B23648.14688572315793 (code B ref 23648); Mon, 18 Jul 2016 15:54:01 +0000 Original-Received: (at 23648) by debbugs.gnu.org; 18 Jul 2016 15:53:51 +0000 Original-Received: from localhost ([127.0.0.1]:55898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPArf-0001VN-1L for submit@debbugs.gnu.org; Mon, 18 Jul 2016 11:53:51 -0400 Original-Received: from mail-oi0-f45.google.com ([209.85.218.45]:35221) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPArc-0001V9-M0 for 23648@debbugs.gnu.org; Mon, 18 Jul 2016 11:53:50 -0400 Original-Received: by mail-oi0-f45.google.com with SMTP id l72so112138786oig.2 for <23648@debbugs.gnu.org>; Mon, 18 Jul 2016 08:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=U7a2eOHVwhfTYLXCcFdmc7FzxwCVizxIKheaoc6upM0=; b=kjH9BKL81ipPd3w/VxllTaxRLr1ZVa2hsAXld9Q69risLsUln4TTuJXQxHnpw6zCaB NFAVbmKIwf1bXoW8Q5UYb0nvjlM8AtGerVrGGuzn8RCDXndm1NhTxDkAb6F1pt3Ywl/8 TSsaI94ssbUjTDVzeTaNqLPgghGEHQqeIGExe1flD22XO39TfMdzt6yxL6VDCTxpPoqz qKXn5sl5bMajTzKCbt8XrBohentDD9oNi6O/UFpV6nuVbwEDaOYDHbDqKFlLd9R2Tx77 WDQGDMF+bYxia7VyV6+8oM3P8PIxAHYn4fVCcnIj3YbmD+EtH20XORe8fq3OpiJ7puhN NN9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=U7a2eOHVwhfTYLXCcFdmc7FzxwCVizxIKheaoc6upM0=; b=JHtt6w7wPHZ+bK2JsvHNR2Nf1WnI2e2WxtVd8p8Gs9pDaFuhDe69EbKSLSIX0J6yKS 8yksdYRDxz2pZloa9mygupmtqCGoxoW7IWV0VSG/ew5+Clbko8WknsRrLFFZBmIEW1YZ Lx6I35vp7lpk4ccYqq2+ZQ57+TtsbZLngT4yQR5OPpnqiTB2GX80l9hlriWvqLC1uoYu gm51BMA+CrWzqzAoWfqL4vD0Uwe/UN0qvbm1q0thC3Fjg/SXjZc/Iseah8NEQSMYGFT9 Z1KFC/9dNyN8bQDfp61fHtApspQW3FoxQHmIPZ+O/4huQZ1qIpe0e4lSt8oK/gf2QyYX PWiQ== X-Gm-Message-State: ALyK8tKfYqIVtmeibH4V4p4K5D5+ibmW3b99dZ4mXZLn8XNCm/uqh+a+t1fdVJls/fT1sOeWPhP2oX/+IckmcQ== X-Received: by 10.157.9.248 with SMTP id 53mr21276233otz.35.1468857223017; Mon, 18 Jul 2016 08:53:43 -0700 (PDT) Original-Received: by 10.157.7.161 with HTTP; Mon, 18 Jul 2016 08:53:42 -0700 (PDT) In-Reply-To: <83wpkj10eg.fsf@gnu.org> X-Google-Sender-Auth: fLLtdIKP5pb8yGJTwTaoqmsS6NM X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121223 Archived-At: On Mon, Jul 18, 2016 at 10:33 AM, Eli Zaretskii wrote: >> From: npostavs@users.sourceforge.net >> Date: Sun, 17 Jul 2016 23:00:33 -0400 >> Cc: 23648@debbugs.gnu.org >> >> I agree with analysis and patch here. Since this just appends another >> nil, it should be safe for emacs-25, right? > > I'm not sure, actually. How probable is the situation where this > problem pops up? It happens with 100% probability when performing completion inside a (declare ...) form. Starting from emacs -Q, put into *scratch* (defun foo () (declare (indent 1)) nil) Macroexpanding this gives: (prog1 (defalias 'foo #'(lambda nil nil)) (put 'foo 'lisp-indent-function '1)) Now move point to just after "indent" and type C-M-i (this gives message "Sole completion"), macroexpanding now gives (prog1 (defalias 'foo #'(lambda nil nil)) "Warning: Unknown defun property `indent' in foo") > And when was the bug introduced? Code seems to have been that way since it was introduced in 24.4: dd8791e9 "* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Provide specialized completion tables when completing error conditions and `declare' arguments...."