From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: Towards a cleaner build: hexl Date: Fri, 17 May 2019 08:49:30 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="66382"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Emacs developers To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 17 14:50:02 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.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRcJF-000H8y-E6 for ged-emacs-devel@m.gmane.org; Fri, 17 May 2019 14:50:01 +0200 Original-Received: from localhost ([127.0.0.1]:48113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRcJE-0004sR-Db for ged-emacs-devel@m.gmane.org; Fri, 17 May 2019 08:50:00 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRcJ7-0004sF-6u for emacs-devel@gnu.org; Fri, 17 May 2019 08:49:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRcJ6-00018R-DM for emacs-devel@gnu.org; Fri, 17 May 2019 08:49:53 -0400 Original-Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]:35311) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hRcJ2-00014Z-Cg for emacs-devel@gnu.org; Fri, 17 May 2019 08:49:50 -0400 Original-Received: by mail-oi1-x232.google.com with SMTP id a132so5073640oib.2 for ; Fri, 17 May 2019 05:49:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=vw6fxCJOcql1AiVN5Qg336gpkKhOzNSWylD920u/Ec4=; b=PuMhB3uVDDDtsKybh6HHeELSkrU9U/BQJZOdaqymWdPE4lHbfHw3KK2h2atswL4Osj rUmSlfTZZPGKNWkUg/IViUEtZRTq9uylH75V9ily5+Benfhnif6eqSxxosVlVDCQyYl3 SOKWwkKAJ2K30XsCurcZHv6pjtMWP0lmk7HW0LycNuEYdvnzhOsqybBUTEmkZOVrytY0 UxiYWXcI4g5HSYY0j46T5gCS8SjTaTP8N4q5dRjpWHy0ZCk8QXEJjust78f0VfyAXWOk k/z070dh27ux7N4So8GdcOnIsXPMvCfO6CL8JmQ+0of8DbjHvqOMfFfw2A3WRQXe8ofN nocg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=vw6fxCJOcql1AiVN5Qg336gpkKhOzNSWylD920u/Ec4=; b=IkqwIOYt7Yn5k42BbGjE8/RZImKBN4PkxVEe7o5z90ZqKexEan5FmUMPDusTaVAnrJ Kj6OH1KrLWWFZYGJh76KD6OL5Y7vrVCc0NDYX+E+hSu6HB7g0vdG8rUiGzZ6lNsh0AUb 8mIEvIZGiVpiFjNGC+H3qlN7Oeq3YFzTVggnSZcEdus4PQbC+UF7RxmoLc9gd2UUiW2C hM2LkTJ7N5DM0lDwTQ8Ph+GU0Xm1spw4NxbpLF7P8IArNkPcHzFs4v6PiGjX+dz1nn3s NdN8wmWWMAZDYIRCKfpVDB+GLEGj1T9jh+1u8mHmjOVt/ZUZPgDlO0jO5bF2Jq1cwwwn opjg== X-Gm-Message-State: APjAAAW6Uq504t7C2GIGFsBNGxoB8hKTMmHOHdunpxc0JVu03EbcmUvm oUqbah3Ha0vC5jTMJQ/hA2wvYEsA0QCR8zl0Zi8= X-Google-Smtp-Source: APXvYqxbgkXK/w2CINKWQvayQEQFdOZ4uUqVy9VQUYNeuQH3uLJ6yVqaYYSk95ucmFeJce6k8A0NA338T+kMRqa/dqc= X-Received: by 2002:aca:cd53:: with SMTP id d80mr1034654oig.87.1558097386302; Fri, 17 May 2019 05:49:46 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::232 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:236663 Archived-At: On Fri, 17 May 2019 at 08:45, Lars Ingebrigtsen wrote: > > In hexl-insert-multibyte-char: > hexl.el:881:29:Warning: =E2=80=98string-as-unibyte=E2=80=99 is an obsolet= e function (as of > 26.1); use =E2=80=98encode-coding-string=E2=80=99. > > This is the code... > > (let ((encoded (encode-coding-char ch coding)) > (internal (string-as-unibyte (char-to-string ch))) > internal-hex) > ;; If encode-coding-char returns nil, it means our character > ;; cannot be safely encoded with buffer-file-coding-system. > ;; In that case, we offer to insert the internal representat= ion > ;; of that character, byte by byte. > > And here we really, really want the internal byte representation of the > multibyte string, Shouldn't we use (encode-coding-char ch 'utf-8-emacs) instead?