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: [Emacs-diffs] master ff9ddda: Simplify pre-write-conversion for utf-8-hfs coding system Date: Fri, 10 Jun 2016 11:54:59 -0400 Message-ID: References: <20160610080445.616.81209@vcs.savannah.gnu.org> <20160610080445.5113D220143@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1465574125 30658 80.91.229.3 (10 Jun 2016 15:55:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jun 2016 15:55:25 +0000 (UTC) Cc: David Reitter To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 10 17:55:15 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 1bBOmB-0003d2-EH for ged-emacs-devel@m.gmane.org; Fri, 10 Jun 2016 17:55:15 +0200 Original-Received: from localhost ([::1]:42984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBOmA-0000Pp-HS for ged-emacs-devel@m.gmane.org; Fri, 10 Jun 2016 11:55:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBOm1-0000Nh-Rg for emacs-devel@gnu.org; Fri, 10 Jun 2016 11:55:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBOlw-00071H-Tk for emacs-devel@gnu.org; Fri, 10 Jun 2016 11:55:04 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:36533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBOlw-000719-P0 for emacs-devel@gnu.org; Fri, 10 Jun 2016 11:55:00 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u5AFsx7S007020; Fri, 10 Jun 2016 11:54:59 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 77A8F601B1; Fri, 10 Jun 2016 11:54:59 -0400 (EDT) In-Reply-To: <20160610080445.5113D220143@vcs.savannah.gnu.org> (David Reitter's message of "Fri, 10 Jun 2016 08:04:45 +0000 (UTC)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5702=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5702> : inlines <4918> : streams <1649755> : uri <2227911> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:204275 Archived-At: > ;; Pre-write conversion for `utf-8-hfs'. > (defun ucs-normalize-hfs-nfd-pre-write-conversion (from to) > - (let ((old-buf (current-buffer))) > - (set-buffer (generate-new-buffer " *temp*")) > - (if (stringp from) > - (insert from) > - (insert-buffer-substring old-buf from to)) > - (ucs-normalize-HFS-NFD-region (point-min) (point-max)) > - nil)) > + (ucs-normalize-HFS-NFD-region (point-min) (point-max))) Could you add a comment explaining why it's OK to ignore `from` and `to` here (as well as rename those args to `_from` and `_to` to make it clear to the byte-compiler that we purposefully ignore them)? Stefan