Changeset 1670

Show
Ignore:
Timestamp:
11/16/07 21:44:49 (6 years ago)
Author:
kentaro
Message:

lang/elisp/simple-hatena-mode: fixed simple-hatena-setup in case that hw.pl not exists. Anyway, elim++

Files:
1 modified

Legend:

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

    r1542 r1670  
    3838;;;; * ヴァージョン 
    3939 
    40 (defconst simple-hatena-version "0.13" 
     40(defconst simple-hatena-version "0.14" 
    4141  "simple-hatena-mode.elのヴァージョン。") 
    4242 
     
    269269  (interactive) 
    270270  "ディレクトリ配置をセットアップする。" 
    271  
    272271  (and 
    273272   ;; simple-hatena-bin 
    274    (simple-hatena-setup-hatena-bin-executable-p) 
     273   (simple-hatena-setup-check-hatena-bin-exists-p) 
    275274 
    276275   ;; hatena id(s) 
    277276   (simple-hatena-setup-id))) 
    278277 
    279 (defun simple-hatena-setup-hatena-bin-executable-p () 
     278(defun simple-hatena-setup-check-hatena-bin-exists-p () 
    280279  (if (file-executable-p simple-hatena-bin) 
    281280      t 
    282281    (progn 
    283       (when (y-or-n-p 
    284              (format 
    285               (concat 
    286                "Please download and/or setup `はてなダイアリーライター'.\n" 
    287                "  open a webpage? ") 
    288               simple-hatena-bin)) 
    289         (browse-url "http://coderepos.org/share/wiki/SimpleHatenaMode")) 
    290       (message "Without forgetting the rerun of the simple-hatena-setup.") 
    291       (read-char) ;; wait user input. 
    292       nil))) 
     282      (if (y-or-n-p 
     283           (format 
     284            "`Hatena Diary Writer' not found in %s. Are you sure to continue setup?" 
     285            simple-hatena-bin)) 
     286          t 
     287        (progn 
     288          (when (y-or-n-p 
     289                 "Open the documentation of simple-hatnea-mode in your browser?") 
     290            (browse-url "http://coderepos.org/share/wiki/SimpleHatenaMode")) 
     291          (message "You must download and install `Hatena Diary Writer' first") 
     292          nil))))) 
    293293 
    294294(defun simple-hatena-setup-id () 
     
    323323 
    324324(defun simple-hatena-setup-create-directory-and-file (filename) 
    325   "setup adirectory and a file. 
     325  "setup a directory and a file. 
    326326NOTE: Create intermediate directories as required." 
    327327  (let