From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: master 8f03888: * lisp/gnus/gnus-art.el: Fix up compiler warnings. Date: Fri, 16 Jan 2015 03:22:45 +0100 Message-ID: References: <20141218182000.19577.72337@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1421375009 1386 80.91.229.3 (16 Jan 2015 02:23:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2015 02:23:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 16 03:23:27 2015 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 1YBwZL-0006RT-FA for ged-emacs-devel@m.gmane.org; Fri, 16 Jan 2015 03:23:27 +0100 Original-Received: from localhost ([::1]:53716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBwZK-0003tD-Kp for ged-emacs-devel@m.gmane.org; Thu, 15 Jan 2015 21:23:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBwZ6-0003sx-Ed for emacs-devel@gnu.org; Thu, 15 Jan 2015 21:23:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBwYz-0007y6-W0 for emacs-devel@gnu.org; Thu, 15 Jan 2015 21:23:12 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:55689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBwYz-0007xu-On for emacs-devel@gnu.org; Thu, 15 Jan 2015 21:23:05 -0500 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1YBwYg-00066U-3g; Fri, 16 Jan 2015 03:22:46 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAD1BMVEUEAgIMBggGAwQjFiCA eV13SiC2AAACQUlEQVQ4jXWUi5HcIBBEZ1ECxycAMboAFoYEOCb/mNyN5LXLVaa2tIg33wYkHjly i1oxzfdrjEVG4/+YCaDFsu717DKmtWjjR4OuXscD1pBiNtx9paCmg2DgN+BhznXzpZbNbUVvZfmS K0WbcRIV8zkMi2v5lNyzrzg1e3Pzn4qHjTaaDABHbg3D0+gwGGUivZSfCIDpGdiDavRdmbxSRe5W 65fUpDGp5qk1VQlBB0LTpmoC0zJTjVUEoKbinuC7MsHKnlXk1JIUYF6xuAFcE+VEEbHvLoU9Tvop BkACGD712s1j9AfQo0ANAN+apQqAtwZwAZTfQFkXwAR4+SpbyLGsocET6QdBuJy2vjOL1hCuWZk8 5BuMqSGcTF4WOheptzn6P8MZuO43YEWLCBKfQhUfUBFo+q09PdDFrOxDUOcXoHk/RTZYN8i2GM92 jQCtPB7yOuXwsfwG1943lguJ5Rhr2ZuhuAUbIN3xlgMaGi20PgAnsFqXw5pROKnx42E4aPDA5gZk +ANeBOfLuOsIlCLL5dxaM3vLPjKoA5JQ5YgmLDcACfGLq9xAM+TDA6EIkj4DhmYbmKVTP6NuW8m4 IK3jaIY3FqOh823KHGZ46Rc6wQOn0XaOxnc9vA3j5SLIOxTxKa+23BBjWUQjNBa7MqQ4rJeOI5Uu Nrq12JEURX13Hindl/kpt52WQrZqXNpfAwqacQl7bkoBaMlImOC2sDv7ezQmiRJxKqlgsx0dwfY3 JMpHib7zVrB/wF3QZ/wX/AIvZqUPxgDrMwAAAABJRU5ErkJggg== X-Now-Playing: Soft Cell's _Non Stop Ecstatic Dancing_: "Memorabilia (Extended)" X-Hashcash: 1:23:150116:emacs-devel@gnu.org::elCXmRsCTjp5B/f5:000000000000000000000000000000000000000000EyI0 X-Hashcash: 1:23:150116:monnier@iro.umontreal.ca::tY0h6uZy4ZIxg3Xv:0000000000000000000000000000000000001P3JY In-Reply-To: (Stefan Monnier's message of "Thu, 15 Jan 2015 21:07:13 -0500") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-MailScanner-ID: 1YBwYg-00066U-3g MailScanner-NULL-Check: 1421979766.90191@xOGd4Zb0xW06jGCB7HfsjA X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181315 Archived-At: Stefan Monnier writes: > The keyword here is "sort of". And of course, the behavior was > different in Emacs-22, yet most/all of this code dates back to before > Emacs-23, so that makes it even more murky. Indeed. > Conversions between bytes ("unibyte") and characters ("multibyte") > should be done by encoding/decoding. Using terms like "converting from > unibyte to multibyte" just messes up with your head to make sure you > can't think straight. Yes. Here's the first usage grep shows: (defun utf7-fragment-encode (start end &optional for-imap) "Encode text from START to END in buffer as UTF-7 escape fragment. Use IMAP modification if FOR-IMAP is non-nil." (save-restriction (narrow-to-region start end) (funcall (utf7-get-u16char-converter 'to-utf-16)) (mm-with-unibyte-current-buffer (base64-encode-region start (point-max))) (goto-char start) (let ((pm (point-max))) (when for-imap (while (search-forward "/" nil t) (replace-match ","))) (skip-chars-forward "^= \t\n" pm) (delete-region (point) pm)))) So we have some non-ASCII text in the buffer, and er, we convert that to utf-16? And then we convert the utf-16 represented as utf-8 byte sequences to base64? Uhm. Yeah, OK, `mm-with-unibyte-current-buffer' is probably not helping with understanding that function any. :-) So if somebody would be so kind to rewrite these functions, that would be nice. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no