Changeset 1848 for lang/elisp

Show
Ignore:
Timestamp:
11/20/07 20:19:28 (6 years ago)
Author:
kentaro
Message:

lang/elisp/simple-hatena-mode:

  • Improved document strings... I think.
  • Fixed an error in simple-hatena-setup-group function. It requires let* syntax instead of let.
  • Added directories: trunk, tags
  • Moved simple-hatena-mode into trunk dir.
Location:
lang/elisp/simple-hatena-mode
Files:
2 added
1 modified
1 moved

Legend:

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

  • lang/elisp/simple-hatena-mode/trunk/simple-hatena-mode.el

    r1829 r1848  
    3838;;;; * ヴァージョン 
    3939 
    40 (defconst simple-hatena-version "0.14" 
     40(defconst simple-hatena-version "0.15" 
    4141  "simple-hatena-mode.elのヴァージョン。") 
    4242 
     
    295295 
    296296   ;; hatena group 
    297    (when (y-or-n-p 
    298           "do the setting of the 'Hatena group' successively? ") 
    299      (simple-hatena-group-setup)))) 
     297   (if (y-or-n-p 
     298        "Set up about `Hatena::Group' next? ") 
     299       (simple-hatena-group-setup) 
     300     (message "Enjoy!")))) 
    300301 
    301302(defun simple-hatena-setup-check-hatena-bin-exists-p () 
     
    305306      (if (y-or-n-p 
    306307           (format 
    307             "`Hatena Diary Writer' not found in %s. Are you sure to continue setup?" 
     308            "`Hatena Diary Writer' not found in %s. Are you sure to continue setup? " 
    308309            simple-hatena-bin)) 
    309310          t 
    310311        (progn 
    311312          (when (y-or-n-p 
    312                  "Open the documentation of simple-hatnea-mode in your browser?") 
     313                 "Open the documentation of simple-hatnea-mode in your browser? ") 
    313314            (browse-url "http://coderepos.org/share/wiki/SimpleHatenaMode")) 
    314315          (message "You must download and install `Hatena Diary Writer' first") 
     
    329330            (y-or-n-p 
    330331             (format 
    331               "existing id(s) '%s'.\nsetup other id? " 
     332              "Existing id(s): `%s'\nSet up other id? " 
    332333              (mapconcat 'identity 
    333                          ids "', '")))) 
     334                         ids "', `")))) 
    334335      (add-to-list 
    335336       'ids (simple-hatena-read-string-and-match-check 
    336337             "Please input your other Hatena id: " 
    337338             simple-hatena-id-regex 
    338              "`%s' is invalid hatena id."))) 
     339             "`%s' is invalid as a Hatena id."))) 
    339340 
    340341    (dolist (id ids) 
     
    355356 
    356357(defun simple-hatena-setup-group () 
    357   (let 
     358  (let* 
    358359      ((groups (list)) 
    359360       (id (condition-case err 
     
    374375            (y-or-n-p 
    375376             (format 
    376               "existing group(s) '%s'.\nsetup other group? " 
     377              "Existing group(s): `%s'\nSet up other group? " 
    377378              (mapconcat 'identity 
    378                          groups "', '")))) 
     379                         groups "', `")))) 
    379380      (add-to-list 
    380381       'groups (simple-hatena-read-string-and-match-check 
    381382                (format 
    382                  "Please input create Hatena group for id:%s :" id) 
     383                 "Please input a group name for id:%s: " id) 
    383384                simple-hatena-group-regex 
    384              "`%s' is invalid hatena group."))) 
     385             "`%s' is invalid as a group name."))) 
    385386 
    386387    (dolist (group groups) 
    387388      (if (string-match simple-hatena-group-regex group) 
    388389          (simple-hatena-setup-group-create-directory-and-file id group) 
    389         (message (format "`%s' is invalid hatena group." group)))))) 
     390        (message (format "`%s' is invalid as a group name." group)))))) 
    390391 
    391392(defun simple-hatena-setup-group-create-directory-and-file (id group) 
     
    396397 
    397398(defun simple-hatena-setup-create-directory-and-file (filename) 
    398   "setup a directory and a file. 
     399  "Set up a directory and file. 
     400 
    399401NOTE: Create intermediate directories as required." 
    400402  (let 
     
    408410                                                         &optional errmsg) 
    409411  "Read a string from the minibuffer, prompting with string prompt, 
    410 and Cheking input value. If non-nil, third args, you can set error message. 
    411 NOTE: Please refer to `format' for the format of the error message." 
     412and Cheking input value. 
     413 
     414If non-nil, third args, you can set error message. 
     415 
     416NOTE: Please refer to `format' for the format of the error 
     417message." 
    412418  (let 
    413419      ((input nil) 
    414420       (errmsg (or errmsg 
    415                    "your input is invalid..."))) 
     421                   "Your input is invalid..."))) 
    416422    (while 
    417423        (and