X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fcis-emacs;h=4137455171c73f3b7e26954ce6d873c5ab30c271;hb=8c1ceecd26d41af612337eb87f51fa1d353d6c8a;hp=65d7516bb839f9d93af2fd1959475b4146a3ed30;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage2/cis-emacs b/stage2/cis-emacs index 65d7516..4137455 100755 --- a/stage2/cis-emacs +++ b/stage2/cis-emacs @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,53 +9,44 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && - -# Saves CFLAGS and CXXFLAGS, and clears them. -save_flags_no_optimizations && +apply_patches ${1} -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ - --libexecdir=/usr/sbin && -make -j ${MAKEJOBS} bootstrap && -make install && - -# Restore original CFLAGS and CXXFLAGS values. -restore_flags && + --without-sound \ + --with-x=no \ + --without-dbus \ + --with-xpm=no \ + --with-jpeg=no \ + --with-png=no \ + --with-gif=no \ + --with-tiff=no \ + --without-rsvg \ + --libexecdir=/usr/sbin \ + --localstatedir=/var +make -j ${MAKEJOBS} bootstrap +make install cat > /etc/skel/.emacs << "EOF" ;; ~/.emacs ;; Emacs initialization file -;; Are we running XEmacs or Emacs? -(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) - -;;; Emacs Load Path -(setq load-path (cons "/usr/local/share/emacs/site-lisp" load-path)) - ;; Do not display a splash screen on startup (setq inhibit-splash-screen t) +;; Pour avoir les accents +(set-keyboard-coding-system 'utf-8) + ;; Set up the keyboard so the delete key on both the regular keyboard ;; and the keypad delete the character under the cursor and to the right ;; under X, instead of the default, backspace behavior. (global-set-key [delete] 'delete-char) (global-set-key [kp-delete] 'delete-char) -;; Pour avoir les accents -(set-keyboard-coding-system 'iso-8859-1) - ;; Turn on font-lock mode for Emacs -(cond ((not running-xemacs) - (global-font-lock-mode t) -)) - -;; Turn on font-lock mode for XEmacs -(cond (running-xemacs - (require 'font-lock) -)) +(global-font-lock-mode t) ;; Always end a file with a newline (setq require-final-newline t) @@ -64,10 +57,6 @@ cat > /etc/skel/.emacs << "EOF" ;; Replaces tabs in files with spaces (setq-default indent-tabs-mode nil) -;; Enable wheelmouse support by default -(mwheel-install) -(setq mwheel-follow-mouse t) - ;; Makes the compilation buffer always scrolls to follow ;; output as it comes in. (setq compilation-scroll-output t) @@ -75,33 +64,45 @@ cat > /etc/skel/.emacs << "EOF" ;;=========================================================== ;; Key bindings for compiling programs ;;=========================================================== +;; Must add helper function for the make also, otherwise +;; the first definition caused both F3 and F4 to execute "make clean". (defun compile-make-clean () (interactive) ;; can be called from kbd (compile "make clean")) -;; Must add helper function for the make also, otherwise -;; the first definition caused both F4 and F5 to execute "make clean". + (defun compile-make () (interactive) (compile "make")) -;; replace-string on F2 -(global-set-key [f2] 'replace-string) +(defun checkpatch() + (interactive) + (compile (concat "checkpatch.pl --no-tree --emacs --strict --file " (buffer-file-name)))) -;; replace-string on F3 -(global-set-key [f3] 'query-replace) +;; buffer-cycle.el +;; F1: Switch to previous buffers +(autoload 'cycle-buffer-prev "buffer-cycle" t) +(global-set-key [f1] 'cycle-buffer-prev) +;; F2: Switch to next buffers +(autoload 'cycle-buffer-next "buffer-cycle" t) +(global-set-key [f2] 'cycle-buffer-next) -;; make clean on F4 +;; F4: make clean (global-set-key [f4] 'compile-make-clean) -;; compile on F5 +;; F5: make (global-set-key [f5] 'compile-make) -;; Goto next error on F6 +;; F6: go to next error (global-set-key [f6] 'next-error) -;; Indent code on F8 +;; F7: comment region +(global-set-key [f7] 'comment-region) + +;; F8: code indentation (global-set-key [f8] 'indent-region) + +;; F9: run checkpatch.pl +(global-set-key [f9] 'checkpatch) EOF -# Return last error exit $?