[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Chong Yidong
Subject: filesets-add-buffer
Date: Fri, 1 Apr 2005 09:47:46 -0500 (EST)
User-agent: SquirrelMail/1.4.3a

Currently, the command filesets-add-buffer forces the user to supply the
name of an existing fileset.  With this patch, if the user supplies a new
name, a new fileset is created.  I think it is good to do this, because
currently there isn't any quick and easy method to create filesets -- you
have to do M-x filesets-edit and wade through the very confusing and
difficult-to-use Customize buffer for filesets-data.

*** emacs/lisp/filesets.el~     Fri Apr  1 21:55:54 2005
--- emacs/lisp/filesets.el      Fri Apr  1 22:42:36 2005
*** 1787,1794 ****
         (name   (or name
                      (format "Add '%s' to fileset: " buffer)
!                     filesets-data nil t)))
!        (entry  (assoc name filesets-data)))
      (if entry
        (let* ((files  (filesets-entry-get-files entry))
               (this   (buffer-file-name buffer))
--- 1787,1803 ----
         (name   (or name
                      (format "Add '%s' to fileset: " buffer)
!                     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))

reply via email to

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