.emacs-my
changeset 1600 64b0c8d9821d
parent 1597 69fb0b318f3c
child 1601 85ff4f99ebd0
equal deleted inserted replaced
1599:665bd30beaae 1600:64b0c8d9821d
     8 ;; Config file for GNU Emacs.
     8 ;; Config file for GNU Emacs.
     9 ;;
     9 ;;
    10 ;; For load order see README.
    10 ;; For load order see README.
    11 
    11 
    12 (with-no-warnings (require 'cl))
    12 (with-no-warnings (require 'cl))
       
    13 
       
    14 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
    15 (message "silent runing")
       
    16 
       
    17 (setq inhibit-splash-screen t)
       
    18 (setq inhibit-startup-message t)
       
    19 
       
    20 (setq initial-scratch-message nil)
       
    21 
       
    22 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
    23 (message "helper buffers")
       
    24 
       
    25 (define-key global-map "\C-v" nil)
       
    26 (define-key global-map "\C-vt" (lambda nil (interactive) (switch-to-buffer "*scratch*")))
       
    27 
       
    28 (defvar my-work-file (expand-file-name "~/work.txt"))
       
    29 (setq initial-buffer-choice my-work-file)
       
    30 (define-key global-map "\C-vw" (lambda nil (interactive) (find-file-literally my-work-file)))
    13 
    31 
    14 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    32 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    15 (message "recentf")
    33 (message "recentf")
    16 
    34 
    17 (eval-and-compile
    35 (eval-and-compile
   463 
   481 
   464 (fset 'yes-or-no-p 'y-or-n-p)
   482 (fset 'yes-or-no-p 'y-or-n-p)
   465 
   483 
   466 (when (boundp 'confirm-kill-emacs)
   484 (when (boundp 'confirm-kill-emacs)
   467   (setq confirm-kill-emacs 'y-or-n-p))
   485   (setq confirm-kill-emacs 'y-or-n-p))
   468 
       
   469 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
   470 (message "silent runing")
       
   471 
       
   472 (setq inhibit-splash-screen t)
       
   473 (setq inhibit-startup-message t)
       
   474 
       
   475 (setq initial-scratch-message nil)
       
   476 
   486 
   477 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   487 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   478 (message "date, time")
   488 (message "date, time")
   479 
   489 
   480 (require 'time)
   490 (require 'time)
   674     (server-start)) )
   684     (server-start)) )
   675 
   685 
   676 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   686 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   677 (message "standart/general settings")
   687 (message "standart/general settings")
   678 
   688 
   679 (eval-when 'compile (require 'generic))
       
   680 
       
   681 ;; Try to speed things up, especially in VM.
   689 ;; Try to speed things up, especially in VM.
   682 (setq gc-cons-threshold 2000000)
   690 (setq gc-cons-threshold 2000000)
   683 
   691 
   684 ;; Default 'command-history' length too short (in Emacs 23.2 is 30).
   692 ;; Default 'command-history' length too short (in Emacs 23.2 is 30).
   685 (setq history-length 200)
   693 (setq history-length 200)
   764  )
   772  )
   765 
   773 
   766 (defun my-prevent-kill-buffer ()
   774 (defun my-prevent-kill-buffer ()
   767   (if (member (buffer-name) '("*scratch*" "NOTE.org")) nil t))
   775   (if (member (buffer-name) '("*scratch*" "NOTE.org")) nil t))
   768 (add-to-list 'kill-buffer-query-functions 'my-prevent-kill-buffer)
   776 (add-to-list 'kill-buffer-query-functions 'my-prevent-kill-buffer)
   769 
       
   770 (define-key global-map "\C-v" nil)
       
   771 (define-key global-map "\C-vt" (lambda nil (interactive) (switch-to-buffer "*scratch*")))
       
   772 
   777 
   773 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   778 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   774 (message "scrolling")
   779 (message "scrolling")
   775 
   780 
   776 (defvar my-scroll-margin 4)
   781 (defvar my-scroll-margin 4)