summaryrefslogtreecommitdiffstats
path: root/perl-install/unused/migrate-ugtk2-to-mygtk2.el
blob: 71137d13ca653a3ce6e7985c5ea9f8d4cad8da01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
(defun my-close-children ()
  (interactive)
  (end-of-buffer) 
  (let ((p t))
    (while (setq p (search-backward-regexp "\\<children\\(\\|_tight\\|_loose\\) => \\[" nil t))
      (progn
	(search-forward "[")
	(backward-char)
	(forward-sexp)
	(backward-char)
	(if (not (string-equal (buffer-substring (point) (1+ (point))) "]"))
	    (insert "]"))
	(goto-char p)))))