All pastes #337090 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-02-02 14:24 UTC
rendered paste body
(autoload 'w3-speedbar-buttons "sb-w3" "s3 specific speedbar button generator.")

;; semantic
;;(add-to-list 'load-path "~/.emacs.d/semantic")
;;(setq semantic-load-turn-everything-on t)
;;(require 'semantic-load)

;; elib
;; (add-to-list 'load-path "~/.emacs.d/elib")

;; JDEE
;;(add-to-list 'load-path (expand-file-name "~/.emacs.d/jde/lisp"))
;;(require 'jde)


;; Php
;;(load-file "~/.emacs.d/php-mode.el")
;;(require 'php-mode)
;;(add-hook 'php-mode-user-hook 'turn-on-font-lock)

;;(add-hook 'php-mode-user-hook
;;  '(lambda () (define-abbrev php-mode-abbrev-table "ex" "extends")))


;; Corrige la coloration syntaxique
;;(load-file "~/.emacs.d/overlay-fix.elc")
;;(set-background-color "Black")
;;(set-foreground-color "White")
;;(set-cursor-color "White")
;;(set-mouse-color "White")


;; Session save
;;(desktop-save-mode 1)
;(desktop-load-default)
;(setq history-length 250)
;(add-to-list 'desktop-globals-to-save 'file-name-history)
;(desktop-read)
;(setq desktop-enable t)

;; Display the time on the status bar
(display-time)


;; Complétion automatique
;; (setq-default abbrev-mode t)			;
;; (read-abbrev-file "~/.emacs.d/abbrev_defs")	; toutes les raccourcis sont
										; dans ce fichier
;;(setq save-abbrevs t)


;; These two key bindings are for up and down scrolling by a either single line at a time
;; or by N lines at a time (default is scroll by one single line at a time).  This is
;; very useful when working with narrow horizontal windows.  ;~)
;; To enter the desired N, hold down \C and type the number and then hit z or q, all the
;; while holding down \C.
;; From the "Writing GNU Emacs Extensions" book, by Bob Glickstein.
;;(defun scroll-n-lines-up (&optional n)
;;  "Scroll up N lines (1 line by default)."
;;  (interactive "P")
;;  (scroll-up (prefix-numeric-value n)))

;;(defun scroll-n-lines-down (&optional n)
;;  "Scroll down N lines (1 line by default)."
;;  (interactive "P")
;;  (scroll-down (prefix-numeric-value n)))

;;Afficheage des espaces
;;(require 'show-wspace)

;; ouverture des fichiers récents
(require 'recentf)
(recentf-mode 1)
(setq recentf-arrange-by-rules-min-items 0
      recentf-arrange-by-rule-others nil
      recentf-arrange-rules
	  '(("Elisp files (%d)" ".\\.el$"
		 "^\\.?emacs-")
		("Java files (%d)" ".\\.java$")
		("C/C++ files (%d)" ".\\.c\\(pp\\)?$")
		("PHP files (%d)" ".\\.\\(php\\|php3\\)$")
		("Configuration files (%d)" "rc$\\|/\\.")
		("Ada files (%d)" ".\\.ad[sb]$")
		("TeX/LaTeX files (%d)" ".\\.\\(tex\\|bib\\)$")
		("Scripts (%d)" ".\\.\\(sh\\|pl\\)$")
		("Documentation (%d)" "/doc/")
		)
      recentf-max-saved-items 50
      recentf-max-menu-items  30
      recentf-menu-path nil
      recentf-exclude '(".emacs-customize$"
						".newsrc"
						".etags$"
						".emacs.bmk$"
						".bbdb$"
						".log$"
						"^/tmp/")
      recentf-menu-filter 'recentf-arrange-by-rule
      recentf-menu-title "Recentf"
      )

(defun recentf-open-files-compl ()
  (interactive)
  (let* ((all-files recentf-list)
		 (tocpl (mapcar (function (lambda (x) (cons (file-name-nondirectory x) x))) all-files))
		 (prompt (append '("File name: ") tocpl))
		 (fname (completing-read (car prompt) (cdr prompt) nil nil)))
	(find-file (cdr (assoc-ignore-representation fname tocpl)))))

;; Ouverture des fichiers récents
;; (global-set-key "" (quote recentf-open-files-compl))

;; Clavier
(global-set-key [C-home] 'beginning-of-buffer)
(global-set-key [C-end] 'end-of-buffer)

(global-set-key [C-kp-home] 'beginning-of-buffer)
(global-set-key [C-kp-end] 'end-of-buffer)

(global-set-key [delete] 'delete-char)
(global-set-key [kp-delete] 'delete-char)

;; Complétion automatique
;;  (global-set-key (quote [C-tab]) (quote dabbrev-expand))

;; Couper/Copier/Coller
;;   (global-set-key "\C-w" (quote copy-region-as-kill-nomark))
;;   (global-set-key [(meta w)] (quote kill-region))
;;   (global-set-key "\227" (quote yank)) ;;[C-M-w] pour coller


;; Séléctionner tout le buffer
;;   (global-set-key "\C-a" (quote mark-whole-buffer))


;; Scroll de n lignes
;; (global-set-key "\C-q" 'scroll-n-lines-up)
;; (global-set-key "\C-z" 'scroll-n-lines-down)

;; Aller directement à une ligne
(global-set-key [(meta g)] `goto-line)

;;(global-set-key [f2] 'save-buffer)
(global-set-key [f3] 'find-file)
(global-set-key [f4] 'kill-buffer)
(global-set-key [f5] 'speedbar-get-focus)

(global-set-key [f9] 'compile)


;; souris
(global-set-key (quote [(mouse-5)]) (quote scroll-n-lines-up))
(global-set-key (quote [(mouse-4)]) (quote scroll-n-lines-down))

;; Turn on font-lock mode for Emacs
(global-font-lock-mode t)

;; Always end a file with a newline
(setq require-final-newline t)

;; Stop at the end of the file, not just add lines
(setq next-line-add-newlines nil)

;; configuration gcc
(setq compile-command "make CFLAGS=\"-g -Wall\" -k ")

;; configuration pour la circulation entre tampons (C-x b)
(require 'iswitchb)
(iswitchb-default-keybindings)

;; Turn off the bell
(setq visible-bell t)

;; set cursor to line of 3 pixels width
(setq initial-frame-alist '((cursor-type . (bar . 3))))
;; This is a simple .emacs file for general purposes mostly.
;; It has been tested on GNU Emacs version 21.3.1 on Windows 98SE,
;;
;; This Document Last Modified: 01/13/05.
;;

(add-hook 'c++-mode-hook 'turn-on-font-lock)
(add-hook 'c-mode-hook 'turn-on-font-lock)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Par RCT
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-to-list 'load-path "~/.emacs.d/")
(add-to-list 'load-path "~/.emacs.d/color-theme/")
(add-to-list 'load-path "~/.emacs.d/mmm-mode/")
(add-to-list 'load-path "~/.emacs.d/psgml-mode/")

;;Theme
(require 'color-theme)
(color-theme-gnome2)

;;
(setq
 backup-by-copying t					; don't clobber symlinks
 backup-directory-alist
 '(("." . "~/.saves"))					; don't litter my fs tree
 delete-old-versions t
 kept-new-versions 6
 kept-old-versions 2
 version-control t)						; use versioned backups)

;;
(add-to-list 'load-path "~/.emacs.d/")
(require 'ebs)
(ebs-initialize)
(global-set-key [f1] 'ebs-switch-buffer)

;;
(transient-mark-mode 1)
(setq mark-even-if-inactive t)

;;recent-files
(global-set-key [f2] 'recentf-open-files)
(defalias 'perl-mode 'cperl-mode)

;;
(setq-default
 c-basic-offset 4
 cperl-indent-level 4
 tab-width 4
 indent-tabs-mode nil)

;; Afficher les espaces vides
(setq show-trailing-whitespace t)
;;ecris a la volée ::
;;(add-hook 'save-buffer 'delete-trailing-whitespace)

(global-set-key [(control tab)] `other-window)
(global-set-key [C-S-iso-lefttab]
				'(lambda () (interactive) (other-window -1)))

(defun match-paren (arg)
  "Go to the matching paren if on a paren."
  (interactive "p")
  (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
		((looking-at "\\s\)") (forward-char 1) (backward-list 1))
		(t (self-insert-command (or arg 1)))))

(global-set-key (kbd "M-p") 'match-paren)

(setq dcsh-command-list '("all_registers"
						  "check_design" "check_test" "compile" "current_design"
						  "link" "uniquify"
						  "report_timing" "report_clocks" "report_constraint"
						  "get_unix_variable" "set_unix_variable"
						  "set_max_fanout"
						  "report_area" "all_clocks" "all_inputs" "all_outputs"))

;;rectangle selection
    (global-set-key (kbd "C-x r C-SPC") 'rm-set-mark)
    (global-set-key (kbd "C-x r C-x") 'rm-exchange-point-and-mark)
    (global-set-key (kbd "C-x r C-w") 'rm-kill-region)
    (global-set-key (kbd "C-x r M-w") 'rm-kill-ring-save)
    (autoload 'rm-set-mark "rect-mark"
      "Set mark for rectangle." t)
    (autoload 'rm-exchange-point-and-mark "rect-mark"
      "Exchange point and mark for rectangle." t)
    (autoload 'rm-kill-region "rect-mark"
      "Kill a rectangular region and save it in the kill ring." t)
    (autoload 'rm-kill-ring-save "rect-mark"
      "Copy a rectangular region to the kill ring." t)

;; hippie completion
(defun he-dcsh-command-beg ()
  (let ((p))
	(save-excursion
	  (backward-word 1)
	  (setq p (point)))
	p))

(defun try-expand-dcsh-command (old)
  (unless old
	(he-init-string (he-dcsh-command-beg) (point))
	(setq he-expand-list (sort
						  (all-completions he-search-string (mapcar 'list dcsh-command-list))
						  'string-lessp)))
  (while (and he-expand-list
              (he-string-member (car he-expand-list) he-tried-table))
	(setq he-expand-list (cdr he-expand-list)))
  (if (null he-expand-list)
	  (progn
		(when old (he-reset-string))
		())
	(he-substitute-string (car he-expand-list))
	(setq he-tried-table (cons (car he-expand-list) (cdr he-tried-table)))
	(setq he-expand-list (cdr he-expand-list))
	t))

(global-set-key (kbd "S-<tab>") (make-hippie-expand-function
								 '(try-expand-dcsh-command
								   try-expand-dabbrev-visible
								   try-expand-dabbrev
								   try-expand-dabbrev-all-buffers) t))


;;************************************************************
;; configure HTML editing
;;************************************************************

;;(setq sgml-set-face t)
;;(setq sgml-auto-activate-dtd t)
;;(setq sgml-indent-data t)

;; (setq sgml-markup-faces '(
;;     (start-tag . font-lock-keyword-face)
;;     (end-tag . font-lock-keyword-face)
;;     (comment . font-lock-comment-face)
;;     (pi . font-lock-constant-face) ;; <?xml?>
;;     (sgml . font-lock-type-face)
;;     (doctype . bold)
;;     (entity . italic)
;;     (shortref . font-lock-reference-face)))

;; ;;
;; (require 'php-mode)
;; ;;
;; ;; configure css-mode
;; (autoload 'css-mode "css-mode")
;; (add-to-list 'auto-mode-alist '("\\.css\\'" . css-mode))
;; (setq cssm-indent-function #'cssm-c-style-indenter)
;; (setq cssm-indent-level '2)
;; ;;
;; (add-hook 'php-mode-user-hook 'turn-on-font-lock)
;; ;;
;; (require 'mmm-mode)
;; (setq mmm-global-mode 'maybe)
;; ;;
;; ;; set up an mmm group for fancy html editing
;; (mmm-add-group
;;  'fancy-html
;;  '(
;;    (html-php-tagged
;; 	:submode php-mode
;; 	:face mmm-code-submode-face
;; 	:front "<[?]php"
;; 	:back "[?]>")
;;    (html-css-attribute
;; 	:submode css-mode
;; 	:face mmm-declaration-submode-face
;; 	:front "style=\""
;; 	:back "\"")))
;; ;;
;; ;; What files to invoke the new html-mode for?
;; (add-to-list 'auto-mode-alist '("\\.inc\\'" . html-mode))
;; (add-to-list 'auto-mode-alist '("\\.phtml\\'" . html-mode))
;; (add-to-list 'auto-mode-alist '("\\.php[34]?\\'" . html-mode))
;; (add-to-list 'auto-mode-alist '("\\.[sj]?html?\\'" . html-mode))
;; (add-to-list 'auto-mode-alist '("\\.jsp\\'" . html-mode))
;; ;;
;; ;; What features should be turned on in this html-mode?
;; (add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil html-js))
;; (add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil embedded-css))
;; (add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil fancy-html))
;; ;;
;; ;; Not exactly related to editing HTML: enable editing help with mouse-3 in all sgml files
;; (defun go-bind-markup-menu-to-mouse3 ()
;;   (define-key sgml-mode-map [(down-mouse-3)] 'sgml-tags-menu))
;; ;;
;; (add-hook 'sgml-mode-hook 'go-bind-markup-menu-to-mouse3)



;; ---------------------------------------------------------------------------
;; XML/SGML - PSGML
;;
;;   First, we'll just set up PSGML. Then we'll create a derived mode for
;;   (X)HTML using mmm-mode for fancy (X)HTML/CSS/Javascript/PHP coding

;;(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t )
;;(autoload 'xml-mode "psgml" "Major mode to edit XML files." t)

;;(setq auto-mode-alist
;;  (append
;;  (list
;;    '("\\.sgm$" . sgml-mode)
;;    '("\\.sgml$" . sgml-mode)
;;    '("\\.xml$" . xml-mode)
;;    )
;;  auto-mode-alist))

;; Enable editing help with mouse-3 in all sgml files

;;(defun go-bind-markup-menu-to-mouse3 ()
;;        (define-key sgml-mode-map [(down-mouse-3)] 'sgml-tags-menu))
;;(add-hook 'sgml-mode-hook 'go-bind-markup-menu-to-mouse3)


;; xxml.el for better syntax highlighting (although we won't use xxml.el's
;; html-mode, but will define our own).

; (autoload 'html-mode "xxml" "Major mode to edit HTML files." t)
;;(autoload 'xxml-mode-routine "xxml")
;;(add-hook 'sgml-mode-hook 'xxml-mode-routine)
;;(add-hook 'xml-mode-hook 'xxml-mode-routine)

;; create faces to assign to markup categories

;;(make-face 'sgml-comment-face)
;; (make-face 'sgml-start-tag-face)
;; (make-face 'sgml-end-tag-face)
;; (make-face 'sgml-entity-face)
;; (make-face 'sgml-doctype-face) ; DOCTYPE data
;; (make-face 'sgml-ignored-face) ; data ignored by PSGML
;; (make-face 'sgml-ms-start-face) ; marked sections start
;; (make-face 'sgml-ms-end-face) ; end of marked section
;; (make-face 'sgml-pi-face) ; processing instructions
;; (make-face 'sgml-sgml-face) ; the SGML declaration
;; (make-face 'sgml-shortref-face) ; short references

;; ;; assign faces to markup categories

;; (setq sgml-markup-faces '
;;   (
;;   (comment . sgml-comment-face)
;;   (start-tag . sgml-start-tag-face)
;;   (end-tag . sgml-end-tag-face)
;;   (entity . sgml-entity-face)
;;   (doctype . sgml-doctype-face)
;;   (ignored . sgml-ignored-face)
;;   (ms-start . sgml-ms-start-face)
;;   (ms-end . sgml-ms-end-face)
;;   (pi . sgml-pi-face)
;;   (sgml . sgml-sgml-face)
;;   (shortref . sgml-shortref-face)
;;   ))

;; ;; tell PSGML to pay attention to face settings

;; (setq sgml-set-face t)


;; ---------------------------------------------------------------------------
;; (X)HTML - PSGML with MMM Mode for CSS, Javascript and PHP support

;; (define-derived-mode xml-html-mode xml-mode "XHTML"
;;   "This version of html mode is just a wrapper around xml mode."
;;   (make-local-variable 'sgml-declaration)
;;   (make-local-variable 'sgml-default-doctype-name)
;;   (setq
;;    sgml-default-doctype-name    "html"
;;    sgml-declaration             "/usr/share/sgml/xml.dcl"
;;    sgml-always-quote-attributes t
;;    sgml-indent-step             2
;;    sgml-indent-data             t
;;    sgml-minimize-attributes     nil
;;    sgml-omittag                 nil
;;    sgml-shorttag                nil
;;    )
;;   )

;; (define-derived-mode sgml-html-mode sgml-mode "HTML"
;;   "This version of html mode is just a wrapper around sgml mode."
;;   (make-local-variable 'sgml-declaration)
;;   (make-local-variable 'sgml-default-doctype-name)
;;   (setq
;;    sgml-default-doctype-name    "html"
;;    sgml-declaration             "~/lib/DTD/html401/HTML4.decl"
;;    sgml-always-quote-attributes t
;;    sgml-indent-step             2
;;    sgml-indent-data             t
;;    sgml-minimize-attributes     nil
;;    sgml-omittag                 nil
;;    sgml-shorttag                nil
;;    )
;;   )

;; PHP-Mode
(require 'php-mode)
(add-hook 'php-mode-user-hook 'turn-on-font-lock)

;; CSS-Mode
(autoload 'css-mode "css-mode")
(add-to-list 'auto-mode-alist '("\\.css\\'" . css-mode))
(setq cssm-indent-function #'cssm-c-style-indenter)
(setq cssm-indent-level '2)

;; javascript-generic-mode
(require 'generic-x)

;; ;; MMM-Mode
;; (require 'mmm-auto)
;; (setq mmm-global-mode 'maybe)

;; ;; Set up an mmm group for fancy html editing
;; (mmm-add-group
;;  'fancy-html
;;  '(
;;          (html-php-embedded
;;                 :submode php-mode
;;                 :face mmm-output-submode-face
;;                 :front "<[?]php"
;;                 :back "[?]>")
;;          (html-css-embedded
;;                 :submode css-mode
;;                 :face mmm-declaration-submode-face
;;                 :front "<style\[^>\]*>"
;;                 :back "</style>")
;;          (html-css-attribute
;;                 :submode css-mode
;;                 :face mmm-declaration-submode-face
;;                 :front "\\bstyle=\\s-*\""
;;                 :back "\"")
;;          (html-javascript-embedded
;;                 :submode javascript-generic-mode
;;                 :face mmm-code-submode-face
;;                 :front "<script\[^>\]*>"
;;                 :back "</script>")
;;          (html-javascript-attribute
;;                 :submode javascript-generic-mode
;;                 :face mmm-code-submode-face
;;                 :front "\\bon\\w+=\\s-*\""
;;                 :back "\"")
;;    )
;; )

;; What files to invoke the new html-mode for?
;;   HTML and XHTML tend to have the same file extensions. However, XHTML
;;   hopefully has either one or both of <?xml or W3C//DTD XHTML near the
;;   beginning. So we default to sgml-html-mode and then add a hook to
;;   sgml-html-mode to check for either of those strings and switch to
;;   xml-html-mode if it finds them.

;;(add-to-list 'auto-mode-alist '("\\.inc\\'" . sgml-html-mode))
;;(add-to-list 'auto-mode-alist '("\\.php[34]?\\'" . sgml-html-mode))
;;(add-to-list 'auto-mode-alist '("\\.[sj]?html?\\'" . sgml-html-mode))

;;(add-hook 'sgml-html-mode-hook 'guess-xhtml-hook t)

;;(defun guess-xhtml-hook ()
;;   "Guess whether the current buffer is XHTML."
;;   (when 
;;     (save-excursion 
;;       (search-forward-regexp "<[?]xml\\|//W3C//DTD XHTML" 80 t))
;;     (xml-html-mode)
;;     ))

;; Make smgl-html-mode and xml-html-mode use fancy-html
;; (add-to-list 'mmm-mode-ext-classes-alist '(sgml-html-mode nil fancy-html))
;; (add-to-list 'mmm-mode-ext-classes-alist '(xml-html-mode nil fancy-html))

;; ;;Permet de modifier la couleur de fond pour php
;; (set-face-background 'mmm-default-submode-face "#555577")

;;  '(sgml-always-quote-attributes t t)
;;  '(sgml-angle-distance 4000 t)
;;  '(sgml-auto-activate-dtd t t)
;;  '(sgml-auto-insert-required-elements t t)
;;  '(sgml-balanced-tag-edit t t)
;;  '(sgml-buggy-subst-char-in-region nil t)
;;  '(sgml-custom-markup nil t)
;;  '(sgml-declaration "~/lib/DTD/html401/HTML4.decl" t)
;;  '(sgml-default-doctype-name nil t)
;;  '(sgml-default-dtd-file nil t)
;;  '(sgml-doctype nil t)
;;  '(sgml-exposed-tags nil t)
;;  '(sgml-general-insert-case (quote lower) t)
;;  '(sgml-ignore-undefined-elements nil t)
;;  '(sgml-indent-data t t)
;;  '(sgml-indent-step 2 t)
;;  '(sgml-insert-defaulted-attributes nil t)
;;  '(sgml-insert-end-tag-on-new-line nil t)
;;  '(sgml-insert-missing-element-comment nil t)
;;  '(sgml-leave-point-after-insert nil t)
;;  '(sgml-live-element-indicator t t)
;;  '(sgml-local-catalogs nil t)
;;  '(sgml-local-ecat-files nil t)
;;  '(sgml-max-menu-size 48 t)
;;  '(sgml-minimize-attributes nil t)
;;  '(sgml-namecase-general t t)
;;  '(sgml-normalize-trims t t)
;;  '(sgml-offer-save t t)
;;  '(sgml-omittag nil t)
;;  '(sgml-omittag-transparent t t)
;;  '(sgml-parent-document nil t)
;;  '(sgml-range-indicator-max-length 9 t)
;;  '(sgml-recompile-out-of-date-cdtd (quote ask) t)
;;  '(sgml-set-face t t)
;;  '(sgml-shorttag nil t)
;;  '(sgml-slash-distance 1000 t)
;;  '(sgml-system-identifiers-are-preferred nil t)
;;  '(sgml-tag-region-if-active nil t)
;;  '(sgml-trace-entity-lookup nil t)
;;  '(sgml-validate-command "nsgmls -s %s %s")
;;  '(sgml-warn-about-undefined-elements t t)
;;  '(sgml-warn-about-undefined-entities t t)
;;  '(sgml-xml-declaration "/usr/share/sgml/xml.dcl" t)
;;  '(sgml-xml-validate-command "nsgmls -wxml -s %s %s" t)

;;; cperl-mode is preferred to perl-mode
;;; "Brevity is the soul of wit" <foo at acm.org>
;;(defalias 'perl-mode 'cperl-mode)

;; Resize windows : http://www.emacswiki.org/cgi-bin/emacs-en/WindowResize
(global-set-key (kbd "S-C-<left>") 'shrink-window-horizontally)
(global-set-key (kbd "S-C-<right>") 'enlarge-window-horizontally)
(global-set-key (kbd "S-C-<down>") 'shrink-window)
(global-set-key (kbd "S-C-<up>") 'enlarge-window)
(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(case-fold-search t)
 '(current-language-environment "Latin-1")
 '(default-input-method "latin-1-prefix")
 '(desktop-enable t nil (desktop))
 '(global-font-lock-mode t nil (font-lock))
 '(inhibit-eol-conversion t)
 '(save-place t nil (saveplace))
 '(transient-mark-mode t)
 '(uniquify-buffer-name-style (quote forward) nil (uniquify)))
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 )


(defun no-junk-please-were-unixish ()
  (let ((coding-str (symbol-name buffer-file-coding-system)))
	(when (string-match "-\\(?:dos\\|mac\\)$" coding-str)
	  (setq coding-str
	        (concat (substring coding-str 0 (match-beginning 0)) "-unix"))
	  (message "CODING: %s" coding-str)
	  (set-buffer-file-coding-system (intern coding-str)) )))

(add-hook 'find-file-hooks 'no-junk-please-were-unixish)


;; Session save
;(desktop-save-mode 1)
(desktop-load-default)
(setq history-length 250)
(add-to-list 'desktop-globals-to-save 'file-name-history);
(desktop-read)
;(setq desktop-enable t)