From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Installing `struct buffer' patch Date: Wed, 16 Feb 2011 07:55:56 -0700 Message-ID: References: <4D47DFD4.1040108@gmail.com> <87r5ba7ejz.fsf@stupidchicken.com> <87mxly7e4f.fsf@stupidchicken.com> <87hbc5s3eb.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1297868843 27396 80.91.229.12 (16 Feb 2011 15:07:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 16 Feb 2011 15:07:23 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 16 16:07:19 2011 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.69) (envelope-from ) id 1PpiyK-0000XJ-Um for ged-emacs-devel@m.gmane.org; Wed, 16 Feb 2011 16:07:17 +0100 Original-Received: from localhost ([127.0.0.1]:46852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ppis2-0007TJ-8D for ged-emacs-devel@m.gmane.org; Wed, 16 Feb 2011 10:00:46 -0500 Original-Received: from [140.186.70.92] (port=49723 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpinV-0005O7-89 for emacs-devel@gnu.org; Wed, 16 Feb 2011 09:56:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpinT-0003Ow-V7 for emacs-devel@gnu.org; Wed, 16 Feb 2011 09:56:05 -0500 Original-Received: from mx1.redhat.com ([209.132.183.28]:46546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpinT-0003OS-OK for emacs-devel@gnu.org; Wed, 16 Feb 2011 09:56:03 -0500 Original-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1GEu1FO028302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 16 Feb 2011 09:56:02 -0500 Original-Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p1GEtwFW003810; Wed, 16 Feb 2011 09:55:58 -0500 Original-Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p1GEtvFK023954; Wed, 16 Feb 2011 09:55:58 -0500 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 26B67378C85; Wed, 16 Feb 2011 07:55:56 -0700 (MST) X-Attribution: Tom In-Reply-To: <87hbc5s3eb.fsf@stupidchicken.com> (Chong Yidong's message of "Tue, 15 Feb 2011 10:50:36 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 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:136101 Archived-At: >> Sounds good. Or if we want something shorted, we can shorten >> BUFFER_VAR to just BVAR (like we do for SDATA, ASIZE, ...). Chong> I am fine with BVAR. I am going to check in a patch to implement this. Richard wanted the other form, but I will let the three of you work that out. It is easy to change again at any time. I wrote the patch using the appended script. Tom (setq add-log-keep-changes-together t) (defvar last-file-name nil) (defvar last-function-name nil) (defun edit-add-cl-entry () (unless (equal buffer-file-name last-file-name) (setq last-file-name buffer-file-name) (setq last-function-name nil)) (let ((function (add-log-current-defun))) (unless (equal function last-function-name) (setq last-function-name function) (save-current-buffer (add-change-log-entry)) t))) (defun insert-cl-entry (text) (save-current-buffer (find-file "ChangeLog") (insert text) (fill-paragraph))) (defun update-files () (dolist (file (directory-files "." t "[ch]$")) (find-file file) (goto-char (point-min)) (while (re-search-forward "\\_" nil t) (replace-match "BVAR" t t) (edit-add-cl-entry)) (if (buffer-modified-p) (insert-cl-entry "Replace B_ with BVAR.")) (save-buffer))) (update-files) (find-file "ChangeLog") (save-buffer)