;;; фыва ;x (require 'un-define) ; (set-face-font 'default "-*-*-medium-r-*-*-*-120-*-*-m-*-koi8-r") (set-face-font 'default "-Sony-Fixed-Medium-R-Normal--16-120-100-100-C-80-ISO8859-1") (setq ctl-arrow 128) (setq-default indent-tabs-mode nil) (setq visible-bell t) ;x (setq buffer-file-coding-system-for-read 'utf-8) ;x (set-default-file-coding-system 'utf-8) (modify-syntax-entry ?- "w" lisp-mode-syntax-table) ;x (require 'ru-keys) ;; slime (add-to-list 'load-path "~/lisp/slime/") ; your SLIME directory. А надо бы всё это в библиотеку, типа / (add-to-list 'load-path "~/lisp/slime/contrib") ; your SLIME directory (setq inferior-lisp-program "ecl"); your Lisp system (setq inferior-lisp-program "sbcl --noinform --no-linedit") ; to use w/o linedit ; (setq inferior-lisp-program "/bin/ccl -K utf-8") ; (add-hook 'slime-load-hook (lambda () (require 'slime-fancy) (slime-setup '(slime-fancy)) (add-to-list 'load-path ".../slime") ; path for core ; (add-to-list 'load-path ".../slime/contrib") ; path for contribs ; (require 'slime-autoloads) ; )) ; ccl хочет (set-language-environment "utf-8") (require 'slime) ; ? swank-sbcl. ?? slime.el. (require 'slime-fancy) (require 'slime-asdf) (setq slime-net-coding-system 'utf-8-unix) ; 'emacs-mule-unix 'windows-1251-unix ; (setq slime-coding 'windows-1251-unix) ; (make-variable-buffer-local 'slime-coding) (slime-setup '(slime-fancy slime-asdf)) ;; from http://www.xemacs.org/Documentation/packages/html/edit-utils_14.html ;x(desktop-load-default) (desktop-read) (desktop-save-mode t) (add-hook 'kill-emacs-hook '(lambda () ; (slime-quit-lisp) (desktop-truncate search-ring 30) (desktop-truncate regexp-search-ring 30))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (global-set-key '[(control prior)] 'beginning-of-buffer) (global-set-key '[(control next)] 'end-of-buffer) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun slime-show-sbcl-buffers () "Устанавливает в текущей рамке интерпретатор *slime-repl sbcl* и *inferior-lisp*" (interactive) (delete-other-windows) (switch-to-buffer "*inferior-lisp*") (split-window-horizontally) (switch-to-buffer-other-window "*slime-repl sbcl*") ; (switch-to-buffer-other-window "*slime-repl ccl*") ) (global-set-key [(control ?\;)] 'slime-show-sbcl-buffers) (global-set-key [(control ?\:)] 'slime-switch-to-output-buffer) (defvar favorite-buffer-name nil "*One buffer may be called favorite. It can be accessed by shortcut assigned to `switch-to-favorite-buffer'") ;;; to do: use prefix arguments to have more favorite buffers (defun set-favorite-buffer-to-current (p) "See `favorite-buffer-name'" (interactive "p") (set-variable 'favorite-buffer-name (buffer-name (current-buffer))) ) (defun switch-to-favorite-buffer () "See `favorite-buffer-name'" (interactive) (delete-other-windows) (switch-to-buffer favorite-buffer-name)) (global-set-key '[(control ?')] 'switch-to-favorite-buffer) (defun edit-init-file () (interactive) (find-file "/root/.emacs")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defmacro define-lisp-keys (mode) `(progn (define-key ,mode '[(control backspace)] 'backward-kill-sexp) (define-key ,mode '[(control delete)] 'kill-sexp) (define-key ,mode '[(control right)] 'forward-sexp) (define-key ,mode '[(control left)] 'backward-sexp) (define-key ,mode '[(meta backspace)] 'backward-kill-word) (define-key ,mode '[(meta delete)] 'kill-word) (define-key ,mode '[(meta right)] 'forward-word) (define-key ,mode '[(meta left)] 'backward-word) ) ) (define-lisp-keys slime-mode-map) (define-lisp-keys slime-repl-mode-map) (define-lisp-keys emacs-lisp-mode-map) (setq common-lisp-hyperspec-root "/usr/share/doc/clhs/") (define-key slime-mode-map '[(f1)] 'slime-hyperspec-lookup) (define-key slime-repl-mode-map '[(f1)] 'slime-hyperspec-lookup) (define-key slime-mode-map '[(f9)] 'slime-eval-buffer) (global-set-key [C-f3] 'comint-dynamic-complete-filename) ; (global-set-key '[(meta f7)] (iswitchb find-buffer-visiting "sldb")) (global-set-key '[(control x) (f3)] 'find-file-at-point) ; shift f3 почему-то не ловит. Повредился умом :( (global-set-key '[(f3)] 'find-file) (global-set-key '[(meta f3)] 'kill-buffer) (global-set-key '[(f2)] 'save-buffer) (global-set-key '[(f6)] 'other-window) (global-set-key '[(control shift f6)] 'previous-buffer) (global-set-key '[(control f6)] 'next-buffer) ; (global-set-key '(control f12) 'buffer-menu) ; buffer-menu-other-window (tool-bar-mode 0) (iswitchb-mode 1) (iswitchb-default-keybindings) (global-set-key '[(control f12)] 'iswitchb-buffer) (defun iswitchb-sbcl-to-end () "Move the sbcl buffers to the end of the list. This is an example function which can be hooked on to `iswitchb-make-buflist-hook'. Any buffer matching the regexps `Summary' or `output\*$'are put to the end of the list." (let ((summaries (delq nil (mapcar (lambda (x) (if (or (string-match "\*.*sbcl.*\*" x) (string-match "\*inferior\-lisp\*" x) ) x)) iswitchb-temp-buflist)))) (iswitchb-to-end summaries))) (add-hook 'iswitchb-make-buflist-hook 'iswitchb-sbcl-to-end) ; (defalias 'read-buffer 'iswitchb-read-buffer) (slime) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(safe-local-variable-values (quote ((Package . CCL) (Base . 10) (Package . LIFT) (Syntax . ANSI-Common-Lisp) (Package . lift) (fill-column)))) '(show-paren-mode t) '(transient-mark-mode t)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) (put 'downcase-region 'disabled nil) (defun pascalify-current-buffer () (interactive) (beginning-of-buffer)