
;;(add-hook 'find-file-hook 'd-truncate-hook)

(defun d-truncate-hook ()
  (when (string-match "\\.level$" (buffer-file-name))
    (setq truncate-lines t)
    (local-set-key [up  ] 'previous-line)
    (local-set-key [down] 'next-line)
    (picture-mode))
  (when (or (eq major-mode 'c++-mode)
            (eq major-mode 'makefile-mode)
            (eq major-mode 'compilation-mode)
            (eq major-mode 'text-mode))
    (setq truncate-lines t))
  )

(provide 'd-truncate-hook)
;;; d-truncate-hook.el ends here
