From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: suggestion: function: buffer-bytes Date: Sun, 01 Jul 2007 22:34:55 +0300 Message-ID: References: <18054.62174.507770.924924@gargle.gargle.HOWL> <18055.5127.154758.705881@gargle.gargle.HOWL> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1183318509 28131 80.91.229.12 (1 Jul 2007 19:35:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 Jul 2007 19:35:09 +0000 (UTC) Cc: emacs-devel@gnu.org, raman@users.sourceforge.net To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 01 21:35:08 2007 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I55CL-0000Cz-Hs for ged-emacs-devel@m.gmane.org; Sun, 01 Jul 2007 21:35:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I55CK-00043W-TS for ged-emacs-devel@m.gmane.org; Sun, 01 Jul 2007 15:35:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I55CG-00042K-WD for emacs-devel@gnu.org; Sun, 01 Jul 2007 15:35:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I55CG-00041Q-E1 for emacs-devel@gnu.org; Sun, 01 Jul 2007 15:35:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I55CG-000415-7g for emacs-devel@gnu.org; Sun, 01 Jul 2007 15:35:00 -0400 Original-Received: from romy.inter.net.il ([213.8.233.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I55CF-0004lM-Rw for emacs-devel@gnu.org; Sun, 01 Jul 2007 15:35:00 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-17-149.inter.net.il [80.230.17.149]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id IFM28762 (AUTH halo1); Sun, 1 Jul 2007 22:34:54 +0300 (IDT) In-reply-to: (message from Kenichi Handa on Sun, 01 Jul 2007 17:22:29 +0900) X-detected-kernel: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:74138 Archived-At: > From: Kenichi Handa > Date: Sun, 01 Jul 2007 17:22:29 +0900 > Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, raman@users.sourceforge.net > > In emacs-unicode-2, you can use a little bit faster version. > > (defun buffer-encoded-size (&optional buffer coding) > "Return the encoded size of the current byffer in bytes. > ..." > (save-excursion > (and buffer (set-buffer buffer)) > (or coding > (setq coding buffer-file-coding-system)) > (length (encode-coding-region (point-min) (point-max) coding t)))) Why can't he use this version in Emacs 22?