X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/ed8c6a24c2042ad5879f19945d142e7b459ddb04..713fbb79dbd0e3e7e6933f95624f4b98df43eff5:/lisp/filesets.el diff --git a/lisp/filesets.el b/lisp/filesets.el index 5a4dd7bda9..1ee126465a 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -1,6 +1,6 @@ ;;; 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 ;; Maintainer: FSF @@ -19,8 +19,8 @@ ;; 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 @@ -132,7 +132,8 @@ Is buffer local variable.") (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 @@ -649,8 +650,8 @@ the filename." 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 @@ -1794,8 +1795,17 @@ User will be queried, if no fileset name is provided." (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))