[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
When I do a tags search on a large system, all the files are open in the
editor. Is there a way to close them all, or close all files in a tag
table, or close the files where the tags search didn't find anything?
If by "close" you mean to kill the buffers associated with the files, the
following will do the trick:
;;; -*- Mode: LISP; Syntax: Common-lisp; Package: ZWEI; Base: 10 -*-
(defcom com-tags-kill "Kills buffers in current tag table"
(let ((tags (select-tag-table nil))) ;get current tag table
(send tags :restart)
(loop for buffer = (send tags :next-file nil nil t) ;don't select or read in
do (send buffer :kill))) ;optional arg is NO-SAVE-P
To install this command, you can include something like the following:
(command-store 'com-tags-kill #\h-k *zmacs-comtab*)
John Krieger (email@example.com)
Westinghouse Savannah River Company