From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.devel Subject: Re: Is there a way to inhibit message3 from Elisp? Date: Wed, 22 Apr 2015 13:55:42 +0200 Message-ID: <87lhhke5s1.fsf@gmail.com> References: <87618psiu4.fsf@gmail.com> <87a8y1l3ho.fsf@gmail.com> <83618o4eom.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1429704126 15156 80.91.229.3 (22 Apr 2015 12:02:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Apr 2015 12:02:06 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 22 14:02:05 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YktLT-0000iu-GF for ged-emacs-devel@m.gmane.org; Wed, 22 Apr 2015 14:01:35 +0200 Original-Received: from localhost ([::1]:34726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YktLS-0004Bd-Os for ged-emacs-devel@m.gmane.org; Wed, 22 Apr 2015 08:01:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YktLM-0004AW-DQ for emacs-devel@gnu.org; Wed, 22 Apr 2015 08:01:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YktLI-0007o8-Ak for emacs-devel@gnu.org; Wed, 22 Apr 2015 08:01:28 -0400 Original-Received: from mail-wg0-x236.google.com ([2a00:1450:400c:c00::236]:34376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YktLI-0007o2-3G; Wed, 22 Apr 2015 08:01:24 -0400 Original-Received: by wgso17 with SMTP id o17so244378942wgs.1; Wed, 22 Apr 2015 05:01:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=ZJiJ+Z+pKMWm17z3vOPEB55/Xb/AHiTfkF//fnscO2s=; b=UH3oeYE8eboioX8Fczl1KiCCeX7ITQscW526y9BDzr5T1s2gS75mNdfDS26lFNyCLY 55gY/ouUAtzU5y6/KDP+x/65BB7Ry66K/5e5GjvibPCyTfCnj8j3ePOFd2d47zJMi1fM AamDJYHd6CNO3DT98S1SixavpjzSq+ARmFqEBnpxdhqeAj/LhCS2xdaepGjKo3/wpBE8 ve64W0c75dfD/0RRLlXxs4NXEVjiRU1BCDSTS1vDOXbCtXGKFQYSOF5RqpHoRz2kHwHR XZqjmQp1Ql6BusUA9ddb3ZmE4Ug6id/MxCTNlokI5tF57noUyj2+hIigi3eMsZ/YiDKT L2zA== X-Received: by 10.180.19.166 with SMTP id g6mr5343614wie.56.1429704083312; Wed, 22 Apr 2015 05:01:23 -0700 (PDT) Original-Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by mx.google.com with ESMTPSA id eh5sm7470041wic.20.2015.04.22.05.01.22 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 22 Apr 2015 05:01:22 -0700 (PDT) In-Reply-To: <83618o4eom.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 22 Apr 2015 13:53:29 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185773 Archived-At: Eli Zaretskii writes: >> I got this code to work as I expect: >> >> (progn >> (setq inhibit-message t) >> (message "foo") >> (setq inhibit-message nil)) >> >> However, this doesn't work: >> >> (let ((inhibit-message t)) >> (message "foo")) > > How does it "not work"? It did for me. I misunderstood that when "C-x C-e" would not print the message in *scratch*. But otherwise, it works. > Some comments for the changes: > > . This variable is a boolean, so it's better to use DEFVAR_BOOL > instead of DEFVAR_LISP. (Don't forget to change the test in > message3 accordingly.) > > . The Emacs coding conventions are to use this: > > if (something) > { > do_whatever (); > } > > rather than this: > > if (something) { > do_whatever (); > } > > Besides, when there's only one statement after 'if', you don't > need the braces at all. OK. > . With your last change, the doc string is misleading, and should be > updated. Updated. > . The change should be accompanied by an entry in etc/NEWS. Bonus > points for updating the ELisp manual as well. Updated etc/NEWS and the manual (entry for `message'). Let me know if it's OK to merge. Oleh