From 2267fd02e16de648aae9151ed38bfbc5d6a22ca7 Mon Sep 17 00:00:00 2001 From: "Tom Breton (Tehom)" Date: Tue, 1 Feb 2011 17:51:17 -0500 Subject: [PATCH] New function fileset-whole-init. Moved fileset-whole-edit. --- fileset-whole.el | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/fileset-whole.el b/fileset-whole.el index 625bde7..75ab12b 100644 --- a/fileset-whole.el +++ b/fileset-whole.el @@ -95,9 +95,8 @@ Then the command is applied to the list of args." (defvar fileset-whole-name-here nil "The fileset that contains this buffer, if any." ) (make-variable-buffer-local 'fileset-whole-name-here) -;;;_ , Setting up fileset stuff +;;;_ , Setting up menus ;;;_ . fileset-whole-setup-menu -;;;###autoload (defun fileset-whole-setup-menu () "Add the commands in fileset-whole-commands to fileset menu." ;;When is this triggered? @@ -123,15 +122,8 @@ Then the command is applied to the list of args." `[,name (fileset-whole-run-cmd ,name (fileset-whole-read-fileset))]))) - fileset-whole-commands)) - -;;;_ . fileset-whole-edit -;;$$MOVE ME -(defun fileset-whole-edit () - "Customize `fileset-whole-alist'." - (interactive) - ;;$$IMPROVE ME Populate it first from fileset-data - (customize-variable 'fileset-whole-alist)) + fileset-whole-commands) + t) ;;;_ . fileset-whole-add-buffer @@ -156,7 +148,13 @@ Then the command is applied to the list of args." ;;For each one that's already open, with that buffer current, ;;run hooks. Default hook will just set `fileset-whole-name-here'. )) - +;;;_ . fileset-whole-init +;;;###autoload +(defun fileset-whole-init () + "Set up fileset-whole on top of filesets" + (filesets-init) + (fileset-whole-setup-menu) + (fileset-whole-cmds-to-menu)) ;;;_ , Structuring ;;;_ . fileset-whole-cmd->fn (defun fileset-whole-cmd->fn (cmd) @@ -312,7 +310,14 @@ files that satisfy it." #'fill-common-string-prefix files))) -;;;_ , Populating the alist + +;;;_ , Maintaining fileset-whole data +;;;_ . fileset-whole-edit +(defun fileset-whole-edit () + "Customize `fileset-whole-alist'." + (interactive) + ;;$$IMPROVE ME Populate it first from fileset-data + (customize-variable 'fileset-whole-alist)) ;;;_ . fileset-whole-populate-alist ;;YAGNI @@ -326,7 +331,7 @@ files that satisfy it." (mapconcat #'identity args " "))) ;;;_ , To set up bindings ;;;###autoload (global-set-key "\C-cp" #'fileset-whole-run-cmd) - +;;;###autoload (fileset-whole-init) ;;;_. Footers ;;;_ , Provides -- 2.11.4.GIT