;;; -*- lexical-binding: nil; -*-
;;
;; Copyright Holder: HIRAOKA Kazuyuki <khi@users.sourceforge.jp>
;; Modifier: Yuki Fujimura <ykfj@users.sourceforge.jp>
;;           Youhei SASAKI <uwabami@gfd-dennou.org>
;;
;; First, try followed.
;;
;;   $ HOWM_TEST=t emacs -q -no-site-file -l /usr/share/doc/howm/sample/dot.emacs
;;
;; If it reproduces, report to upstream author.
;;
;; If it it not reproduces, its source of trouble will be your .emacs.
;;
;; You may pursue the exact cause of bug, and properly report to
;; upstream author or package maintainer.
;;
(setq debug-on-error t)
(setq font-lock-verbose t)
(setq inhibit-startup-message t)

(setq howm-sample-directory "/usr/share/doc/howm/sample")
(setq howm-directory (expand-file-name (make-temp-name "howm-test-")
                                       (or (getenv "TMPDIR")
                                           (getenv "TEMP")
                                           (getenv "TMP")
                                           "/tmp")))
(setq howm-keyword-file (expand-file-name ".howm-keys" howm-directory))
(setq howm-history-file (expand-file-name ".howm-history" howm-directory))
;(setq howm-menu-lang 'ja)
(setq howm-history-limit nil)  ;; Don't erase my ~/.howm-history.

(require 'howm)
(let ((howm-version (concat howm-version " (Debian Unofficial Package)")))
  (make-directory howm-directory)
  (call-process "cp" nil nil nil
                "-rp" howm-sample-directory howm-directory)
  (add-hook 'kill-emacs-hook
            (lambda ()
              (call-process "rm" nil nil nil
                            "-rf" howm-directory)
              ))
  (howm-test))

