From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Towards a cleaner build: erc.el Date: Thu, 13 Jun 2019 12:21:22 -0400 Message-ID: References: <83zhn6zkgf.fsf@gnu.org> <83a7eo9nsh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="32551"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 13 19:53:40 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hbTuu-0008LW-6A for ged-emacs-devel@m.gmane.org; Thu, 13 Jun 2019 19:53:40 +0200 Original-Received: from localhost ([::1]:43002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbTut-0000GO-4m for ged-emacs-devel@m.gmane.org; Thu, 13 Jun 2019 13:53:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50711) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSeN-0004Gr-Ul for emacs-devel@gnu.org; Thu, 13 Jun 2019 12:32:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSTe-0004VI-9K for emacs-devel@gnu.org; Thu, 13 Jun 2019 12:21:27 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7911) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbSTe-0004Qo-2O for emacs-devel@gnu.org; Thu, 13 Jun 2019 12:21:26 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 52777810F9 for ; Thu, 13 Jun 2019 12:21:25 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 27F668030C for ; Thu, 13 Jun 2019 12:21:24 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1560442884; bh=UbHGeF6J7acNVqnP6rCsCfRFXewXt/F4HAdm2DjLEBU=; h=From:To:Subject:References:Date:In-Reply-To:From; b=SuOsQQAy4wsAPYZ4lFJPVwX5LrsFC+VAl6NDBK2uTgCppLrVI50o9MEiFZmiK6nkP ASHEQ5CWmd/qofkayVYBTy3yXGIdyYWhzBbGtyM/Fevyy53Ia9hrUanFwj6RBfsWtY 6HliBERVD4+0aEg8wKHtDNB4XN6UMqBUBP7UApTtHOKw6HfSF21ChUE0ChqDv/Vcfd yhzdMyI85b/C/ItmPyq49M8h6vZu/ByPkhp6w3DGCzxgI9SVdkBk0kYvYc3vDoJebE 1yPG1qK/fGmJWqrqqlVt6U1xKSI1fnRYU91dyf4PqT6LL50mx/UiFTKU8VSaP6O+g/ 9jxNpG9EjStRQ== Original-Received: from alfajor (cm-84.215.66.78.getinternet.no [84.215.66.78]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C0359120CA1 for ; Thu, 13 Jun 2019 12:21:23 -0400 (EDT) In-Reply-To: (Lars Ingebrigtsen's message of "Thu, 13 Jun 2019 02:04:07 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:237530 Archived-At: > The problem here is that `str' is in the public calling convention on > `erc-pre-send-hook': [...] > That's a quite, er, uhm, strange way of doing it, but... The > traditional way is to offer a filter function that can alter the string. I typically use (with-no-warnings (defvar str)) within the function (but before the run-hook) for that. > Would a way forward here be to obsolete this hook variable and add a new > function along those lines? I haven't looked in detail, but an erc-pre-send-function that filters the string sounds good, yes. Stefan