;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;   XEmacs configuration of  Arup Pal  ;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (display-time)
 (add-hook 'TeX-mode-hook
               (lambda ()
                 (set-face-background 'modeline "grey" (current-buffer))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;            General stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; (setq view-diary-entries-initially t)
;     (calendar)

(custom-set-variables
 '(european-calendar-style t)
 '(message-kill-buffer-on-exit t)
 '(font-menu-ignore-scaled-fonts nil)
 '(compilation-ask-about-save nil)
 '(paren-mode (quote paren) nil (paren))
 '(delete-key-deletes-forward t)
 '(buffers-menu-max-size 25)
 '(mail-abbrev-mailrc-file "~/mail/.mailrc")
 '(w3-default-homepage "")
 '(column-number-mode t)
 '(toolbar-captioned-p nil)
 '(shadow-todo-file "~/.xemacs/shadow_todo")
 '(TeX-printer-default "lp")
 '(save-place-file "~/.xemacs/emacs-places")
 '(global-font-lock-mode t nil (font-lock))
 '(toolbar-mail-reader (quote vm))
 '(diary-file "~/.xemacs/diary")
 '(line-number-mode t)
 '(compile-command "gcc")
 '(user-mail-address "xyz@isid.ac.in" t)
 '(query-user-mail-address nil)
 '(*try-oblique-before-italic-fonts* t))

;;(setq bkup-backup-directory-info '((t "/home/arup/.xemacs/backup/" ok-create ))) 
(setq recent-files-save-file (expand-file-name "~/.xemacs/recent-files.el")
    ;    recent-files-dont-include '("~$")
    ;    recent-files-permanent-submenu t
    ;   recent-files-command-submenu nil
   )
(load "recent-files")
(recent-files-initialize)


(load "big-menubar")




;(set-face-background-pixmap 'default
;                           "~.xemacs/icons/tex.xpm")
;(set-face-background-pixmap 'modeline 
;                           "~/.xemacs/icons/tex.xpm")
;(set-face-background-pixmap 'modeline-mousable
;                           "~/.xemacs/icons/tex.xpm")
;(set-face-background-pixmap 'modeline-mousable-minor-mode 
;                           "~/.xemacs/icons/tex.xpm")
;(set-face-background-pixmap 'modeline-buffer-id
;                           "~/.xemacs/icons/tex.xpm")



(custom-set-faces
 '(default ((t (:family "Comic Sans Ms"))) t)
 '(font-lock-string-face ((((class color) (background light)) (:foreground "Red"))))
 '(font-lock-reference-face ((((class color) (background light)) (:foreground "magenta"))))
 '(message-headers ((t (:foreground "Blue"))))
 '(toolbar ((t (:foreground "Blue" :background "lavender"))) t)
 '(font-lock-warning-face ((((class color) (background light)) (:bold t :foreground "Blue"))))
 '(font-lock-keyword-face ((((class color) (background light)) (:foreground "Blue"))))
 '(message-cited-text-face ((((class color) (background light)) (:foreground "red" :family "Courier"))))
 '(message-cited-text ((t (:foreground "red"))))
 '(message-header-cc-face ((((class color) (background light)) (:foreground "MidnightBlue" :bold nil))))
 '(message-header-other-face ((((class color) (background light)) (:foreground "green4"))))
 '(message-header-contents ((t (:foreground "green4"))))
 '(font-lock-comment-face ((((class color) (background light)) (:foreground "green4"))))
 '(x-face ((t (:foreground "black" :background "white"))))
 '(font-lock-function-name-face ((((class color) (background light)) (:foreground "brown"))))
 '(message-url ((t (:foreground "magenta4" :bold t))))
 '(message-highlighted-header-contents ((t (:bold t)))))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;            VM  Part begins
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(custom-set-variables
 '(mail-abbrev-mailrc-file "~/mail/.mailrc")
 '(user-mail-address "xyz@isid.ac.in" t)
 '(query-user-mail-address nil)
)

(setq vm-sort-messages 'reversed-date)
(setq send-mail-function 'smtpmail-send-it)
(setq smtpmail-default-smtp-server "202.54.102.195")
(setq smtpmail-smtp-service "smtp")
;(setq smtpmail-local-domain " ")
(setq smtpmail-debug-info t)
(load-library "smtpmail")
(setq smtpmail-code-conv-from nil)
(setq user-full-name "MY NAME")
;(setq vm-spool-files '("/var/spool/mail/xyz"
;                       "202.54.102.194:110:pass:xyz:*"))
;;   UNCOMMENT the last two lines and comment out the
;;       next two if you want to make VM download the 
;;       mails directly from the POP server
(setq vm-spool-files (list
             (list "~/mail/Inbox" "/var/spool/mail/xyz" "~/mail/inbox.crash")))
  ; Don't use multiple frames
;(setq vm-frame-per-composition nil)
;(setq vm-frame-per-folder nil)
;(setq vm-frame-per-edit nil)
;(setq vm-frame-per-summary nil)

(setq vm-auto-get-new-mail nil)
;(setq vm-mail-check-interval nil)
;;  uncommenting the above line replaces HELP(Dont Panic) in the
;;  toolbar by GET MAIL  ---  seems like a bug!
;(setq vm-mail-check-interval 300)
(setq mail-signature t)
(setq mail-signature-file "~/.signature")
(setq mail-archive-file-name "~/mail/Sent")
(setq vm-primary-inbox "~/mail/Inbox")
;(setq vm-delete-after-archiving t)

;; Configure the toolbar:
(setq vm-use-toolbar
'(getmail quit
        ; next previous
       delete/undelete
       autofile file
       reply compose
       visit 
        nil help
        ))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;            VM  Part ends
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;






;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;            TeX  Part begins
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(load "tex-site")
(setq TeX-icon-directory "~/.xemacs/icons/")
(load "~/.xemacs/mytex-toolbar")
(add-hook 'TeX-mode-hook 'TeX-install-toolbar t)
;(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
 (add-hook 'TeX-mode-hook
               (lambda ()
                 (load "~/.xemacs/mytexmenu.el")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;            TeX  Part ends
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;   Custom TOOLBARS:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(load "~/.xemacs/mytoptoolbar")
;;;;   More correct way of doing the above  :
;(if (and (featurep 'toolbar)
;	 (fboundp 'console-on-window-system-p)
;	 (console-on-window-system-p)
;	 (file-exists-p "~/.xemacs/mytoptoolbar"))
;    (load-file (expand-file-name "~/.xemacs/mytoptoolbar")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(load "~/.xemacs/mylefttoolbar")
;;;;   More correct way of doing the above  :
;(if (and (featurep 'toolbar)
;	 (fboundp 'console-on-window-system-p)
;	 (console-on-window-system-p)
;	 (file-exists-p "~/.xemacs/mylefttoolbar"))
;    (load-file (expand-file-name "~/.xemacs/mylefttoolbar")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

