Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > contrib-backports-src > by-pkgid > 3c59355781f2b6a606a6ecac05d6cf7d > files > 18

emacs-snapshot-23.0.95-2mdv2009.1.src.rpm

;;; Mandriva Linux Configuration for GNU/Emacs.
; Chmouel Boudjnah <chmouel@mandriva.com>
; Pixel <pixel@mandriva.com>
; Frederic Lepied <flepied@mandriva.com>

; See http://www.emacs.org/ for more information and configuration
; examples.

;; Macros to detect if we are under X.
(defmacro Xlaunch (&rest x) (list 'if (eq window-system 'x)(cons 'progn x)))

; Under X to get the suppr key working.
(Xlaunch (define-key global-map [(delete)] "\C-d"))

;;; XEmacs compatibility
(global-set-key [(control tab)] `other-window)
(global-set-key [(meta g)] `goto-line)
(defun switch-to-other-buffer () (interactive) (switch-to-buffer (other-buffer)))
(global-set-key [(meta control ?l)] `switch-to-other-buffer)
(global-set-key [(meta O) ?H] 'beginning-of-line)
(global-set-key [(meta O) ?F] 'end-of-line)

; Don't add lines on the end of lines unless we want.
(setq next-line-add-newlines nil)

; X selection manipulation
(defun x-own-selection (s) (x-set-selection `PRIMARY s))
(global-set-key [(shift insert)] '(lambda () (interactive) (insert (x-get-selection))))
(global-set-key [(control insert)] '(lambda () (interactive) 
				      (x-own-selection (buffer-substring (point) (mark)))))

;; Show parenthesis mode
(show-paren-mode t)

;; By default start in text mode.
(setq default-major-mode (lambda () (text-mode) (font-lock-mode)))
;; One may want to disable auto-fill through (remove-hook 'text-mode-hook 'turn-on-auto-fill)
(add-hook 'text-mode-hook 'turn-on-auto-fill)

; Don't ask to revert for TAGS
(setq revert-without-query (cons "TAGS" revert-without-query))

;; Use the following for i18n
;(standard-display-european t)
;(set-language-environment "latin-1")

;; Color and Fonts.
(require 'font-lock)
(setq font-lock-mode-maximum-decoration t)

;; turn on colorization.
(if (fboundp 'global-font-lock-mode) (global-font-lock-mode t))

;; turn on auto (de)compression
(if (fboundp 'auto-compression-mode) (auto-compression-mode t))

;; Turn on selection and change the default color
(setq transient-mark-mode 't highlight-nonselected-windows 't)

;; Save positions in files between sessions
(require 'saveplace)
(setq-default save-place t)

;; Use aspell by default
(setq-default ispell-program-name "aspell")

;; Load package or local system startup files
(let* ((paths '("/etc/emacs/site-start.d"))
         ;; Get a list of all the files in all the specified
         ;; directories that match the pattern.
       (files
	(apply 'append 
	       (mapcar 
		(lambda (dir) 
		  (directory-files dir t "^.*\\.el$" nil))
		paths))))
  (mapcar
   (lambda (file)
     (if debug-on-error
	 (load-file file)
       (condition-case ()
	   (load file nil)
	 (error (message "Error while loading %s" file)))))
   files)
  )

;; More information with the info file (Control-h i)