--- xcal-201a.el Sun Jan 13 17:55:54 2002 +++ xcal.el Tue Jul 17 12:32:04 2012 @@ -1,16 +1,19 @@ ;;; -*- Mode: Emacs-Lisp -*- ;;; -;;; xcal.el Ver 2.01a +;;; xcal.el Ver 2.01b ;;; ;;; Copyleft (C) Shigeki Morimoto 1994-2000 ;;; ;;; もりもと しげき ( 森本 茂樹 ) ;;; e-mail: Shigeki@Morimo.to ;;; +;;(2012/07/17:oshiro) 「海の日」と「敬老の日」でハッピーマンデー対応 +;;(2011/02/28:oshiro) xcal-next-day で呼ばれるxcal-1内での next-line を forward-line へ変更(行が画面を超える場合の停止を回避) ;;(2001/01/12:oshiro) 週予定の一覧を追加 ;;(2001/01/12:oshiro) 予定のコピー時に日付でなく実体を変数に保存 ;;(2001/01/12:oshiro) underline 時の xcal-lookup-face-create を外した ;;(2000/11/30:jun) ハッピーマンデーに対応。xcal-alarm-filterを修正。 +;; ↑この対応は「成人の日」と「体育の日」のみ? oshiro 2012/7/17 ;;(2000/11/30:isoyama) xcal-lookup-face-create のバグ修正(_ _) ;;(2000/11/28:mori) xcal.el Ver 2.0 ;;(2000/11/27:isoyama) xcal-lookup-face-create のバグ修正 @@ -122,8 +125,7 @@ ;; ;; .emacs に以下の行を追加して下さい。 ;; -;; (autoload 'xcal "xcal" -;; "xcal for emacs." t) +;; (autoload 'xcal "xcal" "xcal for emacs." t) ;; (autoload 'calendar-day-of-week "calendar") ;; (autoload 'gnus-to-xcal-file "xcal") ;; (autoload 'mew-to-xcal-file "xcal") @@ -228,8 +230,8 @@ ; ; うぉぉー 6,7,8 にも休みが欲しいぜぇ ; - ( 7 (20 . "海の日")) ; できました ^_^ - ( 9 (15 . "敬老の日")) + ;( 7 (20 . "海の日")) ; できました ^_^ + ;( 9 (15 . "敬老の日")) (11 ( 3 . "文化の日") (23 . "勤労感謝の日")) (12 (23 . "天皇誕生日"))) @@ -872,7 +874,7 @@ (insert prefix) (setq col (current-column)) (setq prefix x-prefix) - (next-line 1)) + (forward-line 1)) ; 予定文字列が画面幅を超えるとここが無限ループになっていたので,next-line を forward-line へ変更 oshiro 2011/2/28 (setq msg (buffer-string)) (switch-to-buffer xcal-buffer) @@ -947,7 +949,7 @@ prefix)) (setq col (current-column)) (setq prefix x-prefix) - (next-line 1)) + (forward-line 1)) (setq msg (buffer-string)) (switch-to-buffer xcal-buffer) @@ -983,7 +985,7 @@ (setq x (or (next-single-property-change s 'face) e)) (put-text-property s x 'face face) ;; xcal-lookup-face-create err? (setq s x))) - (next-line 1))) + (forward-line 1))) (defun xcal-file-name (year month day) "年月日からファイル名を作成する。 @@ -1346,7 +1348,8 @@ (list year (list 1 (xcal-day-of-seijin year)) (list 3 (xcal-day-of-syunbun year)) - (list 9 (xcal-day-of-syuubun year)) + (list 7 (xcal-day-of-umi year)) + (list 9 (xcal-day-of-syuubun year) (xcal-day-of-keirou year)) (list 10 (xcal-day-of-taiiku year)))) (defun xcal-nth-wday-day (year month wday nth) @@ -1357,13 +1360,25 @@ (defun xcal-day-of-seijin (year) (cons (if (< year 2000) 15 - (xcal-nth-wday-day year 1 1 2)) + (xcal-nth-wday-day year 1 1 2)) ; 1月の第2月曜 "成人の日")) +(defun xcal-day-of-umi (year) + (cons (if (< year 2003) + 20 + (xcal-nth-wday-day year 7 1 3)) ; 7月の第3月曜 + "海の日")) + +(defun xcal-day-of-keirou (year) + (cons (if (< year 2003) + 15 + (xcal-nth-wday-day year 9 1 3)) ; 9月の第3月曜 + "敬老の日")) + (defun xcal-day-of-taiiku (year) (cons (if (< year 2000) 10 - (xcal-nth-wday-day year 10 1 2)) + (xcal-nth-wday-day year 10 1 2)) ; 10月の第2月曜 "体育の日")) (defun xcal-day-of-syunbun (year)