diff --git a/installation/.files/.emacs b/installation/.files/.emacs index 4e35c13..2081a3e 100644 --- a/installation/.files/.emacs +++ b/installation/.files/.emacs @@ -1,11 +1,6 @@ -(setq emacs-lisp-dir "~/.emacs.d/" - my-elmode-dir (concat emacs-lisp-dir "elmodes/")) -(setq load-path - (append load-path (list my-elmode-dir))) - -(add-to-list 'load-path "~/.emacs.d/epitech") - +;; ---------------------------------- +;; EPITECH CONFIG +;; ---------------------------------- +(add-to-list 'load-path "~/.emacs.d/lisp") (load "std.el") (load "std_comment.el") -(if (file-exists-p "~/.myemacs") - (load-file "~/.myemacs")) diff --git a/installation/.files/.emacs.d/epitech/std.el b/installation/.files/.emacs.d/epitech/std.el index 2dbb6ea..447233c 100644 --- a/installation/.files/.emacs.d/epitech/std.el +++ b/installation/.files/.emacs.d/epitech/std.el @@ -1,21 +1,21 @@ ;; -;; div.el for emacs conf in site-local -;; -;; Made by Nicolas Sadirac -;; Login -;; -;; Started on Sun Oct 17 02:20:57 1993 Nicolas Sadirac -;; Last update Thu Jul 8 12:47:38 2010 root +;; EPITECH PROJECT, 2017 +;; emacs configuration +;; File description: +;; global emacs configuration to help students ;; -(defun do_insert_time () - (interactive) - (insert-string (current-time-string))) (set-variable 'c-argdecl-indent 0) - (normal-erase-is-backspace-mode 0) +; Define keyboard shortcuts (global-set-key "" 'backward-delete-char) (global-set-key "" 'compile) (global-set-key "" 'goto-line) + +; Adjust indentation settings +(setq c-default-style "linux" + c-basic-offset 8 + tab-width 8 + indent-tabs-mode t) diff --git a/installation/.files/.emacs.d/epitech/std_comment.el b/installation/.files/.emacs.d/epitech/std_comment.el index 700c6ce..99c0d03 100644 --- a/installation/.files/.emacs.d/epitech/std_comment.el +++ b/installation/.files/.emacs.d/epitech/std_comment.el @@ -1,41 +1,13 @@ ;; -;; StdComment.el for Emacs in ~/Emacs -;; -;; Made by Frederic Denis -;; Login -;; -;; Started on Thu Sep 9 23:34:05 1993 Frederic Denis -;; Last update Tue Nov 29 18:42:22 2016 Paul Montague +;; EPITECH PROJECT, 2017 +;; emacs configuration +;; File description: +;; standard epitech header configuration ;; -;; Based on Comment routines by Isaac -;; - -(if (file-exists-p "/usr/school/etc/emacs/php-mode.el") - (load-file "/usr/school/etc/emacs/php-mode.el")) -(add-to-list 'auto-mode-alist (cons "\\.php[0-9]*$" 'php-mode)) - -(global-set-key "h" 'update-std-header) -(global-set-key "" 'do_insert_time) (global-set-key "" 'std-file-header) - - -(setq header-made-by "Made by " - header-login "Login " - header-login-beg "<" - header-login-mid "" - header-login-end ">" - header-started "Started on " - header-last "Last update " - header-for " for " - header-in " in " - domaine-name "") -(if (setq user-nickname (getenv "USER_NICKNAME")) - t - (setq user-nickname (user-full-name)) -) - -(setq write-file-hooks (cons 'update-std-header write-file-hooks)) +(setq header-epitech "EPITECH PROJECT, " + header-description "File description:") (setq std-c-alist '( (cs . "/*") (cc . "** ") (ce . "*/") ) std-css-alist '( (cs . "/*") (cc . "** ") (ce . "*/") ) @@ -91,72 +63,33 @@ (cdr (assoc a (eval (cdr (assoc mode-name std-modes-alist))))) ) -(defun update-std-header () - "Updates std header with last modification time & owner.\n(According to mode)" - (interactive) - (save-excursion - (if (buffer-modified-p) - (progn - (goto-char (point-min)) - (if (search-forward header-last nil t) - (progn -; (delete-region (point-at-bol) (point-at-eol)) - (delete-region - (progn (beginning-of-line) (point)) - (progn (end-of-line) (point))) - (insert-string (concat (std-get 'cc) - header-last - (current-time-string) - " " - user-nickname)) - (message "Last modification header field updated.")))))) - nil) - (defun std-file-header () "Puts a standard header at the beginning of the file.\n(According to mode)" (interactive) (goto-char (point-min)) - (let ((projname "toto")(location "tiuti")) + (let ((projname "toto")(projdescription "tiuti")) (setq projname (read-from-minibuffer (format "Type project name (RETURN to quit) : "))) - (setq location (getenv "PWD")) + (setq projdescription (read-from-minibuffer + (format "Type short file description (RETURN to quit) : "))) (insert-string (std-get 'cs)) (newline) (insert-string (concat (std-get 'cc) - (buffer-name) - header-for - projname - header-in - location)) - (newline) - (insert-string (std-get 'cc)) - (newline) - (insert-string (concat (std-get 'cc) header-made-by user-nickname)) + header-epitech + (format-time-string "%Y"))) (newline) (insert-string (concat (std-get 'cc) - header-login - header-login-beg - (getenv "USER") - header-login-mid - domaine-name - header-login-end)) - (newline) - (insert-string (std-get 'cc)) + projname)) (newline) (insert-string (concat (std-get 'cc) - header-started - (current-time-string) - " " - user-nickname)) + header-description)) (newline) (insert-string (concat (std-get 'cc) - header-last - (current-time-string) - " " - user-nickname)) + projdescription)) (newline) (insert-string (std-get 'ce)) + (newline) (newline))) (defun insert-std-vertical-comments ()