|
(global-set-key [home] (lambda ()
(interactive)
(if (and (bolp) key-home-jump)
(beginning-of-buffer)
(beginning-of-line))))
(global-set-key [end] (lambda ()
(interactive)
(if (and (eolp) key-home-jump)
(end-of-buffer)
(end-of-line))))
(global-set-key [(shift f8)] (lambda ()
(interactive)
(if (project-looking-at-include)
(message "ok")
(message "no"))))
(global-set-key [(alt f8)] (lambda ()
(interactive)
(if (project-looking-at-forward-class-decl)
(message "ok")
(message "no"))))
(global-set-key [(meta f8)] (lambda ()
(interactive)
(project-convert-include)))
(global-set-key [delete] 'delete-char)
(global-set-key [(meta right)] 'forward-word)
(global-set-key [(meta left)] 'backward-word)
(global-set-key [(control home)] 'beginning-of-buffer)
(global-set-key [(control end)] 'end-of-buffer)
(global-set-key [(meta f12)] 'goto-line)
(global-set-key [(meta f2)] 'class-add)
(global-set-key [(meta f3)] 'class-remove)
(global-set-key [(meta f4)] 'project-new)
(global-set-key [f12] 'project-load-files)
(global-set-key [f9] 'project-execute)
(global-set-key [(meta f9)] 'project-debug)
(global-set-key [(alt up)] 'beginning-of-defun)
(global-set-key [(alt down)] 'end-of-defun)
(global-set-key [f11] '(lambda ()
(interactive)
(correct-c-header-define (current-buffer))))
(global-set-key [f10] '(lambda ()
(interactive)
(expand-class-functions (current-buffer))))
(global-set-key [(alt f1)] 'describe-function)
(global-set-key [(meta f1)] 'describe-key)
(global-set-key [(control meta f1)] 'describe-variable)
(global-set-key [f2] 'save-buffer)
(global-set-key [(shift f2)] 'write-file)
(global-set-key [f3] 'find-file)
(global-set-key [(shift f3)] 'kill-this-buffer)
(global-set-key [f4] 'indent-region)
(global-set-key [(shift f5)] 'term)
(global-set-key [(alt f5)] 'shell)
(global-set-key [f6] 'other-window)
(global-set-key [(shift f7)] 'switch-to-next-buffer)
(global-set-key [(alt f7)] 'toggle-source-header)
(global-set-key [f7] (lambda ()
(interactive)
(switch-to-buffer (other-buffer))))
(global-set-key "\C-cr" 'font-lock-fontify-buffer)
(defvar option-keys-rect-mark-alist
'(nil
(ctl-x-map "r\C-@" rm-set-mark)
(ctl-x-map [?r ?\C-\ ] rm-set-mark)
(ctl-x-map "r\C-x" rm-exchange-point-and-mark)
(ctl-x-map "r\C-w" rm-kill-region)
(ctl-x-map "r\M-w" rm-kill-ring-save)
(global-map [(shift down-mouse-1)] rm-mouse-drag-region)))
(defvar option-keys-revive-alist
'(nil
(ctl-x-map "S" save-current-configuration)
(ctl-x-map "F" resume-try)
(ctl-x-map "K" wipe-try)))
(if (not (eq system-type 'ms-dos))
(global-set-key [(shift down-mouse-3)] 'mouse-set-font))
(require 'hippie-exp)
(setq hippie-expand-try-functions-list
'(
try-expand-dabbrev
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-complete-file-name-partially
try-complete-file-name
try-expand-list
try-complete-lisp-symbol-partially
try-complete-lisp-symbol
try-expand-whole-kill))
(defun my-hippie-expand (arg)
(interactive "P")
(let ((old-case-fold-search case-fold-search))
(setq case-fold-search nil)
(hippie-expand arg)
(setq case-fold-search old-case-fold-search)
)
)
(global-set-key (quote [(control return)]) (quote my-hippie-expand))
(add-hook 'message-setup-hook 'mail-abbrevs-setup)
(define-key minibuffer-local-completion-map "\040" 's-minibuffer-word)
(define-key minibuffer-local-completion-map "\t" 's-minibuffer-complete)
(define-key minibuffer-local-must-match-map [return] 's-minibuffer-complete-and-exit)
(global-set-key "\C-xb" 's-switch-to-buffer)
(defun un-comment-region (beg end &optional arg)
(interactive "r\nP")
(if arg
(comment-region beg end (- arg))
(comment-region beg end -1)))
(define-key global-map (read-kbd-macro "A-c") (quote comment-region))
(define-key global-map (read-kbd-macro "A-u") (quote un-comment-region))
(define-key global-map (read-kbd-macro "C-f") (quote project-hide-entry))
(define-key global-map (read-kbd-macro "C-a") (quote hide-body))
(if (emacs-type-is-regular)
(define-key global-map (read-kbd-macro "C-S-a") (quote show-all))
(define-key global-map (read-kbd-macro "C-S-?a") (quote show-all)))
(global-set-key [(shift pause)] 'keyboard-escape-quit)
(define-key global-map (read-kbd-macro "M-n") '(lambda ()
(interactive)
(ispell-change-dictionary "norsk")))
(define-key global-map (read-kbd-macro "M-d") '(lambda ()
(interactive)
(ispell-change-dictionary "british")))
(define-key global-map (read-kbd-macro "M-a") '(lambda ()
(interactive)
(ispell-change-dictionary "american")))
(define-key global-map (read-kbd-macro "M-p") 'flyspell-buffer)
|
|
|
All content copyright by the contributors. |
Website maintained with
Emacs ,
wsmake and
html-helper-mode |
Emacs community logo by Daniel Lundin |
Last updated on Sat Jan 22 14:57:06 2005
by Ingo Koch |
|
|
|
|