Changeset 7620 for lang/elisp

Show
Ignore:
Timestamp:
03/07/08 16:15:35 (9 months ago)
Author:
xcezx
Message:
  • lang/elisp/simple-hatena-mode/trunk/simple-hatena-mode.el: #77 customze group の追加
Files:
1 modified

Legend:

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

    r2819 r7620  
    3838;;;; * ヴァージョン 
    3939 
    40 (defconst simple-hatena-version "0.15" 
     40(defconst simple-hatena-version "0.16" 
    4141  "simple-hatena-mode.elのヴァージョン。") 
    4242 
     
    5252;;;; * ユーザによるカスタマイズが可能な設定 
    5353 
     54(defgroup simple-hatena nil 
     55  "はてなダイアリーライターをEmacsから使うためのメジャーモード") 
     56 
    5457;; カスタマイズ変数 
    55 (defvar simple-hatena-bin "hw.pl" 
    56   "*はてなダイアリーライターのパスを指定する。") 
    57  
    58 (defvar simple-hatena-root "~/.hatena" 
     58(defcustom simple-hatena-bin "hw.pl" 
     59  "*はてなダイアリーライターのパスを指定する。" 
     60  :type '(file :must-match t) 
     61  :group 'simple-hatena) 
     62 
     63(defcustom simple-hatena-root "~/.hatena" 
    5964  "*はてなダイアリーライターのデータを置くディレクトリのルートを指 
    60 定する。") 
    61  
    62 (defvar simple-hatena-default-id nil 
     65定する。" 
     66  :type 'directory 
     67  :group 'simple-hatena) 
     68 
     69(defcustom simple-hatena-default-id nil 
    6370  "*はてダラで使うデフォルトのはてなidを指定する。 
    6471 
     
    6774する必要がない。 
    6875 
    69 このidを変更するには、simple-hatena-change-default-idを実行する。") 
    70  
    71 (defvar simple-hatena-default-group nil 
    72   "*デフォルトグループ名を指定する。") 
    73  
    74 (defvar simple-hatena-use-timestamp-permalink-flag t 
     76このidを変更するには、simple-hatena-change-default-idを実行する。" 
     77  :type '(restricted-sexp :match-alternatives 
     78                          (stringp 'nil)) 
     79  :group 'simple-hatena) 
     80 
     81(defcustom simple-hatena-default-group nil 
     82  "*デフォルトグループ名を指定する。" 
     83  :type '(restricted-sexp :match-alternatives 
     84                          (stringp 'nil)) 
     85  :group 'simple-hatena) 
     86 
     87(defcustom simple-hatena-use-timestamp-permalink-flag t 
    7588  "*はてなダイアリーライターのパーマリンクに、タイムスタンプを使う 
    76 かどうかを指定するフラグ。") 
    77  
    78 (defvar simple-hatena-time-offset nil 
     89かどうかを指定するフラグ。" 
     90  :type 'boolean 
     91  :group 'simple-hatena) 
     92 
     93(defcustom simple-hatena-time-offset nil 
    7994  "*日付を計算する際に用いるオフセット。 
    80 6 に設定すると午前6時まで前日の日付として扱われる") 
     956 に設定すると午前6時まで前日の日付として扱われる" 
     96  :type '(restricted-sexp :match-alternatives 
     97                          (integerp 'nil)) 
     98  :group 'simple-hatena) 
    8199 
    82100;; はてダラにわたすオプション 
    83 (defvar simple-hatena-option-useragent (simple-hatena-version) 
     101(defcustom simple-hatena-option-useragent (simple-hatena-version) 
    84102  "*はてなダイアリーライターのユーザエージェントオプションを指定す 
    85103る。 
    86104 
    87 実行時に、-aオプションとして使われる。") 
    88  
    89 (defvar simple-hatena-option-debug-flag nil 
     105実行時に、-aオプションとして使われる。" 
     106  :type 'string 
     107  :group 'simple-hatena) 
     108 
     109(defcustom simple-hatena-option-debug-flag nil 
    90110  "*はてなダイアリーライターを、デバッグモードで実行するか否かを指 
    91111定するフラグ。 
     
    95115 
    96116デバッグモードをオン/オフするには、 
    97 simple-hatena-toggle-debug-modeを実行する。") 
    98  
    99 (defvar simple-hatena-option-timeout 30 
     117simple-hatena-toggle-debug-modeを実行する。" 
     118  :type 'boolean 
     119  :group 'simple-hatena) 
     120 
     121(defcustom simple-hatena-option-timeout 30 
    100122  "*はてなダイアリーライターのタイムアウトを指定する。 
    101123 
    102 実行時に、-Tオプションとして使われる。") 
    103  
    104 (defvar simple-hatena-option-cookie-flag t 
     124実行時に、-Tオプションとして使われる。" 
     125  :type 'integer 
     126  :group 'simple-hatena) 
     127 
     128(defcustom simple-hatena-option-cookie-flag t 
    105129  "*はてなダイアリーライターのログインに、cookieを利用するかどうか 
    106130を指定するフラグ。 
    107131 
    108 実行時に、-cオプションとして使われる。") 
    109  
    110 (defvar simple-hatena-process-buffer-name "*SimpleHatena*" 
    111   "*はてダラを実行するプロセスのバッファ名。") 
     132実行時に、-cオプションとして使われる。" 
     133  :type 'boolean 
     134  :group 'simple-hatena) 
     135 
     136(defcustom simple-hatena-process-buffer-name "*SimpleHatena*" 
     137  "*はてダラを実行するプロセスのバッファ名。" 
     138  :type 'string 
     139  :group 'simple-hatena) 
    112140 
    113141;; キーバインド 
     
    128156 
    129157;; フック 
    130 (defvar simple-hatena-mode-hook nil 
    131   "simple-hatena-mode開始時のフック。") 
    132 (defvar simple-hatena-before-submit-hook nil 
    133   "日記を投稿する直前のフック") 
    134 (defvar simple-hatena-after-submit-hook nil 
    135   "日記を投稿した直後のフック") 
     158(defcustom simple-hatena-mode-hook nil 
     159  "simple-hatena-mode開始時のフック。" 
     160  :type 'hook 
     161  :group 'simple-hatena) 
     162(defcustom simple-hatena-before-submit-hook nil 
     163  "日記を投稿する直前のフック" 
     164  :type 'hook 
     165  :group 'simple-hatena) 
     166(defcustom simple-hatena-after-submit-hook nil 
     167  "日記を投稿した直後のフック" 
     168  :type 'hook 
     169  :group 'simple-hatena) 
    136170 
    137171;; フォントロック