From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: hector Newsgroups: gmane.emacs.help Subject: Re: setting line-length for mediawiki-mode? Date: Thu, 16 Mar 2017 22:20:07 +0100 Message-ID: <20170316212007.GA20711@workstation> References: <8737edupvl.fsf@skimble.plus.com> <20170316175107.GA16002@workstation> <87ziglaqqz.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1489699492 9087 195.159.176.226 (16 Mar 2017 21:24:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 16 Mar 2017 21:24:52 +0000 (UTC) User-Agent: Mutt/1.5.20 (2009-06-14) Cc: help-gnu-emacs@gnu.org To: Alex Kost Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 16 22:24:48 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 1coct5-00022j-Lx for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Mar 2017 22:24:47 +0100 Original-Received: from localhost ([::1]:45836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coctB-00059Z-HS for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Mar 2017 17:24:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cocsH-00059B-GF for help-gnu-emacs@gnu.org; Thu, 16 Mar 2017 17:23:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cocsD-0002Xe-Jm for help-gnu-emacs@gnu.org; Thu, 16 Mar 2017 17:23:57 -0400 Original-Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:35992) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cocsD-0002XT-DA for help-gnu-emacs@gnu.org; Thu, 16 Mar 2017 17:23:53 -0400 Original-Received: by mail-wm0-x22d.google.com with SMTP id n11so2089618wma.1 for ; Thu, 16 Mar 2017 14:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6LiVFy0XPJzY5gc/RaQqn10LqI/XppKYXQtmQOiddn8=; b=f/IUtD/dK7ooW8meP2YgL7bAry9fyajFBSOv6qrGCFJj/Kjy0cVSGr0pZNQFLnAH+m Cgv1DN9h4jUfUC1UnAUm61mMJaKg3/M+jEMwlp43UrResQvM0HC2KchcDhXzQOZ3ljA0 5/kVxhNBzLiqlfFMgdWK7puf8216+t5IRpgkXpRksm26R9IMt15sdEVEZltdkRgCrSjA acuAVSJNdBooNDOWCZ59f+HbknNFfc+J5U4ZgfhkNrlsW41sKjASZOBJuCxkXaQncwaL eqF0d/7m0KiW5jeUygIA0tO9rXqeLJ3H1teicVTR9ctFcMaikWdpd55bdZYHKeUkONpY xd4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6LiVFy0XPJzY5gc/RaQqn10LqI/XppKYXQtmQOiddn8=; b=DyRO6w102pNcNc3Anuz67YMr5b0V5ubV5X/O9kYGsIHZLUvbFfwBfs2kBulzbk80AR jBtuMszNWy05c5zQjzl4mNmO1pDP9GVttyK1YgV4b5Dh647n2cVuXgTkpQnhWCUhqGXE mbyuuekHy32bJnMq01Xps7UN114hkJhMr++MAlrUHFD4xAVTdyH9Jjl3fLUhc2atgaxn 5nKOKEoxTelVBJznoND/wONFDedCorMK4dNR/RvPdfM73y98dwIHIsR8q3H/Wb1OfEVF Pexy8EvpeMjocv57thP2Ba5PgxUf8auYfQt3GxuEeRf7Q1MufFLNGdIpBp20Fl2bRCkp YMMg== X-Gm-Message-State: AFeK/H3EB+5EbHa5SFSmEoAdnvfre+78+BGp5uzg6NqRzdV35GkihmjxdgkXFzViyMP1GQ== X-Received: by 10.28.24.6 with SMTP id 6mr10130222wmy.142.1489699432411; Thu, 16 Mar 2017 14:23:52 -0700 (PDT) Original-Received: from workstation ([95.61.67.191]) by smtp.gmail.com with ESMTPSA id t195sm252291wmt.32.2017.03.16.14.23.51 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 16 Mar 2017 14:23:51 -0700 (PDT) X-Google-Original-From: hector Content-Disposition: inline In-Reply-To: <87ziglaqqz.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22d 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:112583 Archived-At: On Thu, Mar 16, 2017 at 11:52:36PM +0300, Alex Kost wrote: > 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. Thanks for the explanation. That's what I thought. Very cryptic though :-) Blame it on the Emacs manual 23.2 (yes, I know). It's been fixed in newer versions. > 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) Got it.