From: Stefan Bund Date: Thu, 20 Mar 2014 07:45:38 +0000 (+0100) Subject: updates X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=5f3c695024b3619e7239e9177cca2a07792f9876;p=emacs-init.git updates --- diff --git a/emacsstuff b/emacsstuff index 0f2d15f..10ffe12 160000 --- a/emacsstuff +++ b/emacsstuff @@ -1 +1 @@ -Subproject commit 0f2d15f66459e62102f6f2aac1e3c83641563c51 +Subproject commit 10ffe12cbf8028b03d41078b199d94275f1619ad diff --git a/magit b/magit index 5ed79cb..3558925 160000 --- a/magit +++ b/magit @@ -1 +1 @@ -Subproject commit 5ed79cb12033a2606ebaea18123e8996f19690ed +Subproject commit 3558925f6988a01962753849debfd6670d5395aa diff --git a/nxhtml/etc/schema/xhtml-loader.rnc b/nxhtml/etc/schema/xhtml-loader.rnc index 2a4ac13..d314851 100644 --- a/nxhtml/etc/schema/xhtml-loader.rnc +++ b/nxhtml/etc/schema/xhtml-loader.rnc @@ -1 +1 @@ -include "../../../../../../../../ntemacs24/etc/schema/xhtml.rnc" +include "../../../../../../../usr/share/emacs/23.3/etc/schema/xhtml.rnc" diff --git a/python/init_python.el b/python/init_python.el index d45a25a..11458f5 100644 --- a/python/init_python.el +++ b/python/init_python.el @@ -74,6 +74,12 @@ (flymake-goto-next-error) (my-flymake-show-error)) +(defun my-flymake-goto-prev-error () + (interactive) + (my-flymake-check-and-wait) + (flymake-goto-prev-error) + (my-flymake-show-error)) + (defun py-find-file (errormark filename defaultdir) (let ((fullname (expand-file-name filename defaultdir))) (or (and (not (file-exists-p fullname)) @@ -117,6 +123,8 @@ (progn (set (make-local-variable 'py-eshell-last-error) (point)) (set (make-local-variable 'py-eshell-prefix) (or (match-string 1) "")) + (if (string-match "Original $" py-eshell-prefix) + (setq py-eshell-prefix (substring py-eshell-prefix 0 (match-beginning 0)))) (if example (forward-line 2) (while (and (< (forward-line 1) 1) (looking-at (concat py-eshell-prefix " "))))) @@ -207,6 +215,7 @@ (define-key python-mode-map "\C-ci" 'my-pyflymake-add-import-from-error) (define-key python-mode-map "\C-ce" 'my-flymake-show-error) (define-key python-mode-map "\C-cn" 'my-flymake-goto-next-error) + (define-key python-mode-map "\C-cp" 'my-flymake-goto-prev-error) (define-key python-mode-map "\C-cI" 'py-cleanup-imports) ) @@ -292,6 +301,7 @@ (local-file (file-relative-name temp-file (file-name-directory buffer-file-name)))) + (message "flymake init pyflakes %s" local-file) (list "pyflakes" (list local-file)))) (add-to-list 'flymake-allowed-file-name-masks '("\\.py\\'" flymake-pyflakes-init))) diff --git a/setup/bindings.el b/setup/bindings.el index 622bc61..ca4c344 100644 --- a/setup/bindings.el +++ b/setup/bindings.el @@ -9,4 +9,14 @@ (global-set-key "\C-c'c" 'toggle-case-fold-search) (global-set-key "\C-c's" 'flyspell-mode) (global-set-key "\C-c'a" 'global-auto-revert-mode) -(global-set-key "\C-c' " 'whitespace-mode) \ No newline at end of file + +(defun toggle-whitespace-modes () + (interactive) + (if whitespace-mode + (progn + (whitespace-mode 0) + (develock-mode 0)) + (whitespace-mode 1) + (develock-mode 1))) + +(global-set-key "\C-c' " 'toggle-whitespace-modes) \ No newline at end of file diff --git a/setup/emacsstuff.el b/setup/emacsstuff.el index 68560ce..71bd4f6 100644 --- a/setup/emacsstuff.el +++ b/setup/emacsstuff.el @@ -9,3 +9,6 @@ (require 'g0dilstuff-init) (require 'cc-ide) (require 'softtext) + +(define-key c++-mode-map "\C-c\C-c" 'recompile) +(define-key c++-mode-map "\C-c\C-i" 'comment-indent) diff --git a/setup/magit.el b/setup/magit.el index 8b72824..d477536 100644 --- a/setup/magit.el +++ b/setup/magit.el @@ -5,9 +5,37 @@ (when (boundp 'bytecomp-filename) bytecomp-filename) buffer-file-name)))) "magit")) -(require 'magit) + +(add-to-list 'load-path (concat (file-name-directory + (directory-file-name + (file-name-directory + (or load-file-name + (when (boundp 'bytecomp-filename) bytecomp-filename) + buffer-file-name)))) + "git-modes")) + +(add-to-list 'load-path (concat (file-name-directory + (directory-file-name + (file-name-directory + (or load-file-name + (when (boundp 'bytecomp-filename) bytecomp-filename) + buffer-file-name)))) + "auto-install")) + (require 'cl) +(if (not (functionp 'run-hook-wrapped)) + (defun run-hook-wrapped (hook wrap-function &rest args) + (loop for fn in hook + thereis (apply 'wrap-function fn args)))) + +(if (not (functionp 'process-live-p)) + (defun process-live-p (process) + (memq (process-status process) + '(run open listen connect stop)))) + +(require 'magit) + (when (eq system-type 'windows-nt) (require 'advice) @@ -34,6 +62,10 @@ ); End Windows-NT +(defadvice magit-mode-quit-window (around my-magit-mode-quit-window activate) + (letf (((symbol-function 'selected-window) (lambda ()))) + ad-do-it)) + (global-set-key "\C-cGS" 'magit-status) (defun find-file-in-git-repo () @@ -47,13 +79,13 @@ (remove-if (lambda (x) (string= "" x)) (split-string files "\n"))))))) -(defun grep-in-git-repo (regexp) - (interactive "sGrep files in Git repo regexp: ") +(defun grep-in-git-repo (regexp &optional words-only) + (interactive "sGrep files in Git repo regexp: \np") (let ((default-directory (magit-get-top-dir default-directory))) (if (not default-directory) (error "not a Git directory")) - (grep (format "git ls-files -z | xargs -r0 grep -nH -E %s | cat -" - (shell-quote-argument regexp))))) + (grep (format "git ls-files -z | xargs -r0 grep -nH -E%s -- %s | cat -" + (if words-only " -w" "") (shell-quote-argument regexp))))) (setenv "GIT_PAGER" "cat") (setenv "GIT_MAN_VIEWER" "woman") diff --git a/setup/mywin.el b/setup/mywin.el index 28314e8..05d3b4c 100644 --- a/setup/mywin.el +++ b/setup/mywin.el @@ -151,7 +151,6 @@ window smaller than MIN-HEIGHT lines." (global-set-key "\C-x7" 'split-window-3-horizontally) (global-set-key "\C-x8" (lambda () (interactive) (split-window-n-horizontally 100 50))) (global-set-key "\C-x9" 'setup-my-windows) -(global-set-key "\C-xp" 'other-window-reverse) (global-set-key "\C-\M-_" (lambda () (interactive) (safe-shrink-window 5))) (defun my-swap-window-to-right (&optional below) diff --git a/setup/nxml.el b/setup/nxml.el index 76d0f0d..188532c 100644 --- a/setup/nxml.el +++ b/setup/nxml.el @@ -137,6 +137,8 @@ (defconst nxml-docbook-common-elements '(("section" . ("para" "itemizedlist" "variablelist" "section" "bridgehead" "task" "procedure" "title")) + ("refsect1" . ("title" "para" "itemizedlist" "variablelist" "screen" "refsect2")) + ("refsect2" . ("title" "para" "itemizedlilst" "variablelist" "screen")) ("para" . ("emphasis" "code" "replaceable" "literal")) ("emphasis" . ("code")) ("itemizedlist" . ("listitem")) diff --git a/setup/windmove.el b/setup/windmove.el index 3793802..41b1fba 100644 --- a/setup/windmove.el +++ b/setup/windmove.el @@ -1,4 +1,5 @@ (require 'windmove) +(require 'framemove) (if window-system (progn @@ -10,3 +11,5 @@ (global-set-key (kbd "C-c ") 'windmove-right) (global-set-key (kbd "C-c ") 'windmove-up) (global-set-key (kbd "C-c ") 'windmove-down)) + + (setq framemove-hook-into-windmove t)