From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: with-wrapper-hook is obsolete; how to replace it? Date: Mon, 16 May 2016 13:40:33 -0400 Message-ID: References: <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: 8bit X-Trace: ger.gmane.org 1463420503 26313 80.91.229.3 (16 May 2016 17:41:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 May 2016 17:41:43 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 16 19:41:35 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 1b2MW9-0007Qc-8r for ged-emacs-devel@m.gmane.org; Mon, 16 May 2016 19:41:21 +0200 Original-Received: from localhost ([::1]:45435 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MW8-0001KE-EP for ged-emacs-devel@m.gmane.org; Mon, 16 May 2016 13:41:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MVl-0001Fk-Ns for emacs-devel@gnu.org; Mon, 16 May 2016 13:40:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2MVk-0003Iu-NK for emacs-devel@gnu.org; Mon, 16 May 2016 13:40:57 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:35907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MVk-0003Ia-3O for emacs-devel@gnu.org; Mon, 16 May 2016 13:40:56 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b2MVd-0006xx-6K for emacs-devel@gnu.org; Mon, 16 May 2016 19:40:49 +0200 Original-Received: from 45.72.245.134 ([45.72.245.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 May 2016 19:40:49 +0200 Original-Received: from monnier by 45.72.245.134 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 May 2016 19:40:49 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 45.72.245.134 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:4rbtAKgyTuhhKOHiwFEfKFm2EC8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:203860 Archived-At: [ Hmm... I can't seem to see my reply, so I'll send it again. ] > When I run ‘make compile-always’ from the lisp subdirectory I see diagnostics > like this: > In buffer-substring--filter: > simple.el:4058:52:Warning: ‘with-wrapper-hook’ is an obsolete macro (as of > 24.4); use a -function variable modified by ‘add-function’. > How do I alter the code to use add-function instead? Here's a translation table: +---------------------+-----------------+----------------+ | with-wrapper-hook | foo-functions | add-hook | +---------------------+-----------------+----------------+ | funcall | foo-function | add-function | +---------------------+-----------------+----------------+ This replacement has already been done in buffer-substring, but we still need to use the obsolete with-wrapper-hook in order to support the corresponding obsolete filter-buffer-substring-functions variable. Stefan