From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: with-wrapper-hook is obsolete; how to replace it? Date: Sun, 15 May 2016 10:01:05 -0700 Organization: UCLA Computer Science Department Message-ID: <5738AB51.8030401@cs.ucla.edu> 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 1463331690 25911 80.91.229.3 (15 May 2016 17:01:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 May 2016 17:01:30 +0000 (UTC) To: Emacs Development Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 15 19:01:20 2016 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 1b1zPq-0006Yv-82 for ged-emacs-devel@m.gmane.org; Sun, 15 May 2016 19:01:18 +0200 Original-Received: from localhost ([::1]:40930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1zPp-0006OY-LQ for ged-emacs-devel@m.gmane.org; Sun, 15 May 2016 13:01:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1zPl-0006Gb-PX for Emacs-devel@gnu.org; Sun, 15 May 2016 13:01:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1zPh-0005Pa-IN for Emacs-devel@gnu.org; Sun, 15 May 2016 13:01:12 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1zPh-0005PS-CY for Emacs-devel@gnu.org; Sun, 15 May 2016 13:01:09 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E34D01612CA for ; Sun, 15 May 2016 10:01:06 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Yz2yy72I3I8b for ; Sun, 15 May 2016 10:01:06 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3DDA41612CD for ; Sun, 15 May 2016 10:01:06 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4qho5hERmoEC for ; Sun, 15 May 2016 10:01:06 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2070D1612CA for ; Sun, 15 May 2016 10:01:06 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:203846 Archived-At: When I run =E2=80=98make compile-always=E2=80=99 from the lisp subdirecto= ry I see diagnostics like this: In buffer-substring--filter: simple.el:4058:52:Warning: =E2=80=98with-wrapper-hook=E2=80=99 is an obso= lete macro (as of 24.4); use a -function variable modified by =E2=80=98add-functio= n=E2=80=99. How do I alter the code to use add-function instead? It's not immediately obvious. That is, if there is source code like this: (with-wrapper-hook filter-buffer-substring-functions (beg end delete)= BODY) where filter-buffer-substring-functions is defined like this: (defvar filter-buffer-substring-functions nil "This variable is a wrapper hook around `buffer-substring--filter'.") then what should I replace the source code with?