[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Installing `struct buffer' patch
From: |
Tom Tromey |
Subject: |
Re: Installing `struct buffer' patch |
Date: |
Wed, 16 Feb 2011 07:55:56 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
>> 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 "\\_<B_\\_>" 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)
- Re: Patch for fields of `struct buffer', (continued)
- Re: Patch for fields of `struct buffer', Stefan Monnier, 2011/02/02
- Re: Patch for fields of `struct buffer', Tom Tromey, 2011/02/11
- Re: Patch for fields of `struct buffer', Richard Stallman, 2011/02/12
- Installing `struct buffer' patch (Was: Patch for fields of `struct buffer'), Tom Tromey, 2011/02/13
- Re: Installing `struct buffer' patch, Chong Yidong, 2011/02/14
- Re: Installing `struct buffer' patch, Tom Tromey, 2011/02/14
- Re: Installing `struct buffer' patch, Chong Yidong, 2011/02/14
- Re: Installing `struct buffer' patch, Tom Tromey, 2011/02/14
- Re: Installing `struct buffer' patch, Stefan Monnier, 2011/02/14
- Re: Installing `struct buffer' patch, Chong Yidong, 2011/02/15
- Re: Installing `struct buffer' patch,
Tom Tromey <=
- Re: Installing `struct buffer' patch, Richard Stallman, 2011/02/15
- Re: Installing `struct buffer' patch, Glenn Morris, 2011/02/14
- Re: Installing `struct buffer' patch, Tom Tromey, 2011/02/15
Re: Patch for fields of `struct buffer', Daniel Colascione, 2011/02/01
Re: Patch for fields of `struct buffer', Daniel Colascione, 2011/02/01