;; SYNOPSIS: Common variables set for gnuemacs/xemacs/ttyemacs/ntemacs.
;; AUTHOR: GPL(C) Mohsin Ahmed, http://www.cs.albany.edu/~mosh

(defvar w32emacs   (and (file-readable-p "c:/") (getenv "WINDIR")))
(defvar ntemacs    (and w32emacs (getenv "COMPUTERNAME")))
(defvar 95emacs    (and w32emacs (not ntemacs)))
(defvar plainemacs (getenv "PLAINEMACS"))

(defvar unixemacs (file-readable-p "/etc"))
(defvar xwindows  (eq window-system 'x))
(defvar xemacs    (string-match "XEmacs" emacs-version))
(defvar gnuemacs  (not (string-match "XEmacs" emacs-version)))
(defvar ttyemacs  (not window-system))

(or (boundp 'system-name) (setq system-name "none"))

(require 'mosh) ; for mosh-dira

(setq
      user-login-name    (or (getenv "username") ; not Administrator
                             (getenv "LOGNAME")
                             "mosh")
      user-full-name     (or (getenv "NAME") "Mohsin_Ahmed")
      domain-name        (or (getenv "domain") "home.com")
      hostname           (downcase (or (getenv "computername")
                                       (getenv "HOSTNAME")
                                       (getenv "host")
                                       system-name))
      user-mail-address  (downcase
                         (concat user-login-name "@" domain-name))
      user-url           "http://www.cs.albany.edu/~mosh"
      load-path           (cons "~/emacs" load-path)

      Info-default-directory-list (mosh-dirl
                                "$INFOPATH"
                                "/win95/emacs/info"
                                "/usr/info"
                                "c:/info"
                                "c:/emacs/info"
                               ;Info-default-directory-list
                                )
)

(setq
 home                (mosh-dira "$HOME" "c:/mosh" "d:/mosh/" "~/")
 default-directory   home
 windir              (mosh-dira "$WINDIR")
 ddk                 (mosh-dira "c:/ddk" "d:/ddk" "e:/ddk" "/win95/ddk")
 croot               (mosh-dira "/win95" "$CROOT" "$WINDIR")
 nroot               (mosh-dira "/winnt/nts/system32" "$systemroot")
 vc                  (mosh-dira "$VC"
                                "e:/vs5/"
                                "/win95/vc/" ; Linux mounted
                     )
 wwwroot             (mosh-dira "c:/inetpub/wwwroot" ; IIS/NT4.
                                "/home/httpd"        ; Linux
                     )
 emacs_dir           (mosh-dira "$EMACS_DIR"
                                "/usr/local/emacs/current"
                                "c:/emacs/"
                     )
 ispell-alternate-dictionary (mosh-dira "/usr/dict/words"
                                        "c:/dict/words.txt")
 ispell-complete-word-dict       ispell-alternate-dictionary
)

;; Location specific settings.
;; calendar-location-name  "Fremont,CA,USA"
;; calendar-latitude       +0
;; calendar-longitude      +0

;; Printers

(if unixemacs
  (setq
   lpr-command         "lpr"
  ;lpr-switches        '("-Pfujisu")
   ps-paper-type       'a4             ; override 'ps-letter.   
  )
)

;; EOF

