From 50332d9f3243826696d9bbee269e7e4488e647d6 Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Sat, 17 Oct 2015 10:43:06 +0200 Subject: [PATCH] Removing emacs configuration. --- .bash_aliases | 1 - .bashrc | 2 +- .emacs.d/init.el | 12 - .emacs.d/lisp/modes.el | 34 --- .emacs.d/lisp/std_comment.el | 477 ----------------------------------- 5 files changed, 1 insertion(+), 525 deletions(-) delete mode 100755 .emacs.d/init.el delete mode 100644 .emacs.d/lisp/modes.el delete mode 100644 .emacs.d/lisp/std_comment.el diff --git a/.bash_aliases b/.bash_aliases index e062d6a..0acfc87 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -6,6 +6,5 @@ alias l='ll -A' alias sudo='sudo ' alias grep='grep -n --color=auto' alias j='jobs' -alias ne='emacs' alias df='df -h' alias lock='xscreensaver-command --lock' diff --git a/.bashrc b/.bashrc index 9ba77fe..ab4cb27 100644 --- a/.bashrc +++ b/.bashrc @@ -9,7 +9,7 @@ shopt -s checkwinsize shopt -s histappend export HISTCONTROL=ignoredups export CLICOLOR=1 -export EDITOR='emacs' +export EDITOR='vim' export PAGER='less' export USER_NICKNAME="Rodolphe Breard" export DEBEMAIL="packages+deb@what.tf" diff --git a/.emacs.d/init.el b/.emacs.d/init.el deleted file mode 100755 index 17c3dce..0000000 --- a/.emacs.d/init.el +++ /dev/null @@ -1,12 +0,0 @@ -(add-to-list 'load-path "/usr/share/emacs/site-lisp") -(add-to-list 'load-path "~/.emacs.d/lisp") - -(load "modes.el") -(load "std_comment.el") - -(setq column-number-mode t) -(setq x-alt-keysym 'meta) - -(setq-default indent-tabs-mode nil) -(setq-default tab-width 4) -(setq indent-line-function 'insert-tab) diff --git a/.emacs.d/lisp/modes.el b/.emacs.d/lisp/modes.el deleted file mode 100644 index 69f3f7f..0000000 --- a/.emacs.d/lisp/modes.el +++ /dev/null @@ -1,34 +0,0 @@ -;; Python -(autoload 'python-mode "python-mode.el" "Python mode." t) -(setq auto-mode-alist (append '(("/*.\.python$" . python-mode)) auto-mode-alist)) -(setq auto-mode-alist (append '(("/*.\.py$" . python-mode)) auto-mode-alist)) - -;; RUST -(autoload 'rust-mode "rust-mode" "Rust editing mode." t) -(setq auto-mode-alist (cons '("\.rs$" . rust-mode) auto-mode-alist)) - -;; Toml -(setq auto-mode-alist (cons '("\.toml$" . conf-mode) auto-mode-alist)) - -;; LUA -(autoload 'lua-mode "lua-mode" "Lua editing mode." t) -(setq auto-mode-alist (cons '("\.lua$" . lua-mode) auto-mode-alist)) - -;; PHP -(autoload 'php-mode "php-mode.el" "Php mode." t) -(setq auto-mode-alist (append '(("/*.\.php[0-9]?$" . php-mode)) auto-mode-alist)) - -;; MarkDown -(autoload 'markdown-mode "markdown-mode.el" "Markdown mode." t) -(setq auto-mode-alist (cons '("\.markdown$" . markdown-mode) auto-mode-alist)) -(setq auto-mode-alist (cons '("\.mdwn$" . markdown-mode) auto-mode-alist)) -(setq auto-mode-alist (cons '("\.mdt$" . markdown-mode) auto-mode-alist)) -(setq auto-mode-alist (cons '("\.md$" . markdown-mode) auto-mode-alist)) - -;; JSON -(setq auto-mode-alist (cons '("\.json$" . js-mode) auto-mode-alist)) -(setq auto-mode-alist (cons '("\.geojson$" . js-mode) auto-mode-alist)) - -;; HTML -(setq auto-mode-alist (cons '("\.template$" . html-mode) auto-mode-alist)) -(setq auto-mode-alist (cons '("\.tpl$" . html-mode) auto-mode-alist)) diff --git a/.emacs.d/lisp/std_comment.el b/.emacs.d/lisp/std_comment.el deleted file mode 100644 index efba355..0000000 --- a/.emacs.d/lisp/std_comment.el +++ /dev/null @@ -1,477 +0,0 @@ -;; -;; std_comment.el for Emacs in ~/.emacs.d -;; -;; Made by Frederic Denis -;; Improved by Rodolphe Breard -;; -;; Based on Comment routines by Isaac -;; - -(global-set-key "" 'do_insert_time) -(global-set-key "" 'std-file-header) - -(setq header-copyright "Copyright (c) ") -(if (setq user-nickname (getenv "USER_NICKNAME")) - t - (setq user-nickname (user-full-name)) - ) - -(setq std-c-alist '( (cs . "/*") (cc . " * ") (ce . " */") ) - std-css-alist '( (cs . "/*") (cc . "** ") (ce . "*/") ) - std-cpp-alist '( (cs . "//") (cc . "// ") (ce . "//") ) - std-pov-alist '( (cs . "//") (cc . "// ") (ce . "//") ) - std-python-alist '( (cs . "#") (cc . "# ") (ce . "#") ) - std-java-alist '( (cs . "//") (cc . "// ") (ce . "//") ) - std-javascript-alist '( (cs . "//") (cc . "// ") (ce . "//") ) - std-rust-alist '( (cs . "//") (cc . "// ") (ce . "//") ) - std-latex-alist '( (cs . "%%") (cc . "%% ") (ce . "%%") ) - std-lisp-alist '( (cs . ";;") (cc . ";; ") (ce . ";;") ) - std-xdefault-alist '( (cs . "!!") (cc . "!! ") (ce . "!!") ) - std-pascal-alist '( (cs . "{ ") (cc . " ") (ce . "}" ) ) - std-makefile-alist '( (cs . "##") (cc . "## ") (ce . "##") ) - std-markdown-alist '( (cs . "") ) - std-text-alist '( (cs . "##") (cc . "## ") (ce . "##") ) - std-fundamental-alist '( (cs . " ") (cc . " ") (ce . " ") ) - std-html-alist '( (cs . "")) - std-php-alist '( (cs . ".\n") - ) - -(setq license-agpl - '("This program is free software: you can redistribute it and/or modify\n" - "it under the terms of the GNU Affero General Public License as published by\n" - "the Free Software Foundation, either version 3 of the License, or\n" - "(at your option) any later version.\n" - "\n" - "This program is distributed in the hope that it will be useful,\n" - "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" - "GNU Affero General Public License for more details.\n" - "\n" - "You should have received a copy of the GNU Affero General Public License\n" - "along with this program. If not, see .\n" - "\n") - ) - -(setq license-lgpl - '("This library is free software; you can redistribute it and/or\n" - "modify it under the terms of the GNU Lesser General Public\n" - "License as published by the Free Software Foundation; either\n" - "version 3 of the License, or (at your option) any later version.\n" - "\n" - "This library is distributed in the hope that it will be useful,\n" - "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n" - "Lesser General Public License for more details.\n" - "\n" - "You should have received a copy of the GNU General Public License\n" - "along with this program. If not, see .\n") - ) - -(setq license-fdl - '("Permission is granted to copy, distribute and/or modify this document\n" - "under the terms of the GNU Free Documentation License, Version 1.3\n" - "or any later version published by the Free Software Foundation;\n" - "with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.\n" - "A copy of the license is included in the section entitled \"GNU\n" - "Free Documentation License\".\n") - ) - -(setq license-apache - '("Licensed under the Apache License, Version 2.0 (the \"License\");\n" - "you may not use this file except in compliance with the License.\n" - "You may obtain a copy of the License at\n" - "\n" - " http://www.apache.org/licenses/LICENSE-2.0\n" - "\n" - "Unless required by applicable law or agreed to in writing, software\n" - "distributed under the License is distributed on an \"AS IS\" BASIS,\n" - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" - "See the License for the specific language governing permissions and\n" - "limitations under the License.\n") - ) - -(setq license-bsd - '("Redistribution and use in source and binary forms, with or without\n" - "modification, are permitted provided that the following conditions are\n" - "met:\n" - "\n" - " 1. Redistributions of source code must retain the above copyright\n" - " notice, this list of conditions and the following disclaimer.\n" - "\n" - " 2. Redistributions in binary form must reproduce the above copyright\n" - " notice, this list of conditions and the following disclaimer in the\n" - " documentation and/or other materials provided with the distribution.\n" - "\n" - " 3. The name of the author may not be used to endorse or promote\n" - " products derived from this software without specific prior written\n" - " permission.\n" - "\n" - "THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n" - "IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n" - "WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n" - "DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,\n" - "INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n" - "(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n" - "SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n" - "HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n" - "STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\n" - "IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n" - "POSSIBILITY OF SUCH DAMAGE.\n") - ) - -(setq license-isc - '("Permission to use, copy, modify, and/or distribute this software for any\n" - "purpose with or without fee is hereby granted, provided that the above\n" - "copyright notice and this permission notice appear in all copies.\n" - "\n" - "THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n" - "WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n" - "MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n" - "ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n" - "WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n" - "ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n" - "OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n") - ) - -(setq license-mit - '("Permission is hereby granted, free of charge, to any person obtaining a copy\n" - "of this software and associated documentation files (the \"Software\"), to deal\n" - "in the Software without restriction, including without limitation the rights\n" - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n" - "copies of the Software, and to permit persons to whom the Software is\n" - "furnished to do so, subject to the following conditions:\n" - "\n" - "The above copyright notice and this permission notice shall be included in\n" - "all copies or substantial portions of the Software.\n" - "\n" - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n" - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n" - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n" - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n" - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n" - "THE SOFTWARE.\n") - ) - -(setq license-cecill - '("This software is governed by the CeCILL license under French law and\n" - "abiding by the rules of distribution of free software. You can use,\n" - "modify and/ or redistribute the software under the terms of the CeCILL\n" - "license as circulated by CEA, CNRS and INRIA at the following URL\n" - "\"http://www.cecill.info\".\n" - "\n" - "As a counterpart to the access to the source code and rights to copy,\n" - "modify and redistribute granted by the license, users are provided only\n" - "with a limited warranty and the software's author, the holder of the\n" - "economic rights, and the successive licensors have only limited\n" - "liability.\n" - "\n" - "In this respect, the user's attention is drawn to the risks associated\n" - "with loading, using, modifying and/or developing or reproducing the\n" - "software by the user in light of its specific status of free software,\n" - "that may mean that it is complicated to manipulate, and that also\n" - "therefore means that it is reserved for developers and experienced\n" - "professionals having in-depth computer knowledge. Users are therefore\n" - "encouraged to load and test the software's suitability as regards their\n" - "requirements in conditions enabling the security of their systems and/or\n" - "data to be ensured and, more generally, to use and operate it in the \n" - "same conditions as regards security.\n" - "\n" - "The fact that you are presently reading this means that you have had\n" - "knowledge of the CeCILL license and that you accept its terms.\n") - ) - -(setq license-cecill-b - '("This software is governed by the CeCILL-B license under French law and\n" - "abiding by the rules of distribution of free software. You can use,\n" - "modify and/ or redistribute the software under the terms of the CeCILL-B\n" - "license as circulated by CEA, CNRS and INRIA at the following URL\n" - "\"http://www.cecill.info\".\n" - "\n" - "As a counterpart to the access to the source code and rights to copy,\n" - "modify and redistribute granted by the license, users are provided only\n" - "with a limited warranty and the software's author, the holder of the\n" - "economic rights, and the successive licensors have only limited\n" - "liability.\n" - "\n" - "In this respect, the user's attention is drawn to the risks associated\n" - "with loading, using, modifying and/or developing or reproducing the\n" - "software by the user in light of its specific status of free software,\n" - "that may mean that it is complicated to manipulate, and that also\n" - "therefore means that it is reserved for developers and experienced\n" - "professionals having in-depth computer knowledge. Users are therefore\n" - "encouraged to load and test the software's suitability as regards their\n" - "requirements in conditions enabling the security of their systems and/or\n" - "data to be ensured and, more generally, to use and operate it in the \n" - "same conditions as regards security.\n" - "\n" - "The fact that you are presently reading this means that you have had\n" - "knowledge of the CeCILL-B license and that you accept its terms.\n") - ) - -(setq license-cecill-c - '("This software is governed by the CeCILL-C license under French law and\n" - "abiding by the rules of distribution of free software. You can use,\n" - "modify and/ or redistribute the software under the terms of the CeCILL-C\n" - "license as circulated by CEA, CNRS and INRIA at the following URL\n" - "\"http://www.cecill.info\".\n" - "\n" - "As a counterpart to the access to the source code and rights to copy,\n" - "modify and redistribute granted by the license, users are provided only\n" - "with a limited warranty and the software's author, the holder of the\n" - "economic rights, and the successive licensors have only limited\n" - "liability.\n" - "\n" - "In this respect, the user's attention is drawn to the risks associated\n" - "with loading, using, modifying and/or developing or reproducing the\n" - "software by the user in light of its specific status of free software,\n" - "that may mean that it is complicated to manipulate, and that also\n" - "therefore means that it is reserved for developers and experienced\n" - "professionals having in-depth computer knowledge. Users are therefore\n" - "encouraged to load and test the software's suitability as regards their\n" - "requirements in conditions enabling the security of their systems and/or\n" - "data to be ensured and, more generally, to use and operate it in the \n" - "same conditions as regards security.\n" - "\n" - "The fact that you are presently reading this means that you have had\n" - "knowledge of the CeCILL-C license and that you accept its terms.\n") - ) - -(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 "titi")) - (setq license (read-from-minibuffer - (format "License ? : "))) - (setq location (getenv "PWD")) - - (insert-string (std-get 'cs)) - (newline) - (insert-string (concat (std-get 'cc) - header-copyright - (format-time-string "%Y" (current-time)) - " " - user-nickname)) - (newline) - (setq ltow nil) - (if (string= license "gpl") - (setq ltow license-gpl3)) - (if (string= license "gpl3") - (setq ltow license-gpl3)) - (if (string= license "gpl2") - (setq ltow license-gpl2)) - (if (string= license "agpl") - (setq ltow license-agpl)) - (if (string= license "lgpl") - (setq ltow license-lgpl)) - (if (string= license "fdl") - (setq ltow license-fdl)) - (if (string= license "apache") - (setq ltow license-apache)) - (if (string= license "bsd") - (setq ltow license-bsd)) - (if (string= license "isc") - (setq ltow license-isc)) - (if (string= license "mit") - (setq ltow license-mit)) - (if (string= license "cecill") - (setq ltow license-cecill)) - (if (string= license "cecill-b") - (setq ltow license-cecill-b)) - (if (string= license "cecill-c") - (setq ltow license-cecill-c)) - (if (string= license "beer") - (setq ltow license-beer)) - (if ltow - (progn - (insert-string (std-get 'cc)) - (newline) - (while ltow - (insert-string (concat (std-get 'cc) - (car ltow))) - (setq ltow (cdr ltow))) - ;(insert-string (std-get 'ce)) - ;(newline) - )) - (insert-string (std-get 'ce)) - (newline))) - - -(defun insert-std-vertical-comments () - "Inserts vertical comments (according to mode)." - (interactive) - (beginning-of-line) - (insert-string (std-get 'cs)) - (newline) - (let ((ok t)(comment "")) - (while ok - (setq comment (read-from-minibuffer - (format "Type comment (RETURN to quit) : "))) - (if (= 0 (length comment)) - (setq ok nil) - (progn - (insert-string (concat (std-get 'cc) comment)) - (newline))))) - (insert-string (std-get 'ce)) - (newline)) - -(defun std-toggle-comment () - "Toggles line comment on or off (according to mode)." - (interactive) - (save-excursion - (let (beg end) - (beginning-of-line) - (setq beg (point)) - (end-of-line) - (setq end (point)) - (save-restriction - (if (not (equal beg end)) - (progn - (narrow-to-region beg end) - (goto-char beg) - (if (search-forward (std-get 'cs) end t) - (progn - (beginning-of-line) - (replace-string (std-get 'cs) "") - (replace-string (std-get 'ce) "")) - (progn - (beginning-of-line) - (insert-string (std-get 'cs)) - (end-of-line) - (insert-string (std-get 'ce))))))))) - ;; (indent-according-to-mode) - (indent-for-tab-command) - (next-line 1)) - -;;;; Generating local keymaps for exotics modes. - -;;; In CPerl mode, C-c C-h is used to do some help. -;;; so it is C-c C-h h -;;; For working, it requires info pages about perl -(add-hook 'cperl-mode-hook - '(lambda () - (define-key cperl-mode-map "" - 'comment-region) - (define-key cperl-mode-map "h" - 'std-file-header))) - -;; for perl-mode -(add-hook 'perl-mode-hook - '(lambda () - (define-key perl-mode-map "" - 'comment-region))) - -;; for all kind of lisp code -(add-hook 'emacs-lisp-mode-hook - '(lambda () - (define-key emacs-lisp-mode-map "" - 'comment-region))) - -(add-hook 'lisp-mode-hook - '(lambda () - (define-key lisp-mode-map "" - 'comment-region))) - - - -;; for La(TeX)-mode -(add-hook 'tex-mode-hook - '(lambda () - (define-key tex-mode-map "" - 'comment-region))) -