.emacs-my
changeset 295 5be44cff4683
parent 289 84a0d500b0c7
child 296 e502c69ab80a
equal deleted inserted replaced
294:3e152cc2f508 295:5be44cff4683
     1 ;; -*- mode: lisp; coding: cp1251 -*-
     1 ;; -*- mode: lisp; coding: utf-8 -*-
     2 ;;
     2 ;;
     3 ;; Written by Oleksandr Gavenko <gavenkoa@gmail.com>, 2008-2010.
     3 ;; Written by Oleksandr Gavenko <gavenkoa@gmail.com>, 2008-2010.
     4 ;;
     4 ;;
     5 ;; This file formed from parts and ideas from many sites/docs and
     5 ;; This file formed from parts and ideas from many sites/docs and
     6 ;; placed in public domain.
     6 ;; placed in public domain.
    17 
    17 
    18 ;; Set the debug option to enable a backtrace when a problem occurs.
    18 ;; Set the debug option to enable a backtrace when a problem occurs.
    19 (setq debug-on-error nil)               ; t/nil
    19 (setq debug-on-error nil)               ; t/nil
    20 
    20 
    21 ;; ======================================================================
    21 ;; ======================================================================
    22 ;; Настройка внешнего вида редактора.
    22 ;; Appearance.
    23 ;; View.
       
    24 
    23 
    25 (menu-bar-mode -1)
    24 (menu-bar-mode -1)
    26 (tool-bar-mode -1)
    25 (tool-bar-mode -1)
    27 (tooltip-mode -1)
    26 (tooltip-mode -1)
    28 (scroll-bar-mode 1)
    27 (scroll-bar-mode 1)
   111 ;; Scrolling
   110 ;; Scrolling
   112 
   111 
   113 (setq-default
   112 (setq-default
   114  scroll-step 1
   113  scroll-step 1
   115  scroll-conservatively 100
   114  scroll-conservatively 100
   116  ;; при перемещении точка останавливается на расстоянии i строк к границе фрейма,
   115  ;; При перемещении точка останавливается на расстоянии i строк к границе фрейма.
   117  scroll-margin 2
   116  scroll-margin 2
   118  scroll-preserve-screen-position t
   117  scroll-preserve-screen-position t
   119  )
   118  )
   120 
   119 
   121 ;; ----------------------------------------------------------------------
   120 ;; ----------------------------------------------------------------------
   168 
   167 
   169 ;; ----------------------------------------------------------------------
   168 ;; ----------------------------------------------------------------------
   170 ;; paren, brace
   169 ;; paren, brace
   171 
   170 
   172 (show-paren-mode 1) ; Parenthesis matching via highlighting.
   171 (show-paren-mode 1) ; Parenthesis matching via highlighting.
   173 ;; (setq show-paren-style 'expression) ; выделять все выражение в скобках
       
   174 (setq show-paren-style (quote parenthesis))
   172 (setq show-paren-style (quote parenthesis))
   175 
   173 
   176 ;; ======================================================================
   174 ;; ======================================================================
   177 ;; Keyboard, mouse.
   175 ;; Keyboard, mouse.
   178 
   176 
   482 
   480 
   483 ;(setq TeX-PDF-mode t)
   481 ;(setq TeX-PDF-mode t)
   484 ;(setq TeX-interactive-mode t)
   482 ;(setq TeX-interactive-mode t)
   485 ;(setq TeX-source-specials-mode 1)
   483 ;(setq TeX-source-specials-mode 1)
   486 
   484 
   487 ;;модифицируем меню
       
   488 ;;; some more menu entries in the command list:
   485 ;;; some more menu entries in the command list:
   489 ;;; see tex-mik.el from package auctex: %v is defined in tex-mik.el
   486 ;;; see tex-mik.el from package auctex: %v is defined in tex-mik.el
   490 ;;; other variables are defined in tex.el from auctex
   487 ;;; other variables are defined in tex.el from auctex
   491 ;;; the meaning of some auctex-varibles:
   488 ;;; the meaning of some auctex-varibles:
   492         ;symbols defined in tex.el and tex-mik.el:
   489         ;symbols defined in tex.el and tex-mik.el:
   519 ;; (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
   516 ;; (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
   520 ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
   517 ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
   521 ;; (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode
   518 ;; (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode
   522 
   519 
   523 ;; ======================================================================
   520 ;; ======================================================================
   524 ;;
   521 ;; PreviewLatex
   525 ;;Настройки PreviewLatex
       
   526 
   522 
   527 ;(load "preview-latex.el" nil t t)
   523 ;(load "preview-latex.el" nil t t)
   528 
   524 
   529 ;(add-hook 'LaTeX-mode-hook #'LaTeX-preview-setup)
   525 ;(add-hook 'LaTeX-mode-hook #'LaTeX-preview-setup)
   530 ;(autoload 'LaTeX-preview-setup "preview")
   526 ;(autoload 'LaTeX-preview-setup "preview")
   598 (if (>= emacs-major-version 22)
   594 (if (>= emacs-major-version 22)
   599 (progn
   595 (progn
   600   (require 'org)
   596   (require 'org)
   601   ))
   597   ))
   602 
   598 
   603 ;; XXX org-todo-keywords '((sequence "TODO" "START" "|" "DONE")) для org-version 4.67c
   599 ;; XXX org-todo-keywords '((sequence "TODO" "START" "|" "DONE")) for org-version 4.67c
   604 ;; XXX (setq org-todo-keywords '("TODO" "START" "DONE")) для org-version 6.05b
   600 ;; XXX (setq org-todo-keywords '("TODO" "START" "DONE")) for org-version 6.05b
   605 (if (or (featurep 'org) (featurep 'org-install))
   601 (if (or (featurep 'org) (featurep 'org-install))
   606     (progn
   602     (progn
   607       (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
   603       (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
   608       (setq org-directory (expand-file-name "~/.gtd"))
   604       (setq org-directory (expand-file-name "~/.gtd"))
   609       (setq org-default-notes-file (expand-file-name "~/.gtd/notes"))
   605       (setq org-default-notes-file (expand-file-name "~/.gtd/notes"))
   830       compile-command "make ")
   826       compile-command "make ")
   831 ;; compilation window shall scroll down if not 0
   827 ;; compilation window shall scroll down if not 0
   832 (setq compilation-scroll-output 1)
   828 (setq compilation-scroll-output 1)
   833 
   829 
   834 ;; My funny error messages.
   830 ;; My funny error messages.
   835 ;; XXX нужно реализовать через hook.
   831 ;; XXX нужно реализовать через hook.
   836 (require 'compile)
   832 (require 'compile)
   837 (add-to-list 'compilation-error-regexp-alist '("^\\( +\\[csc\\] \\|\\)\\(.*\\)(\\([0-9]*\\),\\([0-9]*\\)):" 2 3 4))
   833 (add-to-list 'compilation-error-regexp-alist '("^\\( +\\[csc\\] \\|\\)\\(.*\\)(\\([0-9]*\\),\\([0-9]*\\)):" 2 3 4))
   838 (add-to-list 'compilation-error-regexp-alist '("^ *\\(.*\\)(\\([0-9]*\\)) +:" 1 2))
   834 (add-to-list 'compilation-error-regexp-alist '("^ *\\(.*\\)(\\([0-9]*\\)) +:" 1 2))
   839 (add-to-list 'compilation-error-regexp-alist '("^\"?\\([^\"]*\\)\"?,\\([0-9]*\\) .*\\[.*\\]: " 1 2)) ; KEIL compiler
   835 (add-to-list 'compilation-error-regexp-alist '("^\"?\\([^\"]*\\)\"?,\\([0-9]*\\) .*\\[.*\\]: " 1 2)) ; KEIL compiler
   840 ;; (add-to-list 'compilation-mode-font-lock-keywords '("\\(/[Oo][Uu][Tt]:[^ 	]+\\)" . 1))
   836 ;; (add-to-list 'compilation-mode-font-lock-keywords '("\\(/[Oo][Uu][Tt]:[^ 	]+\\)" . 1))
  1008 ;; ----------------------------------------------------------------------
  1004 ;; ----------------------------------------------------------------------
  1009 ;; psgml
  1005 ;; psgml
  1010 (setq sgml-set-face t)                  ; for highlighting in sgml
  1006 (setq sgml-set-face t)                  ; for highlighting in sgml
  1011 
  1007 
  1012 ;; ======================================================================
  1008 ;; ======================================================================
  1013 ;; Printing
  1009 ;; printing
  1014 
  1010 
  1015 ;; Use Notepad to print plain text files to the default Windows printer
  1011 ;; Use Notepad to print plain text files to the default Windows printer
  1016 ;(setq lpr-command "notepad")
  1012 ;(setq lpr-command "notepad")
  1017 ;(setq lpr-headers-switches '("/p"))    ; \ mis-use these
  1013 ;(setq lpr-headers-switches '("/p"))    ; \ mis-use these
  1018 ;(setq lpr-switches nil)                ; / two variables
  1014 ;(setq lpr-switches nil)                ; / two variables
  1019 ;(setq printer-name nil)        ; notepad takes the default
  1015 ;(setq printer-name nil)        ; notepad takes the default
  1020 ;(setq lpr-printer-switch "/P") ;; run notepad as batch printer
  1016 ;(setq lpr-printer-switch "/P") ;; run notepad as batch printer
  1021 ;;
  1017 ;;
  1022 ;;Печать в файл
  1018 
       
  1019 ;; ----------------------------------------------------------------------
       
  1020 ;; printing to file
       
  1021 
  1023 ;(setq printer-name "~/myprint.txt")
  1022 ;(setq printer-name "~/myprint.txt")
  1024 ;(setq ps-printer-name nil)
  1023 ;(setq ps-printer-name nil)
  1025 ;(setq ps-print-header nil)
  1024 ;(setq ps-print-header nil)
  1026 ;;модифицируем меню
       
  1027 ;;; some more menu entries in the command list:
  1025 ;;; some more menu entries in the command list:
  1028 ;;; see tex-mik.el from package auctex: %v is defined in tex-mik.el
  1026 ;;; see tex-mik.el from package auctex: %v is defined in tex-mik.el
  1029 ;;; other variables are defined in tex.el from auctex
  1027 ;;; other variables are defined in tex.el from auctex
  1030 ;;; the meaning of some auctex-varibles:
  1028 ;;; the meaning of some auctex-varibles:
  1031         ;symbols defined in tex.el and tex-mik.el:
  1029         ;symbols defined in tex.el and tex-mik.el: