From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#23648: [PATCH] `defun-declarations-alist' can be unintentionally modified Date: Wed, 20 Jul 2016 21:09:42 -0400 Message-ID: <87a8hbdcfd.fsf@users.sourceforge.net> References: <87twfnd50u.fsf@users.sourceforge.net> <83wpkj10eg.fsf@gnu.org> <83k2gi24nz.fsf@gnu.org> <83inw2227y.fsf@gnu.org> <87r3aqbppk.fsf@web.de> <83d1ma1hai.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1469063428 30618 80.91.229.3 (21 Jul 2016 01:10:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Jul 2016 01:10:28 +0000 (UTC) Cc: Michael Heerdegen , 23648@debbugs.gnu.org, pogonyshev@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 21 03:10:17 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 1bQ2VE-0002L3-7A for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Jul 2016 03:10:16 +0200 Original-Received: from localhost ([::1]:37705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ2VD-0001C7-HD for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jul 2016 21:10:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ2V6-00017e-3q for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 21:10:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQ2Uz-0004e4-Vt for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 21:10:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ2Uz-0004dz-Rm for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 21:10:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bQ2Uz-0004dB-Ke for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 21:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Jul 2016 01:10: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.146906338717777 (code B ref 23648); Thu, 21 Jul 2016 01:10:01 +0000 Original-Received: (at 23648) by debbugs.gnu.org; 21 Jul 2016 01:09:47 +0000 Original-Received: from localhost ([127.0.0.1]:59104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ2Uk-0004cf-Mm for submit@debbugs.gnu.org; Wed, 20 Jul 2016 21:09:46 -0400 Original-Received: from mail-io0-f179.google.com ([209.85.223.179]:33280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ2Uj-0004cT-VP for 23648@debbugs.gnu.org; Wed, 20 Jul 2016 21:09:46 -0400 Original-Received: by mail-io0-f179.google.com with SMTP id 38so63117727iol.0 for <23648@debbugs.gnu.org>; Wed, 20 Jul 2016 18:09:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=zGSwl2YhMKTPiN7L9qyEmQWXALDPM/LpA6xcy0V9WGs=; b=Fl1XEZ84id25kdVrSRTNKAe1hFQ4MRscTEgzpgQJxY0w9kzXvyiNcxCqaaY4Lpsk6P U7Wx4m4buKCWB/rsSw7eGrCvopHN2qq83yRwiF3k6imOk0HhGgeDin1Q2bOqip9Kxgx1 7yDvDtNPR6/xPeht7zj2RU2aZKqheTTJAusekIxAUPIGioly1TBpM6zRXBcPRdWZUQGf 4QJgZst6zayLnnUvNsIsR/hcmY4nAb3Uy7lmdUJI0PgcLT7RSJyEWeU6ygPS2bIrS1fl JQRETWZ2ewIn6SLJV3Kv+ASayyGFhoGr+xjVV5/LMjtu5N0VvH92v0XRiEK/hL8y4dHQ +1kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=zGSwl2YhMKTPiN7L9qyEmQWXALDPM/LpA6xcy0V9WGs=; b=Q+iYtoq4SnH+TQVhWzZAI0c7Lew++5//aDPjCnQ9UzfDf5++MJoa82sAL38eQ6gSJi Ig1WzjGiwnMb470xPe3irlfN3THM8O7f6cn98cPBRRiemKPxOwr7zh/PIfDZy3UtxS4j X5+xsmUUIcc58GHtKkbuFJlmFomyekPIvgylI3Ihh5TJ57fa2aC6WxFaA66FW/CKlGcj 7n0pTXKoJ3vrOWvFvn2GtRNHBz8C7z+aD8dxQ9y/RTSWPw+61q/dJXknPdlUeRk//VOu lfIUIKyHQshFD2INqN3sovQI+UOFJt3jVijfDXRsriqcaevg7uI2SMlDTP237tKLVvhN 9aTw== X-Gm-Message-State: ALyK8tJdEikAN2LWS5SH2TYB4/dnDtofEN2k/l/HleVsBC4hPYnOq8RMuk6Kz5CALNh/MA== X-Received: by 10.107.163.129 with SMTP id m123mr52443221ioe.48.1469063380473; Wed, 20 Jul 2016 18:09:40 -0700 (PDT) Original-Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id j12sm2590063ioi.36.2016.07.20.18.09.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jul 2016 18:09:39 -0700 (PDT) In-Reply-To: <83d1ma1hai.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 19 Jul 2016 05:40:53 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) 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:121347 Archived-At: Eli Zaretskii writes: >> From: Michael Heerdegen >> Cc: Noam Postavsky , 23648@debbugs.gnu.= org, pogonyshev@gmail.com >> Date: Mon, 18 Jul 2016 23:28:55 +0200 >>=20 >> Eli Zaretskii writes: >>=20 >> > Sorry, I guess I'm too stupid to understand this advanced stuff. Or >> > maybe it's too late. >>=20 >> I think the example uses macroexpand only to demonstrate what (obviously >> ill) code you will get when you compile the mentioned form after >> performing the completion as mentioned. > > Thanks, but I'm still none the wiser about the questions I asked. Hmm, maybe it will be clearer like this: Evaluate: (macroexpand '(defun foo () (declare (indent 1)) nil)) ;=3D> (prog1 (defalias (quote foo) (function (lambda = nil nil))) (function-put (quote foo) (quote lisp-indent-function) (quote 1)= )) This gives the correct result (the (function-put...) part comes from the (declare (indent 1))). Now perform a completion on a declare clause, e.g., put cursor after "ind" and hit C-M-i: (declare (ind)) completes to (declare (indent)). Now evaluate the same expression as before: (macroexpand '(defun foo () (declare (indent 1)) nil)) ;=3D> (prog1 (defalias (quote foo) (function (lambda = nil nil))) "Warning: Unknown defun property =E2=80=98indent=E2=80=99 in foo= ") This give the wrong result, the (declare (indent 1)) is giving the "Warning:...". Emacs has unlearned the indent declaration. In fact it unlearned all the declarations for defun except for gv-setter, you can see this by looking at defun-declarations-alist's value.