;; ------ ;; emacs/xemacs configuration. ;; ------ (defvar HOME (expand-file-name "~")) (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) (defvar os_gnu (string-match "gnu" (symbol-name system-type))) ;; "gnu" GNU Linux or GNU Hurd (defvar os_linux (string-match "linux" (symbol-name system-type))) ;; "gnu/linux" (defvar os_bsd (string-match "berkeley-unix" (symbol-name system-type))) ;; "berkeley-unix" BSD (defvar os_apple (string-match "darwin" (symbol-name system-type))) ;; "darwin" (defvar os_windows (string-match "windows" (symbol-name system-type))) ;; "windows-nt" (setq EMACS "emacs") (cond (running-xemacs (setq EMACS "XEmacs"))) (setq HOSTNAME (substring (system-name) 0 (string-match "\\." (system-name)))) (cond (os_apple (setq HOSTNAME "mac"))) ;; Apple changes hostname (setq FULLHOSTNAME (system-name)) (setq USERNAME (getenv "USER")) (cond ((not running-xemacs) (setq inhibit-splash-screen t))) ;; disable emacs splash ;; ------ ;; Load macros, set library path. ;; Put your custom Lisp files in ~/.emacs-lisp/ ;; ------ (load-file "~/.emacs-macros") (setq load-path (cons "~/.emacs-lisp/" load-path)) ;; prepend ;; ------ ;; Redefine/remap keys. ;; ------ ;; See Init Rebinding (see Help / Read the Emacs Manual or C-h r) (global-set-key (kbd "C-M-k") 'delete-region) ;; delete region without affecting kill buffer (global-set-key [delete] 'delete-char) ;; map delete (global-set-key [S-delete] 'delete-char) ;; remap Shift-Delete ;;(global-set-key [S-delete] 'kill-word) ;; remap Shift-Delete (global-set-key [home] 'beginning-of-line) ;; emacs-23.3 Apple (global-set-key [C-home] 'beginning-of-buffer) ;; emacs-23.3 Apple (global-set-key [end] 'end-of-line) ;; emacs-23.3 Apple (global-set-key [C-end] 'end-of-buffer) ;; emacs-23.3 Apple (global-set-key [f1] 'revert-buffer) (global-set-key [f12] 'goto-line) ;;(global-set-key [f10] 'jimb-camel) (global-set-key "\C-x\C-d" 'dired) ;; disable List Directory Brief (global-set-key "\M-^" 'query-replace) ;; remap wrong key (global-set-key "\M-$" 'query-replace) ;; remap wrong key (global-set-key "\C-xf" 'find-file) ;; remap wrong key (global-set-key "\C-\\" 'undo) ;; emacs defines C-/ as undo but map to backslash for me (setq delete-key-deletes-forward 1) (global-unset-key [begin]) ;; disable Numpad 5 going to beginning of buffer (cond ((not running-xemacs) (normal-erase-is-backspace-mode 0) )) ;; fix backspace (cond (os_apple ;; Map meta=opt=cmd (setq mac-option-key-is-meta nil) (setq mac-command-key-is-meta t) (setq mac-command-modifier 'meta) (setq mac-option-modifier 'meta) (global-set-key [kp-delete] 'delete-char) ;; Use numpad as cursor (requires pressing meta too unfortunately). (global-set-key "\M-8" 'previous-line) (global-set-key "\M-2" 'next-line) (global-set-key "\M-6" 'forward-char) (global-set-key "\M-4" 'backward-char) (global-set-key "\M-7" 'beginning-of-line) (global-set-key "\M-1" 'end-of-line) (global-set-key "\M-9" 'beginning-of-buffer) (global-set-key "\M-3" 'end-of-buffer))) ;; ----- ;; Tabs ;; ----- (setq default-tab-width 4) (setq-default tab-width 4) ;; ------ ;; Misc. ;; ------ (setq make-backup-files nil) ;; disable auto backup (setq vc-handled-backends nil) ;; disable version-control modes (setq column-number-mode 1) (setq line-number-mode 1) (setq-default truncate-lines t) ;; truncate lines (t:truncate nil:wrap) (setq visible-bell 1) (global-subword-mode 1) ;; move/delete in terms of words including camel-back words (setq default-frame-alist '((vertical-scroll-bars . right))) (setq transient-mark-mode t) ;; so that marking a region will be hilited (standard-display-ascii ?\r "") ;; suppress emacs showing ^M at DOS end-of-line. (cond ((not running-xemacs) (tool-bar-mode 0) )) ;; disable toolbar (setq save-abbrevs nil) ;; disable annoying "Save abbrevs" popup (setq-default speedbar-show-unknown-files t) ;;(global-hl-line-mode 1) ;; highlight line the cursor is on (put 'narrow-to-region 'disabled nil) ;; allow narrow editing ;; ------ ;; Limit frame splitting to horizontal frames: ;; ------ ;; Allows more than two horizontal frames: ;;(setq split-height-threshold 0) (setq split-width-threshold 0) ;; prevent vertical split (force horizontal panes) ;; Limits number of horizontal frames to two: (setq split-width-threshold most-positive-fixnum) ;; prevent split to vertical frames and limit to two frames hopefully ;; ------ ;; Display time. ;; ------ ;;(setq display-time-day-and-date t) ;;;;(setq display-time-24hr-format nil) ;;(display-time) ;; ------ ;; Enable blinking matching parenthesis. ;; The previous changes to the mode maps disable blinking. ;; ------ (cond (running-xemacs (paren-set-mode " ") ;; paren-set-mode is a multi-way toggle, arg is N/A )) (cond ((not running-xemacs) (show-paren-mode 1) )) ;; ------ ;; Colors. ;; ------ (cond ((not running-xemacs) ;; mouse selection and search match (set-face-foreground 'region "white") (set-face-background 'region "red") )) ;; Hilite colors. (cond ((fboundp 'global-font-lock-mode) ;; Customize face attributes (setq font-lock-face-attributes ;; Symbol-for-Face Foreground Background Bold Italic Underline '((font-lock-comment-face "DarkGreen") ;;(font-lock-string-face "Sienna") ;;(font-lock-keyword-face "RoyalBlue") ;;(font-lock-function-name-face "Blue") ;;(font-lock-variable-name-face "Black") ;;(font-lock-type-face "Black") ;;(font-lock-reference-face "Purple") )) ;; Load the font-lock package. (require 'font-lock) ;; Maximum colors (setq font-lock-maximum-decoration t) ;; Turn on font-lock in all modes that support it (global-font-lock-mode t) )) ;; ------ ;; Wheel mouse. ;; ------ (global-set-key [mouse-4] 'scroll-down) (global-set-key [mouse-5] 'scroll-up) ;; ----- ;; Show filename in titlebar. ;; ----- ;; %f=filename %b=buffer name (setq frame-title-format `(,EMACS "["USERNAME "@" HOSTNAME "]: " (buffer-file-name "%f" (dired-directory dired-directory "%b")))) ;; ----- ;; dired ;; ----- (add-hook 'dired-load-hook (function (lambda () (load "dired-x") ;; Set dired-x global variables here. ))) (add-hook 'dired-mode-hook (function (lambda () ;; Set dired-x buffer-local variables here. ;; Files that direx should exclude/ignore: ;; (Despite docs, do not use concat, rather, combine as one regex) (setq dired-omit-files-p t) (setq dired-omit-files ".svn\\|.*[.]pyc\\|.*[.]rule") ))) ;;------- ;; Color/font settings (unless in text-mode). ;; These lines are ORDER-DEPENDENT. ;;------- ;;(if (getenv "DISPLAY") ;; if X is running (setq default-frame-alist '( ;; ~/.Xresources and ~/.emacs should use same geometry/font to avoid window resize quirks. (width . 110) (height . 44) ;;(cursor-type . box) ) ) ;;(if (string-match "" (getenv "EMACS_COLOR")) ;; (setq default-frame-alist ;; (append default-frame-alist ;; '((background-color . "gray") ;; (foreground-color . "darkblue") ;; ))) ;;) ;;(cond ((string-match "blue" (getenv "EMACS_COLOR"))) ;; ((setq default-frame-alist ;; (append default-frame-alist ;; '(background-color . "blue4") ;; (foreground-color . "Wheat") ;; )))) (setq EMACS_COLOR (getenv "EMACS_COLOR")) ;; EMACS_COLOR must be a string rather than nil (unless EMACS_COLOR (setq EMACS_COLOR "")) (cond ((string-match "sky" EMACS_COLOR) ;; not ltblue as blue will match (setq default-frame-alist (append default-frame-alist '((background-color . "deep sky blue") (foreground-color . "darkblue") (cursor-color . "white") (height . 64) (width . 140) ))) )) (cond ((string-match "blue" EMACS_COLOR) (setq default-frame-alist (append default-frame-alist '((background-color . "blue4") (foreground-color . "Wheat") (cursor-color . "cyan") (height . 64) (width . 140) ))) )) (cond ((string-match "wheat" EMACS_COLOR) (setq default-frame-alist (append default-frame-alist '((background-color . "wheat3") (foreground-color . "saddle brown") (cursor-color . "darkred") (height . 64) (width . 140) ))) )) (cond ((string-match "black" EMACS_COLOR) (setq default-frame-alist (append default-frame-alist '((background-color . "black") (foreground-color . "wheat") (cursor-color . "green") (height . 64) (width . 140) ))) )) (cond ((string-match "" EMACS_COLOR) ;; default is gray (setq default-frame-alist (append default-frame-alist '((background-color . "gray") (foreground-color . "black") (height . 64) (width . 140) ))) )) ;; (interactive) allows running the function from the command buffer. See Defining Commands in emacs info. (defun jimb-color-blue () (interactive) (set-background-color "darkblue") (set-foreground-color "wheat") (set-cursor-color "cyan")) (defun jimb-color-sky () (interactive) (set-background-color "deep sky blue") (set-foreground-color "darkblue") (set-cursor-color "white")) (defun jimb-color-gray () (interactive) (set-background-color "gray") (set-foreground-color "black") (set-cursor-color "darkred")) (defun jimb-color-black () (interactive) (set-background-color "black") (set-foreground-color "wheat") (set-cursor-color "green")) ;; Font configuration: ;; A shell alias is much better since window won't reshape at startup ;; and the shell can determine the OS and hostname more easily than emacs. ;; alias emacs='emacs -geometry 160x60+48+44 --font "-unknown-DejaVu Sans Mono-bold-normal-normal-*-12-*-*-*-m-0-iso10646-1"' ;; ;;(if (string-match "panther" HOSTNAME) ;; (cond (os_bsd (add-to-list 'default-frame-alist '(font . "-b&h-Luxi Mono-bold-normal-normal-*-13-*-*-*-*-0-iso10646-1")))) ;;) ;;(if (string-match "panther" HOSTNAME) ;; (cond (os_linux (add-to-list 'default-frame-alist '(font . "-unknown-DejaVu Sans Mono-bold-normal-normal-*-12-*-*-*-m-0-iso10646-1")))) ;;) ;;(if (string-match "cheetah" HOSTNAME) ;; (add-to-list 'default-frame-alist '(font . "-unknown-DejaVu Sans Mono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1")) ;;) ;;(cond (os_apple (add-to-list 'default-frame-alist '(font . "-unknown-Courier-normal-normal-normal-*-14-*-*-*-*")))) ;;(cond (os_windows (add-to-list 'default-frame-alist '(font . "-unknown-Consolas Bold-bold-bold-bold-*-14-*-*-*-*")))) ;; ============================================================================= ;; ------ ;; Programming languages by file extensions. ;; ------ (setq auto-mode-alist (cons '("GNUmakefile" . makefile-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("[Mm]akefile" . makefile-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.cmake" . text-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.glsl$" . c++-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.y$" . c-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.l$" . c-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.java.m4$" . java-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.lua$" . lua-mode) auto-mode-alist)) (autoload 'lua-mode "lua-mode" "Lua editing mode." t) (setq auto-mode-alist (cons '("\\.py.lua$" . pylua-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.pylua$" . pylua-mode) auto-mode-alist)) (autoload 'pylua-mode "pylua-mode" "pylua editing mode." t) (cond ((not running-xemacs) ;; Auto-update time-stamp of HTML. (autoload 'html-helper-mode "html-helper-mode" "HTML" t) (setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.php$" . html-helper-mode) auto-mode-alist)) (setq html-helper-do-write-file-hooks t) )) (cond (running-xemacs (setq auto-mode-alist (cons '("\\.php$" . html-mode) auto-mode-alist)))) ;; ------ ;; Configure modes. ;; Enable hiliting, disable auto-identation, ;; prevent modes redefining the keys tab/Enter/Backspace/Delete. ;; ------ (defun c-mode-jimb-star() (interactive) (insert "*")) (defun c-mode-jimb-slash() (interactive) (insert "/")) (defun c-mode-jimb-comma() (interactive) (insert ",")) (defun c-mode-jimb-colon() (interactive) (insert ":")) (defun c-mode-jimb-semicolon() (interactive) (insert ";")) (defun c-mode-jimb-paren-left() (interactive) (insert "(")) (defun c-mode-jimb-paren-right() (interactive) (insert ")")) (defun c-mode-jimb-brace-left() (interactive) (insert "{")) (defun c-mode-jimb-brace-right() (interactive) (insert "}")) (defun c-mode-jimb-angle-left() (interactive) (insert "<")) (defun c-mode-jimb-angle-right() (interactive) (insert ">")) (add-hook 'c-mode-common-hook '(lambda () (put 'c-indent-command 'disabled t) (define-key c-mode-map "\t" 'tab-to-tab-stop))) (add-hook 'c++-mode-common-hook '(lambda () (put 'c-indent-command 'disabled t) (define-key c++-mode-map "\t" 'tab-to-tab-stop))) (add-hook 'java-mode-common-hook '(lambda () (put 'c-indent-command 'disabled t) (define-key java-mode-map "\t" 'tab-to-tab-stop))) (add-hook 'perl-mode-common-hook '(lambda () (put 'perl-indent-command 'disabled t) (define-key perl-mode-map "\t" 'tab-to-tab-stop))) (add-hook 'cperl-mode-common-hook '(lambda () (put 'cperl-indent-command 'disabled t) (define-key cperl-mode-map "\t" 'tab-to-tab-stop))) (add-hook 'conf-mode-common-hook '(lambda () (put 'conf-indent-command 'disabled t) (define-key conf-mode-map "\t" 'tab-to-tab-stop))) ;; ------ ;; Text-mode hook. ;; ------ (defun text-mode-jimb-hook() (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120)) (setq indent-tabs-mode 'nil) ;; convert tabs to spaces (setq default-tab-width 4) (setq-default tab-width 4) (define-key text-mode-map "\t" 'tab-to-tab-stop) (define-key text-mode-map [backspace] 'delete-backward-char) ) (add-hook 'text-mode-hook 'text-mode-jimb-hook) ;; ------ ;; Conf-mode hook. ;; ------ (defun conf-mode-jimb-hook() (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120)) (setq indent-tabs-mode 'nil) ;; convert tabs to spaces (setq default-tab-width 4) (setq-default tab-width 4) (define-key conf-mode-map "\t" 'tab-to-tab-stop) (define-key conf-mode-map [backspace] 'delete-backward-char) ) (add-hook 'conf-mode-hook 'conf-mode-jimb-hook) ;; ------ ;; C mode hook. ;; ------ (defun c-mode-jimb-hook() (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120)) (setq indent-tabs-mode 'nil) ;; convert tabs to spaces (setq default-tab-width 4) (setq-default tab-width 4) (define-key c-mode-map "\t" 'tab-to-tab-stop) (define-key c-mode-map [backspace] 'delete-backward-char) ;; Prevent triggering indentation (electric-mode) when typing. (define-key c-mode-map "*" 'c-mode-jimb-star) (define-key c-mode-map "/" 'c-mode-jimb-slash) (define-key c-mode-map "," 'c-mode-jimb-comma) (define-key c-mode-map ":" 'c-mode-jimb-colon) (define-key c-mode-map ";" 'c-mode-jimb-semicolon) (define-key c-mode-map "(" 'c-mode-jimb-paren-left) (define-key c-mode-map ")" 'c-mode-jimb-paren-right) (define-key c-mode-map "{" 'c-mode-jimb-brace-left) (define-key c-mode-map "}" 'c-mode-jimb-brace-right) (define-key c-mode-map "<" 'c-mode-jimb-angle-left) (define-key c-mode-map ">" 'c-mode-jimb-angle-right) (define-key c-mode-map [M-right] 'c-forward-into-nomenclature) ;; jump across camel-backs (define-key c-mode-map [M-left] 'c-backward-into-nomenclature) (define-key c-mode-map "\ef" 'c-forward-into-nomenclature) (define-key c-mode-map "\eb" 'c-backward-into-nomenclature) ) (add-hook 'c-mode-hook 'c-mode-jimb-hook) ;; ------ ;; C++ mode hook. ;; ------ (defun c++-mode-jimb-hook() (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120)) (setq indent-tabs-mode 'nil) ;; convert tabs to spaces (setq default-tab-width 4) (setq-default tab-width 4) (define-key c++-mode-map "\t" 'tab-to-tab-stop) (define-key c++-mode-map [backspace] 'delete-backward-char) ;; Prevent triggering indentation (electric-mode) when typing. (define-key c++-mode-map "/" 'c-mode-jimb-slash) (define-key c++-mode-map "*" 'c-mode-jimb-star) (define-key c++-mode-map "," 'c-mode-jimb-comma) (define-key c++-mode-map ":" 'c-mode-jimb-colon) (define-key c++-mode-map ";" 'c-mode-jimb-semicolon) (define-key c++-mode-map "(" 'c-mode-jimb-paren-left) (define-key c++-mode-map ")" 'c-mode-jimb-paren-right) (define-key c++-mode-map "{" 'c-mode-jimb-brace-left) (define-key c++-mode-map "}" 'c-mode-jimb-brace-right) (define-key c++-mode-map "<" 'c-mode-jimb-angle-left) (define-key c++-mode-map ">" 'c-mode-jimb-angle-right) (define-key c++-mode-map [M-right] 'c-forward-into-nomenclature) ;; jump across camel-backs (define-key c++-mode-map [M-left] 'c-backward-into-nomenclature) (define-key c++-mode-map "\ef" 'c-forward-into-nomenclature) (define-key c++-mode-map "\eb" 'c-backward-into-nomenclature) ) (add-hook 'c++-mode-hook 'c++-mode-jimb-hook) ;; ------ ;; Java mode hook. ;; ------ (defun java-mode-jimb-hook() (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120)) (setq indent-tabs-mode 'nil) ;; convert tabs to spaces (setq default-tab-width 4) (setq-default tab-width 4) (define-key java-mode-map "\t" 'tab-to-tab-stop) (define-key java-mode-map [backspace] 'delete-backward-char) ;; Prevent triggering indentation (electric-mode) when typing. (define-key java-mode-map "/" 'c-mode-jimb-slash) (define-key java-mode-map "*" 'c-mode-jimb-star) (define-key java-mode-map "," 'c-mode-jimb-comma) (define-key java-mode-map ":" 'c-mode-jimb-colon) (define-key java-mode-map ";" 'c-mode-jimb-semicolon) (define-key java-mode-map "(" 'c-mode-jimb-paren-left) (define-key java-mode-map ")" 'c-mode-jimb-paren-right) (define-key java-mode-map "{" 'c-mode-jimb-brace-left) (define-key java-mode-map "}" 'c-mode-jimb-brace-right) (define-key java-mode-map "<" 'c-mode-jimb-angle-left) (define-key java-mode-map ">" 'c-mode-jimb-angle-right) (define-key java-mode-map [M-right] 'c-forward-into-nomenclature) ;; jump across camel-backs (define-key java-mode-map [M-left] 'c-backward-into-nomenclature) (define-key java-mode-map "\ef" 'c-forward-into-nomenclature) (define-key java-mode-map "\eb" 'c-backward-into-nomenclature) ) (add-hook 'java-mode-hook 'java-mode-jimb-hook) ;; ------ ;; Python mode hook. ;; ------ (defun python-mode-jimb-hook() (set-variable 'py-indent-offset 4) (set-variable 'py-smart-indentation nil) (set-variable 'indent-tabs-mode nil) ;; convert tabs to spaces ) (add-hook 'python-mode-hook 'python-mode-jimb-hook) ;; ------ ;; Lua mode and pylua mode hooks ;; To fully disable auto-indent, I had to modify ;; lua-indent-line() in lua-mode.el to check lua-electric-flag ;; ------ (defun lua-mode-jimb-hook() ;; Disable lua-mode's electric tabs (auto-ident) because it doesn't work perfectly. (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120)) (setq indent-tabs-mode nil) ;; convert tabs to spaces (setq default-tab-width 4) (setq-default tab-width 4) (define-key lua-mode-map "\t" 'tab-to-tab-stop) (lua-toggle-electric-state -1) ;; -1:disable (doesn't entirely disable electric mode) (set-variable 'indent-line-function (lambda ())) ;; disable electric keys such as ":" (see lua-mode.el) (set-variable 'lua-indent-level 4) ) (add-hook 'lua-mode-hook 'lua-mode-jimb-hook) ;;(defun pylua-mode-jimb-hook() ;; ;; Disable lua-mode's electric tabs (auto-ident) because it doesn't work perfectly. ;; (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120)) ;; (setq indent-tabs-mode 'nil) ;; convert tabs to spaces ;; (setq default-tab-width 4) ;; (setq-default tab-width 4) ;; (define-key pylua-mode-map "\t" 'tab-to-tab-stop) ;; (pylua-toggle-electric-state -1) ;; -1:disable (doesn't entirely disable electric mode) ;; (set-variable 'indent-line-function (lambda ())) ;; disable electric keys such as ":" (see pylua-mode.el) ;; (set-variable 'pylua-indent-level 4) ;;) ;;(add-hook 'pylua-mode-hook 'pylua-mode-jimb-hook) ;; Compile command. (cond (os_gnu (setq compile-command "make -j1 "))) (cond (os_bsd (setq compile-command "gmake -j1 "))) (cond (os_apple (setq compile-command "gmake -j1 "))) ;; Press C-w to mark/select a word under cursor. ;; http://xahlee.org/emacs/elisp_examples.html (defun mark-word-under-cursor() "Mark the word under cursor. “word” here is considered any alphanumeric sequence with “_” or “-”." (interactive) (let (pt) (skip-chars-backward "-_A-Za-z0-9") (setq pt (point)) (skip-chars-forward "-_A-Za-z0-9") (set-mark pt) )) (global-set-key (kbd "C-c w") (quote mark-word-under-cursor)) ;; Copy Word mnemonic (C-c C-w is reserved by most major modes) (global-set-key [f2] 'mark-word-under-cursor) ;; ============================================================================= ;; ------ ;; This was auto-added after typing N to migrate (stops nagging): ;; ------ (custom-set-variables '(load-home-init-file t t)) (custom-set-faces) ;; ------------------------------- ;; -- END OF USER-CONFIGURATION -- ;; -------------------------------