Changeset 1813

Show
Ignore:
Timestamp:
11/19/07 22:37:02 (14 months ago)
Author:
iwaim
Message:

lang/elisp/simple-hatena-mode: implemented simple-hatena-group-setup

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/elisp/simple-hatena-mode/simple-hatena-mode.el

    r1670 r1813  
    321321    (format "%s/%s/diary/config.txt" 
    322322            simple-hatena-root id)))) 
     323 
     324(defun simple-hatena-group-setup () 
     325  (interactive) 
     326  "ディレクトリにはてなグループを追加する。" 
     327  ;; hatena group(s) 
     328  (simple-hatena-setup-group)) 
     329 
     330(defun simple-hatena-setup-group () 
     331  (let 
     332      ((groups (list)) 
     333       (id simple-hatena-local-current-buffer-id)) 
     334    (add-to-list 
     335     'groups (read-string 
     336              (format "Pleas input create Hatena group for id:%s :" id))) 
     337 
     338    (while (y-or-n-p 
     339            (format 
     340             "group '%s' found.\nsetup other group(s)? " 
     341             (mapconcat 'identity 
     342                        groups "', `"))) 
     343      (add-to-list 
     344       'groups (read-string 
     345                (format 
     346                 "Pleas input create Hatena group for id:%s :" id)))) 
     347 
     348    (dolist (group groups) 
     349      (simple-hatena-setup-group-create-directory-and-file id group)))) 
     350 
     351(defun simple-hatena-setup-group-create-directory-and-file (id group) 
     352  (simple-hatena-setup-create-directory-and-file 
     353   (expand-file-name 
     354    (format "%s/%s/group/%s/config.txt" 
     355            simple-hatena-root id group)))) 
    323356 
    324357(defun simple-hatena-setup-create-directory-and-file (filename)