<< | < | 2004-05 | > | >> | ||
---|---|---|---|---|---|---|
Su | Mo | Tu | We | Th | Fr | Sa |
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
((= i arg)) (goto–bol) (when (looking–at (format nil "^~A" (nth (1– type) ∗quote–string–list∗))) – (delete–char 1)) + (delete–char (length (nth (1– type) ∗quote–string–list∗)))) ) (when (eql (point–max) (progn (goto–eol) (point))) (return))
ほげほげ
<fieldset><legend>hoge</legend>hogehoge</fieldset>
全角スペースで始まって、直後のカッコ内に diary: 記入されていて、その後に
日付、トピック番号、段落の番号が続いているもの。
過去日記(diary:2001/01/01,t1,2) -> <a href="200101.html#01_t1_2">過去日記</a>
;;; -*- MODE: Lisp; -*-
;;;
;;; ndiary-insert-pastdays-link.l
;;;
;;;
;;; nDiaryの過去日記へのリンクの作成
;;; EX.
;;; (diary:2004/01/01,t1,1)
;;; を挿入する
;;;
;;;
;;; code
;;;
(provide "ndiary-insert-pastdays-link")
;; ndiary.conf の場所
(defvar *pd-ndiary-conf-file* nil)
;; アンカーをリストアップする際のスタイル
;; :never バッファで表示
;; :always ポップアップで表示
(defvar *pd-anchor-list-style* :never)
;; アンカーをリスト表示するときの文字列の長さ
(defvar *pd-display-length* 35)
(defvar *pd-ndiary-log-directory* nil)
(defvar *pd-ndiary-topic-char* nil)
(defvar *pd-ndiary-paragraph-anchor* nil)
(defvar *pd-ndiary-anchor-each-topic* nil)
(defun pd-parse-ndiary-conf (&optional conf)
(interactive)
(let ((config (or conf *pd-ndiary-conf-file*))
(buf nil))
(save-excursion
(setq buf (ed::find-file-internal config))
(set-buffer buf)
(goto-char (point-min))
(scan-buffer "^LOG_DIRECTORY[ \t]*=[ \t]*'\\([^']+\\)'$"
:no-dup t :case-fold nil :regexp t)
(setq *pd-ndiary-log-directory* (match-string 1))
(goto-char (point-min))
(scan-buffer "^TOPIC_CHAR[ \t]*=[ \t]*'\\([^']+\\)'$"
:no-dup t :case-fold nil :regexp t)
(setq *pd-ndiary-topic-char*
(compile-regexp (format nil "^\\([~A].+\\)$" (match-string 1))))
(goto-char (point-min))
(scan-buffer "^PARAGRAPH_ANCHOR[ \t]*=[ \t]*\\(.+\\)$"
:no-dup t :case-fold nil :regexp t)
(if (string= "true" (match-string 1))
(setq *pd-ndiary-paragraph-anchor* t)
(setq *pd-ndiary-paragraph-anchor* nil))
(goto-char (point-min))
(scan-buffer "^ANCHOR_EACH_TOPIC[ \t]*=[ \t]*\\(.+\\)$"
:no-dup t :case-fold nil :regexp t)
(if (string= "true" (match-string 1))
(setq *pd-ndiary-anchor-each-topic* t)
(setq *pd-ndiary-anchor-each-topic* nil)))
(delete-buffer buf)))
(defun pd-ndiary-insert-pastdays-link (f)
(interactive "fFile: "
:default0 (or *pd-ndiary-log-directory* (default-directory)))
(let ((tlist (pd-parse-diary-log-file f))
(curp (point))
topic-list anchor popup-style)
(save-excursion
(setq popup-style *popup-completion-list-default*)
(setq *popup-completion-list-default* *pd-anchor-list-style*)
(let ((c 1))
(dolist (i tlist)
(push (format nil "~A" (car i)) topic-list)
(when *pd-ndiary-anchor-each-topic*
(setq c 1))
(dolist (n (cdr i))
(push (format nil "~A-~2,'0D \t~A ~A,~D"
(nth 0 (split-string (car i) #\ nil)) c n
(if *pd-ndiary-anchor-each-topic*
(nth 2 (split-string (car i) #\ nil " \t"))
(progn
(let ((str (nth 2 (split-string
(car i) #\ nil " \t"))))
(setq str (car (split-string str #\, nil)))
str))) c)
topic-list)
(incf c))))
(setq anchor (completing-read "Anchor-list: " topic-list :must-match t))
(insert (format nil "(diary:~A)" (nth 2 (split-string anchor #\ nil " \t"))))
(goto-char curp))
(insert (concatenate 'string " " (read-string "アンカー文字列: ")))
(setq *popup-completion-list-default* popup-style)))
(defun pd-parse-diary-log-file (f)
(let ((buf (ed::find-file-internal f))
topic-list p-list curp topic)
(set-buffer buf)
(goto-char (point-min))
(do ((i 1 (1+ i)))
((not (scan-buffer *pd-ndiary-topic-char* :no-dup nil :case-fold t
:regexp t :tail t :limit (point-max))))
(setq curp (match-end 0))
(setq topic
(format nil "~A \t~A ~A" i (match-string 1)
(format nil "~A,t~D"
(progn
(string-match
"\\([0-9]\\{4\\}\\)\\([0-9]\\{2\\}\\)\\([0-9]\\{2\\}\\)$"
(pathname-name f))
(concatenate 'string
(match-string 1) "/"
(match-string 2) "/"
(match-string 3))) i)))
(when *pd-ndiary-paragraph-anchor*
(setq p-list (pd-parse-paragraph curp)))
(push (cons topic p-list) topic-list))
(delete-buffer buf)
(reverse topic-list)))
(defun pd-parse-paragraph (from)
(let ((start (1+ from))
end p-list p-start)
(save-excursion
(if (scan-buffer *pd-ndiary-topic-char* :no-dup t :case-fold t
:regexp t :limit (point-max))
(setq end (1- (match-beginning 0)))
(setq end (point-max)))
(when end
(narrow-to-region start end)
(goto-char (point-min))
(while (prog2
(setq p-start (point))
(scan-buffer "^$" :no-dup t :tail t
:regexp t :limit (point-max)))
(let ((str (substitute-string
(buffer-substring p-start (match-end 0)) "\n" "")))
(setq str (substitute-string str " " ""))
(unless (eql 0 (length str))
(push
(abbreviate-display-string str *pd-display-length*)
p-list))))
(widen)))
(reverse p-list)))
;;; end
(require "ndiary-insert-pastdays-link")
(add-hook 'ed::*ndiary-mode-hook*
#'(lambda () (pd-parse-ndiary-conf "/path/to/ndiary/script/ndiary.conf")))
(define-key *ndiary-mode-map* '(#\C-c #\i #\p) 'pd-ndiary-insert-pastdays-link)
(unwind-protect
(progn
(set-buffer (ed::find-file-internal *reference-xml-file*))
+ (goto-char (point-max))
+ (while (scan-buffer "^</book>$" :reverse t :tail nil :regexp t)
+ (forward-char -1)
+ (insert #\LFD)
+ (insert-file-contents (merge-pathnames "addref.xml" (etc-path))))
(goto-char (point-min))
(let (title desc sym pkg)
(while (and (scan-buffer "<title>\\([^\n<]*\\)" :regexp t :tail t)
(defun diary-mode-menu ()
(when (not (get-menu (current-menu) 'diary-default nil))
(let ((lmenu (copy-menu-items *app-menu* (create-menu)))
(menu nil))
(setq menu
(define-menu
(:item nil "Create diary" 'create-diary)
:sep
(:item nil "Create diary and upload diary file." 'create-diary-and-upload-file)
(:sep 'diary-default)
(:item nil "Insert SVN Keyword" 'insert-svn-keywords)
(:item nil "Commit diary" 'commit-diary)
))
(add-popup-menu *app-menu* menu "Diary"))
))
(add-hook 'ed::*diary-mode-hook* 'diary-mode-menu)
Gtk-Font-Name = "MS PGothic 10"
style "user-font"
{
font_name = "MS UI GOTHIC 10"
}
class "*" style "user-font"
font_name = "MS UI GOTHIC 10"
font-name = "MS UI GOTHIC 10"
(defun std-tool-bar ()
(create-tool-bar
'std-tool-bar
(merge-pathnames "toolbar_test.bmp" (etc-path))
'(("新規作成" 24 new-file)
("開く" 22 open-file-dialog)
("上書き保存" 20 save-buffer-dialog :modified)
("全て保存" 75 save-all-buffers)
:sep
("印刷" 29 print-selected-buffer-dialog)
:sep
("切り取り" 7 kill-selection-to-clipboard :modify-any-selection)
("コピー" 9 copy-selection-to-clipboard :any-selection)
("引用つきコピー" 79 copy-to-clipboard-with-quote-string :any-selection)
("貼り付け" 2 paste-from-clipboard :clipboard)
("引用つき貼付" 80 add-quote-string-to-clipboard-data :clipboard)
:sep
("元に戻す" 0 undo :undo)
("やっぱり元に戻さない" 1 redo :redo)
:sep
("検索" 5 search-dialog)
("前を検索" 3 repeat-backward-search tool-bar-update-search)
("次を検索" 4 repeat-forward-search tool-bar-update-search)
:sep
("grep" 74 grep-dialog)
:sep
("折り返さない" 76
set-buffer-fold-type-none set-buffer-fold-type-none-update)
("指定位置で折り返す" 77
set-buffer-fold-type-column set-buffer-fold-type-column-update)
("ウィンドウ幅で折り返す" 78
set-buffer-fold-type-window set-buffer-fold-type-window-update)
)))
(require "quote-menu.l")
;;; *quote-use-customize-menu*
;;; メニューの「編集(E)」を拡張して、項目を追加するかどうか。
;;; デフォルトだと使いません。
r122 | lkpteam | 2004-05-26 21:45:46 +0900 (Wed, 26 May 2004) | 2 lines
Changed paths:
A \xyzzy\site-lisp\svn\trunk\svn-toolbar.bmp
M \xyzzy\site-lisp\svn\trunk\svn.l
ツールバー用のアイコンファイルの追加と、
1行の文字数が多い行を適度な桁数で改行したりとか
------------------------------------------------------------------------
r121 | lkpteam | 2004-05-26 21:39:00 +0900 (Wed, 26 May 2004) | 14 lines
Changed paths:
M \xyzzy\site-lisp\svn\trunk\svn.l
01)オプションの指定の仕方を変更
svnサブコマンド毎に有効なオプションのリストを定義。サブコマンドの
実行時に現在設定されているオプションとサブコマンド毎に有効なオプ
ションのリストを照らし合わせて、有効なオプションだけをサブコマンド
に渡すように変更。
02)*svn-use-completion*変数の追加
subversionリポジトリのリストを補完するかどうかの設定。今のところ
svn exportコマンドくらいにしか実装していない
03)ツールバーの追加
……まぁ、適当に(笑)。ツールバー用のアイコンファイル、途中で作るの
面倒になったので、全部は作らないことにした(笑)。今ある分で全部です。
表示して内分もあるので、全部表示させる場合はsvn.lの中をいじって保存
後、バイトコンパイルなりしてください
(svn-set-option OPTION-NAME [OPTION-VALUE])
(svn-unset-option OPTION-NAME)
(svn-set-option "--username" "LKPTeam")
(svn-set-option "--verbose")
(svn-set-option "-r")
(svn-unset-option "--verbose")
(svn-unset-option "--password")
(require "svn/svn")
(svn-set-option "--verbose")
(svn-set-option "--username" "LKPTeam")
(svn-set-option "--password" "hogehoge")
I have switched to Linux (Gentoo 1.4) as my primary OS, so I will no longer be providing unofficial builds of K-Meleon. K-Meleon is a great browser, and I've enjoyed us it! Thanks to all of you on the forums who have helped me out, keep up the good work! I'll leave the last builds of the plugins up for those who want them, but the last builds are taken down due to limited space on my web host account.
svn-misc.l、svn-parse.lファイルの追加。
svn.lからメニュー、ツールバー関連のコードをsvn-misc.lに移動。
svn status サブコマンドの出力結果を解析する関数群の追加。
これらはsvn-parse.lに含まれている。
svn-revert-directory関数がうまく動いていなかったのを修正
メニューにSTRICT、XML、NO-IGNORE項目を追加。これらをチェック
することでそれぞれ、"--strict"、"--xml"、"--no-ignore"
の各オプションを指定できるようにした。
readme.txtに設定できるオプションの一覧を記載。
漏れもあるかもしれないけど。
(setq *svn-use-parse-status* t)
(defun my-describe-function (&optional word)
(interactive)
(if (interactive-p)
(progn
(let ((buf (selected-buffer))
(word (ed::get-winhelp-topic))
out)
(when word
(handler-case
(describe-function (find-symbol word))
(error (c)
(setq out (format nil "Error:\t~A~%" (si:*condition-string c))))
)
(unless out (switch-to-buffer-other-window buf))
(when out
(message out))
)))
(progn
(describe-function (find-symbol word)))
))
(global-set-key #\F2 'my-describe-function)