[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.


(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)

(defun insert-cl-entry (text)
    (find-file "ChangeLog")
    (insert text)

(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)
    (if (buffer-modified-p)
        (insert-cl-entry "Replace B_ with BVAR."))


(find-file "ChangeLog")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]