;;; filesets.el --- handle group of files
-;; Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Thomas Link <t.link@gmx.at>
;; Maintainer: FSF
;; GNU General Public License for more details.
;; A copy of the GNU General Public License can be obtained from this
-;; program's author or from the Free Software Foundation, Inc., 675 Mass
-;; Ave, Cambridge, MA 02139, USA.
+;; program's author or from the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
(defvar filesets-version "1.8.4")
(defvar filesets-homepage
(defvar filesets-menu-ensure-use-cached
(and filesets-running-xemacs
- (not (emacs-version>= 21 5)))
+ (if (fboundp 'emacs-version>=)
+ (not (emacs-version>= 21 5))))
"Make sure (X)Emacs uses filesets' cache.
Well, if you use XEmacs (prior to 21.5?) custom.el is loaded after
Has the form ((FILE-PATTERN VIEWER PROPERTIES) ...), VIEWER being either a
function or a command name as string.
-Properties is an association list determining filesets' behaviour in
-several conditions. Choose one from this list:
+Properties is an association list determining filesets' behavior in
+several conditions. Choose one from this list:
:ignore-on-open-all ... Don't open files of this type automatically --
i.e. on open-all-files-events or when running commands
(name (or name
(completing-read
(format "Add '%s' to fileset: " buffer)
- filesets-data nil t)))
- (entry (assoc name filesets-data)))
+ filesets-data nil)))
+ (entry (or (assoc name filesets-data)
+ (when (y-or-n-p
+ (format "Fileset %s does not exist. Create it?"
+ name))
+ (progn
+ (add-to-list 'filesets-data (list name '(:files)))
+ (message
+ "Fileset %s created. Call `M-x filesets-save-config' to save."
+ name)
+ (car filesets-data))))))
(if entry
(let* ((files (filesets-entry-get-files entry))
(this (buffer-file-name buffer))