From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Kost Newsgroups: gmane.emacs.help Subject: Re: setting line-length for mediawiki-mode? Date: Thu, 16 Mar 2017 23:52:36 +0300 Message-ID: <87ziglaqqz.fsf@gmail.com> References: <8737edupvl.fsf@skimble.plus.com> <20170316175107.GA16002@workstation> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489697601 944 195.159.176.226 (16 Mar 2017 20:53:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 16 Mar 2017 20:53:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: hector Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 16 21:53:16 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cocOT-0007KG-Jw for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Mar 2017 21:53:09 +0100 Original-Received: from localhost ([::1]:45764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cocOW-00075D-Kx for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Mar 2017 16:53:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cocO3-00074x-7r for help-gnu-emacs@gnu.org; Thu, 16 Mar 2017 16:52:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cocO0-0005rT-66 for help-gnu-emacs@gnu.org; Thu, 16 Mar 2017 16:52:43 -0400 Original-Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:35049) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cocNz-0005pc-Up for help-gnu-emacs@gnu.org; Thu, 16 Mar 2017 16:52:40 -0400 Original-Received: by mail-lf0-x243.google.com with SMTP id v2so4204350lfi.2 for ; Thu, 16 Mar 2017 13:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=cXL5fGMRaJwYmlkDSZNxWXvnf/aZD9kjXJdFeFGmCt0=; b=muaCeqpZxCFloHSYZA0SFHvTFI5Uqhkuv3wMFVDgvNkvnw1bbvOpikDUbv+5yiF+u+ oLFUdRugp94E7r8YrpWY1Rd50psyn7fTO15Zk73l7dTs65y19iEkxjxUb0jmgOTeyIHH dmykDeaxfUinGJuz6NjEoUQIGVxCaOnQqTE5Y1odfXvOYh1JX5CqQfqct5zdEqeHVgxJ 2a4P75k3yGiNTtuEbR2/ICWzGIw/kmcy/hgFg3AKWtywFsoYHLInXLjuwR+U69ytBX6j +itQfTCfOxCMVHQq/7NX8rqjh7Awj6IKh9VdvGvPbUlkv4oM609Ayz/9idIQpaz9CRft jsBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=cXL5fGMRaJwYmlkDSZNxWXvnf/aZD9kjXJdFeFGmCt0=; b=I+3T2XFLVYei3Axmrs6KPVudLyGHDmeyjqxhRgyYUWWcS6TWQxIsVcM5Rlqy+vlqYF LAQgtDQ48rdD+EVqQXyMaxpTZ7rFGX3f5KntqHuX6qMObFu6/spuALEuBNUJODJt9Lzm I9ZsVkLrfG6QUxZW4k3Z6ReyVrUA2Ft2zrzeznekS1XkeiNLK1RiQfqKSvLE1V3fDX4q jAYpJ5m3zMPKYbSWX34IRzk6un3TtgcSYc15hRxHxF1jhRH2H3NWnVdlqAIKax6etv+p A4Lmh3AWh39kwn3FsVvpSQ+XAlyO+B4/i/kXQwlMsarHc0AgL6h10P2q5C7JyNJCyDDn 88Fw== X-Gm-Message-State: AFeK/H2RPr9GtV4CMZN7hoGkvZH9vs8CVMS7dmSdQiWj4dtpOCAKJXfxl4n3SwkjQgYNMw== X-Received: by 10.46.32.151 with SMTP id g23mr3387029lji.2.1489697558467; Thu, 16 Mar 2017 13:52:38 -0700 (PDT) Original-Received: from leviafan ([217.107.194.130]) by smtp.gmail.com with ESMTPSA id m27sm1099147ljb.24.2017.03.16.13.52.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Mar 2017 13:52:37 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Thu, 16 Mar 2017 15:08:11 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::243 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112582 Archived-At: Stefan Monnier (2017-03-16 15:08 -0400) wrote: >> '(lambda () > > Running for the Useless Use of Quote award? To make it clear: Stefan wanted to say that there is no point to quote lambda; see for details. I would also advise to avoid putting lambdas in hooks. The reason is: what if you would want to remove it from hook? If you added a function name to a hook, it would be much easier to remove it. For example: (defun some-stuff-for-mediawiki () (toggle-truncate-lines 0) (abbrev-mode 1) (set-fill-column 65000) (auto-fill-mode 0)) (add-hook 'mediawiki-mode-hook 'some-stuff-for-mediawiki) Now if you want to remove this function from the hook, you can do it simply by evaluating: (remove-hook 'mediawiki-mode-hook 'some-stuff-for-mediawiki) -- Alex