updates
Stefan Bund [Thu, 20 Mar 2014 07:45:38 +0000 (08:45 +0100)]
emacsstuff
magit
nxhtml/etc/schema/xhtml-loader.rnc
python/init_python.el
setup/bindings.el
setup/emacsstuff.el
setup/magit.el
setup/mywin.el
setup/nxml.el
setup/windmove.el

index 0f2d15f..10ffe12 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 0f2d15f66459e62102f6f2aac1e3c83641563c51
+Subproject commit 10ffe12cbf8028b03d41078b199d94275f1619ad
diff --git a/magit b/magit
index 5ed79cb..3558925 160000 (submodule)
--- a/magit
+++ b/magit
@@ -1 +1 @@
-Subproject commit 5ed79cb12033a2606ebaea18123e8996f19690ed
+Subproject commit 3558925f6988a01962753849debfd6670d5395aa
index 2a4ac13..d314851 100644 (file)
@@ -1 +1 @@
-include "../../../../../../../../ntemacs24/etc/schema/xhtml.rnc"
+include "../../../../../../../usr/share/emacs/23.3/etc/schema/xhtml.rnc"
index d45a25a..11458f5 100644 (file)
   (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))
             (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 "  ")))))
   (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)
 )
 
            (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)))
index 622bc61..ca4c344 100644 (file)
@@ -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
index 68560ce..71bd4f6 100644 (file)
@@ -9,3 +9,6 @@
 (require 'g0dilstuff-init)\r
 (require 'cc-ide)\r
 (require 'softtext)\r
+\r
+(define-key c++-mode-map "\C-c\C-c" 'recompile)\r
+(define-key c++-mode-map "\C-c\C-i" 'comment-indent)\r
index 8b72824..d477536 100644 (file)
@@ -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)
 
 ); 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 ()
               (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")
index 28314e8..05d3b4c 100644 (file)
@@ -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)
index 76d0f0d..188532c 100644 (file)
 (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"))
index 3793802..41b1fba 100644 (file)
@@ -1,4 +1,5 @@
 (require 'windmove)
+(require 'framemove)
 
 (if window-system
     (progn
@@ -10,3 +11,5 @@
   (global-set-key (kbd "C-c <right>") 'windmove-right)
   (global-set-key (kbd "C-c <up>") 'windmove-up)
   (global-set-key (kbd "C-c <down>") 'windmove-down))
+
+ (setq framemove-hook-into-windmove t)