From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Using empty_string as the only "" string Date: Tue, 24 Apr 2007 20:32:12 +0400 Message-ID: <462E310C.20400@yandex.ru> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030400020204020101020204" X-Trace: sea.gmane.org 1177432382 11450 80.91.229.12 (24 Apr 2007 16:33:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 Apr 2007 16:33:02 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 24 18:32:56 2007 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 1HgNwm-0003TY-3b for ged-emacs-devel@m.gmane.org; Tue, 24 Apr 2007 18:32:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HgO2D-00066b-My for ged-emacs-devel@m.gmane.org; Tue, 24 Apr 2007 12:38:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HgO2B-00065f-66 for emacs-devel@gnu.org; Tue, 24 Apr 2007 12:38:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HgO2A-00064s-A2 for emacs-devel@gnu.org; Tue, 24 Apr 2007 12:38:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HgO2A-00064m-3R for emacs-devel@gnu.org; Tue, 24 Apr 2007 12:38:30 -0400 Original-Received: from smtp2.yandex.ru ([213.180.200.18]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HgNwc-00015i-CB for emacs-devel@gnu.org; Tue, 24 Apr 2007 12:32:46 -0400 Original-Received: from rtsoft2.corbina.net ([85.21.88.2]:58268 "EHLO [192.168.1.162]" smtp-auth: "dmantipov" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S3375587AbXDXQci (ORCPT ); Tue, 24 Apr 2007 20:32:38 +0400 X-Comment: RFC 2476 MSA function at smtp2.yandex.ru logged sender identity as: dmantipov User-Agent: Thunderbird 1.5.0.7 (X11/20061008) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:69951 Archived-At: This is a multi-part message in MIME format. --------------030400020204020101020204 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello all, probably I've missed something, but what's the reason(s) to have a lot of "" (zero-length) strings ? Why not uniq them into the only one ? Here is a way I'm doing this... Dmitry --------------030400020204020101020204 Content-Type: text/plain; name="empty_string.patch" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="empty_string.patch" SW5kZXg6IGFsbG9jLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL3NvdXJjZXMvZW1hY3Mv ZW1hY3Mvc3JjL2FsbG9jLmMsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuNDA5CmRpZmYgLXUg LXIxLjQwOSBhbGxvYy5jCi0tLSBhbGxvYy5jCTE2IEFwciAyMDA3IDAzOjA5OjMzIC0wMDAw CTEuNDA5CisrKyBhbGxvYy5jCTI0IEFwciAyMDA3IDE1OjM4OjI5IC0wMDAwCkBAIC0xOTQ3 LDcgKzE5NDcsNy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RbmlsKTsKKyAgVmxvYWRfZmlsZV9yZXBfc3VmZml4ZXMgPSBGY29u cyAoZW1wdHlfc3RyaW5nLCBRbmlsKTsKIAogICBERUZWQVJfQk9PTCAoImxvYWQtaW4tcHJv Z3Jlc3MiLCAmbG9hZF9pbl9wcm9ncmVzcywKIAkgICAgICAgZG9jOiAvKiBOb24tbmlsIGlm ZiBpbnNpZGUgb2YgYGxvYWQnLiAgKi8pOwo= --------------030400020204020101020204 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------030400020204020101020204--