(setq max-specpdl-size 1000)
(transient-mark-mode t)
(load-library "paren")
(show-paren-mode t)
(load-library "jka-compr")
(auto-compression-mode t)
(setq-default case-replace nil)
(set-language-environment 'Latin-1)
(defvar home-dir (getenv "HOME" ))
(setenv "TEXINPUTS" (concat ".:./images//:" home-dir "/Config/Latex//:"))
(setenv "BIBINPUTS" (concat ".:./bib//:" home-dir "/tex/bib//:"))
(setenv "BSTINPUTS" (concat ".:./bib//:" home-dir "/tex/bib/:"))
(setenv "PATH" (concat ".:" home-dir "/bin:" (getenv "PATH")))
(defvar home-lisp-dir (list (concat home-dir "/.emacs.d")))
(if home-lisp-dir
(setq load-path (append home-lisp-dir load-path)))
(setq inhibit-default-init t)
(setq inhibit-startup-message t)
(setq sh-shell-file '"/bin/bash")
(line-number-mode t)
(column-number-mode t)
(require 'msb)
(setq msb-display-most-recently-used 5)
(setq msb-files-by-directory t)
(msb-mode 1)
(if (and (boundp 'window-system) window-system)
(require 'font-lock))
(set-foreground-color "white")(set-background-color "black")
(set-cursor-color "orange")
(set-mouse-color "GreenYellow")
(set-default-font "-adobe-courier-bold-r-normal--14-100-100-100-m-90-iso8859-1")
(setq default-frame-alist
'((minibuffer . t)
(cursor-color . "orange")
(menu-bar-lines . 3)
(mouse-color . "GreenYellow")
(foreground-color . "white") (background-color . "black")
(font . "-adobe-courier-bold-r-normal--14-100-100-100-m-90-iso8859-1")))
(if (string-equal "21" (substring (emacs-version) 10 12))
(progn
(blink-cursor-mode nil)
(menu-bar-mode 1)
(tool-bar-mode 0)
(tooltip-mode 0)))
(cond
(window-system
(require 'advice)
(require 'framepop)
(define-key global-map [f2] framepop-map)
(setq framepop-frame-parameters
'(
(name . nil)
(unsplittable . t)
(minibuffer . nil)
(menu-bar-lines . 0)
(left . -1)
(top . 100)
(cursor-color . "Orchid")
(mouse-color . "ForestGreen")
(foreground-color . "black")
(background-color . "wheat")
(font . "-adobe-courier-bold-r-normal--12-120-75-75-m-70-iso8859-1")))
(setq special-display-function 'framepop-special-display)
(setq special-display-buffer-names
'("*Shell Command Output*" "*TeX Help*" "*TeX background*" "*infos*" "*compilation*" "*Completions*"))
(setq special-display-regexps
'("\\*.*output\\*" ))
(setq framepop-max-frame-size 50)
(setq framepop-lines
(function
(lambda (buf)
(if (string= (buffer-name buf) "*Buffer List*") nil
(save-excursion
(set-buffer buf)
(if mode-line-process
framepop-max-frame-size
(+ (count-lines (point-min) (point-max)) 5)))))))))
(load-library "my-functions")
(defun my-default-mode ()
(interactive))
(defun my-text-mode-hook ()
(my-default-mode))
(autoload 'python-mode "python-mode" "Python Mode." t)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
(add-hook 'python-mode-hook
'(lambda ()
(load-library "py-mode-ext")
(load-library "pyp")
(require 'pycomplete)
(define-key py-mode-map [f3] 'pyp)
(define-key py-mode-map "\C-c\C-c" 'py-execute-prog)
(define-key py-mode-map "\C-c\C-g" 'py-call-pdb)
(define-key py-mode-map "\C-c\C-w" 'pychecker))
(set (make-variable-buffer-local 'beginning-of-defun-function)
'py-beginning-of-def-or-class)
(setq outline-regexp "def\\|class "))
(defun my-c-mode-hook()
(my-default-mode)
(setq c-auto-newline nil) (setq c-tab-always-indent t) (set-fill-column 85)
(define-key c-mode-map "\C-c\C-c" 'compile)
)
(setq semanticdb-default-save-directory (expand-file-name "~/.emacs.d/semantic.cache/"))
(defun my-tuareg-mode-hook()
(my-default-mode)
(tuareg-lazy-= t)
(tuareg-lazy-paren t)
(tuareg-in-indent 0)
(tuareg-font-lock-function-name '("brown" "cyan" nil t t t))
(tuareg-font-lock-comment '("pink4" "moccasin" nil t nil t))
(auto-fill-mode 1)
(if (featurep 'sym-lock)
(setq sym-lock-mouse-face-enabled nil)))
(defun my-tex-mode-hook ()
(my-default-mode)
(real-tex-hook tex-mode-map)
(setq tab-width 4))
(defun my-LaTeX-mode-hook ()
(my-default-mode)
(setq-default TeX-auto-regexp-list 'LaTeX-auto-minimal-regexp-list)
(define-key LaTeX-mode-map "\e\C-q" 'LaTeX-fill-region)
(define-key LaTeX-mode-map "\C-c<" 'latex-insert-guillleft)
(define-key LaTeX-mode-map "\C-c>" 'latex-insert-guillright)
(setq tab-width 4)
(set-fill-column 80)
(auto-fill-mode 1)
)
(require 'tex-site)
(setq-default enable-local-eval t)
(setq-default TeX-master nil)
(autoload 'css-mode "css-mode")
(setq auto-mode-alist
(cons '("\\.css\\'" . css-mode) auto-mode-alist))
(setq cssm-indent-function #'cssm-c-style-indenter)
(defun my-usr1-handling ()
(interactive)
(save-buffers-kill-emacs t))
(global-set-key [usr1-signal] 'my-usr1-handling)
(add-hook 'text-mode-hook 'my-text-mode-hook)
(add-hook 'tex-mode-hook 'my-tex-mode-hook)
(add-hook 'LaTeX-mode-hook 'my-LaTeX-mode-hook)
(add-hook 'c-mode-hook 'my-c-mode-hook)
(add-hook 'tuareg-mode-hook 'my-tuareg-mode-hook)
(autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code" t)
(autoload 'camldebug "camldebug" "Run the Caml debugger" t)
(add-to-list 'auto-mode-alist '("\\.ml\\w?" . tuareg-mode))
(add-to-list 'auto-mode-alist '("\\.tex$" . latex-mode))
(add-to-list 'auto-mode-alist '("\\.gnuplot$" . gnuplot-mode))
(defun up-slightly () (interactive) (scroll-up 5))
(defun down-slightly () (interactive) (scroll-down 5))
(global-set-key [mouse-4] 'down-slightly)
(global-set-key [mouse-5] 'up-slightly)
(defun up-one () (interactive) (scroll-up 1))
(defun down-one () (interactive) (scroll-down 1))
(global-set-key [S-mouse-4] 'down-one)
(global-set-key [S-mouse-5] 'up-one)
(defun up-a-lot () (interactive) (scroll-up))
(defun down-a-lot () (interactive) (scroll-down))
(global-set-key [C-mouse-4] 'down-a-lot)
(global-set-key [C-mouse-5] 'up-a-lot)
(require 'saveplace)
(setq-default save-place t)
(autoload 'ansi-color-apply "ansi-color"
"Translates ANSI color escape sequences into text-properties." t)
(setq visible-bell t)
(desktop-save-mode 1)
(setq history-length 250)
(setq desktop-globals-to-save
(append
'(desktop-missing-file-warning
tags-file-name
tags-table-list
search-ring
regexp-search-ring
register-alist)
'((read-command-history . 9)
(file-name-history . 9)
(command-history . 9)
(grep-history . 9)
(compile-history . 9)
(minibuffer-history . 9)
(gud-perldb-history . 9)
(hypropos-regexp-history . 9))
'(desktop-globals-to-save)))
(add-hook 'kill-emacs-hook
'(lambda ()
(desktop-truncate search-ring 3)
(desktop-truncate regexp-search-ring 3)))
(setq desktop-buffers-not-to-save
(concat "\\("
"^nn\\.a[0-9]+\\|\\.log\\|(ftp)\\|^tags\\|^TAGS"
"\\|\\.emacs.*\\|\\.diary\\|\\.newsrc-dribble\\|\\.bbdb"
"\\)$"))
(add-to-list 'desktop-modes-not-to-save 'dired-mode)
(add-to-list 'desktop-modes-not-to-save 'Info-mode)
(add-to-list 'desktop-modes-not-to-save 'info-lookup-mode)
(add-to-list 'desktop-modes-not-to-save 'fundamental-mode)
(setq desktop-save 'if-exists)
(global-set-key [deleteline] 'effacer-ligne)
(global-set-key [insertline] 'inserer-ligne)
(global-set-key [C-return] 'find-file-at-point)
(global-set-key [C-tab] 'other-frame)
(global-set-key [M-tab] 'dabbrev-expand) (global-set-key "\C-xl" 'goto-line)
(global-set-key (kbd "<delete>") 'delete-char)
(custom-set-variables
'(TeX-command-Show "View PS")
'(TeX-command-list (quote (("TeX" "tex '\\nonstopmode\\input %t'" TeX-run-TeX nil t) ("TeX Interactive" "tex %t" TeX-run-interactive nil t) ("LaTeX" "%l '\\nonstopmode\\input{%t}'" TeX-run-LaTeX nil "nil") ("LaTeX Interactive" "%l %t" TeX-run-interactive nil t) ("LaTeX2e" "latex2e '\\nonstopmode\\input{%t}'" TeX-run-LaTeX nil t) ("View PS" "gv --noresize %f" TeX-run-silent nil "nil") ("View" "%V " TeX-run-silent nil nil) ("Print" "%p %r " TeX-run-command t nil) ("Queue" "%q" TeX-run-background nil nil) ("File" "%(o?)dvips %d -o %f" TeX-run-command nil nil) ("BibTeX" "bibtex %s" TeX-run-BibTeX nil nil) ("Index" "makeindex %s" TeX-run-command nil t) ("Check" "lacheck %s" TeX-run-compile nil t) ("Spell" "<ignored>" TeX-run-ispell-on-document nil nil) ("Other" "" TeX-run-command t t) ("Makeinfo" "makeinfo %t" TeX-run-compile nil t) ("Makeinfo HTML" "makeinfo --html %t" TeX-run-compile nil t) ("AmSTeX" "amstex '\\nonstopmode\\input %t'" TeX-run-TeX nil t))))
'(global-font-lock-mode t nil (font-lock))
'(org-agenda-files (quote ("~/Donnees/Org/first.org" "~/Donnees/Org/exemple.org")))
'(speedbar-directory-unshown-regexp "^\\(CVS\\|RCS\\|\\.\\|SCCS\\)"))
(custom-set-faces
'(font-lock-comment-face ((t (:bold t :italic t :foreground "CadetBlue"))))
'(font-lock-constant-face ((((class color) (background dark)) (:foreground "Khaki"))))
'(font-lock-crossref-face ((t (:foreground "chocolate"))))
'(font-lock-decl-face ((t (:bold t :foreground "Turquoise"))))
'(font-lock-define-face ((t (:bold t :foreground "pink"))))
'(font-lock-defun-face ((t (:bold t :foreground "Cyan"))))
'(font-lock-directory-face ((t (:foreground "limegreen"))))
'(font-lock-error-face ((t (:foreground "green"))))
'(font-lock-formula-face ((t (:foreground "magenta"))))
'(font-lock-function-name-face ((t (:bold t :foreground "Turquoise"))))
'(font-lock-include-face ((t (:bold t :foreground "pink"))))
'(font-lock-input-face ((t (:foreground "Pink"))))
'(font-lock-keyword-face ((t (:bold t :foreground "Cyan"))))
'(font-lock-label-face ((t (:foreground "orange"))))
'(font-lock-link-face ((t (:bold t :foreground "Turquoise"))))
'(font-lock-string-face ((t (:foreground "LightGray"))))
'(font-lock-type-face ((t (:bold t :foreground "Yellow"))))
'(font-lock-variable-name-face ((t (:foreground "MediumSeaGreen")))))
(put 'eval-expression 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(put 'narrow-to-page 'disabled nil)
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)
(server-start)
(if (>= emacs-major-version 21)
(progn
(set-language-environment "Latin-9")
(setq selection-coding-system 'compound-text-with-extensions)
)
(if (>= emacs-major-version 20)
(set-language-environment "Latin-1")
(require 'iso-syntax)))
(defvar calendar-day-name-array
["lun" "mar" "mer" "jeu" "ven" "sam" "dim"])
(defvar calendar-month-name-array
["janvier" "février" "mars" "avril" "mai" "juin"
"juillet" "août" "septembre" "octobre" "novembre" "décembre"])
(set-selection-coding-system 'iso-8859-15)
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(setq default-buffer-file-coding-system 'utf-8)
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
(require 'swbuff)
(global-set-key (kbd "C-x <right>") 'swbuff-switch-to-next-buffer)
(global-set-key (kbd "C-x <left>") 'swbuff-switch-to-previous-buffer)
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(add-hook 'org-mode-hook 'turn-on-font-lock)
(setq org-enforce-todo-dependencies t)
(setq org-log-done 'time)
(org-remember-insinuate)
(setq org-directory "~/Donnees/Org/")
(setq org-default-notes-file (concat org-directory "/notes.org"))
(define-key global-map "\C-cr" 'org-remember)
(setq org-agenda-include-diary t)