Top > FreeBSD > insert-datetime/time

日付を入れる Lisp 関数を .emacs に追加。
ChangeLog を手書きで作るときに結構重宝してます。

;;
;; insert-datetime
;;
(defun insert-datetime ()
  "Insert the current date and time."
  (interactive)
  (let ((system-time-locale "C"))
    (insert (format-time-string "%a %b %e %T %Z %Y" (current-time))))
)
;;
;; insert-time
;;
(defun insert-time ()
  "Insert the current time."
  (interactive)
  (insert (upcase(format-time-string "%T %Z" (current-time))))
)
TrackBack(0)
TrackBack URL for this entry: http://www.asmate.net/mt/mt-tb.cgi/30
Comments (0)
コメントする









名前、アドレスを登録しますか?







Since 2003.6.19, Yutaka@smate.NET <yutaka@asmate.net>. Powered by MT 2.64