Commits

Anonymous committed 16d8dcd

Fix grep-edit and add a new copy-from-above-while-same command.

Comments (0)

Files changed (6)

  '(LaTeX-babel-hyphen "")
  '(LaTeX-fill-break-at-separators (quote (\\\( \\\) \\\[ \\\])))
  '(LaTeX-menu-max-items 40)
- '(LaTeX-mode-hook (quote (preview-mode-setup talcum-mode LaTeX-install-toolbar turn-on-reftex LaTeX-math-mode auto-fill-mode)) t)
+ '(LaTeX-mode-hook (quote (preview-mode-setup talcum-mode LaTeX-install-toolbar turn-on-reftex LaTeX-math-mode auto-fill-mode)))
  '(LaTeX-verbatim-environments (quote ("verbatim" "verbatim*" "alltt" "listing" "asy" "asydef")))
  '(LaTeX-verbatim-regexp "verbatim\\*?\\|alltt\\|listing")
  '(TeX-PDF-mode t)
  '(TeX-close-quote "\"'")
  '(TeX-insert-braces nil)
  '(TeX-open-quote "\"`")
- '(TeX-parse-self t t)
+ '(TeX-parse-self t)
  '(TeX-source-correlate-method (quote synctex))
  '(TeX-source-correlate-mode t)
  '(TeX-view-program-selection (quote (((output-dvi style-pstricks) "dvips and gv") (output-dvi "xdvi") (output-pdf "xpdf") (output-html "xdg-open"))))
  '(cua-overwrite-cursor-color "red")
  '(cua-remap-control-z nil)
  '(custom-enabled-themes (quote (tango-dark-enhancements tango-dark)))
- '(custom-safe-themes (quote ("2c901d09dd9e0dd9c6b35b2dcda2e7a38b691af2" default)))
+ '(custom-safe-themes (quote ("8def68b903c33106ab8d2d6e13fa006ee6439e44" "01701b27441f3b12b574046f0bc40f0533ec37c8" "160f07ce51bbc69226daeedefbc4dd543e8207a6" "2c901d09dd9e0dd9c6b35b2dcda2e7a38b691af2" default)))
  '(delete-selection-mode nil)
  '(desktop-base-file-name "desktop")
  '(desktop-base-lock-name "desktop.lock")
  '(display-time-day-and-date t)
  '(display-time-mode t)
  '(dnd-open-file-other-window t)
- '(ecb-directories-menu-user-extension-function (quote ignore))
- '(ecb-display-image-icons-for-semantic-tags t)
- '(ecb-fix-window-size (quote width))
- '(ecb-grep-find-function (quote if))
- '(ecb-grep-recursive-function (quote rgrep))
- '(ecb-highlight-tag-with-point (quote highlight-scroll))
- '(ecb-history-item-name (quote buffer-name))
- '(ecb-history-menu-user-extension-function (quote ignore))
- '(ecb-kill-buffer-clears-history (quote auto))
- '(ecb-layout-name "left7")
- '(ecb-method-non-semantic-face (quote ecb-default-general-face))
- '(ecb-methods-menu-user-extension-function (quote ignore))
- '(ecb-minor-mode-text "")
- '(ecb-non-semantic-exclude-modes (quote (sh-mode fundamental-mode text-mode LaTeX-mode)))
- '(ecb-options-version "2.40")
- '(ecb-primary-secondary-mouse-buttons (quote mouse-1--C-mouse-1))
- '(ecb-process-non-semantic-files t)
- '(ecb-source-file-regexps (quote ((".*" ("\\(^\\(\\.\\|#\\)\\|\\(~$\\|\\.\\(pyc\\|elc\\|obj\\|o\\|class\\|lib\\|dll\\|a\\|so\\|cache\\)$\\)\\)") ("^\\.\\(emacs\\|gnus\\)$")))))
- '(ecb-source-path (quote ("~/devel" "/")))
- '(ecb-sources-menu-user-extension-function (quote ignore))
- '(ecb-sources-sort-method (quote extension))
- '(ecb-tip-of-the-day nil)
- '(ecb-tree-expand-symbol-before t)
- '(ecb-use-speedbar-instead-native-tree-buffer nil)
- '(ecb-windows-width 0.25)
  '(ede-project-placeholder-cache-file "~/.emacs.d/projects.ede")
  '(ediff-split-window-function (quote split-window-horizontally))
  '(eproject-completing-read-function (quote eproject--ido-completing-read))
  '(py-shebang-startstring "#!/usr/bin/env")
  '(py-shell-name "python")
  '(py-shell-switch-buffers-on-execute nil)
+ '(py-start-run-py-shell nil)
  '(python-use-skeletons nil)
  '(recentf-max-saved-items 200)
  '(recentf-menu-open-all-flag t)

distext/semantic.el

 ;; semantic
 (setq semantic-load-turn-useful-things-on t)
 (require 'semantic)
-(require 'semanticdb)
-(semantic-load-enable-code-helpers)
+;(require 'semanticdb)
+(require 'semantic/db)
+;(semantic-load-enable-code-helpers)
 
-(require 'semantic-tag-folding)
-(global-semantic-tag-folding-mode 1)
-(global-set-key (kbd "C-c <left>") 'semantic-tag-folding-fold-block)
-(global-set-key (kbd "C-c <right>") 'semantic-tag-folding-show-block)
+;(require 'semantic-tag-folding)
+;(global-semantic-tag-folding-mode 1)
+;(global-set-key (kbd "C-c <left>") 'semantic-tag-folding-fold-block)
+;(global-set-key (kbd "C-c <right>") 'semantic-tag-folding-show-block)
 
 (defun semantic-format-tag-name-short (tag &optional parent color)
   (let ((name (semantic-format-tag-name tag parent color)))
 (setq semantic-imenu-summary-function 'semantic-format-tag-name-short)
 
 ;; enable semantic features for Python mode
-(add-hook 'python-mode (lambda ()
-  (add-hook 'after-save-hook 'semantic-fetch-tags nil t)
-))
+;(add-hook 'python-mode (lambda ()
+;  (add-hook 'after-save-hook 'semantic-fetch-tags nil t)
+;))
+
+(add-hook 'python-mode-hook #'semantic-mode)
 
 (add-hook 'semantic-init-hooks (lambda ()
   (when (eq major-mode 'python-mode)

distext/yasnippet.el

 (setq yas/window-system-popup-function
       'yas/x-popup-menu-for-template)
 ;; auto-expand on tab
-(add-hook 'python-mode-hook 'yas/minor-mode)
+;(add-hook 'python-mode-hook 'yas/minor-mode)
 
 (yas/define-snippets
  'haskell-mode
  '(
    ("c" "\\`\\`$1\\`\\` $0" "code insertion")
    )
- 'text-mode)
+ 'text-mode)
 
 (add-hook 'grep-setup-hook
           (lambda ()
+            (set-keymap-parent grep-mode-map text-mode-map)
             (define-key grep-mode-map "\M-r" 'grep-narrow-down)
             (define-key grep-mode-map " "
               'self-insert-command)
               'grep-edit-finish-edit)
             (define-key grep-mode-map "\C-c\C-u"
               'grep-edit-remove-all-change)
+            (define-key grep-mode-map "\C-cg"
+              'recompile)
 
             (add-hook 'after-change-functions 'grep-mode-change-face nil t)
             ;;(remove-hook 'after-change-functions 'grep-mode-change-face)
 (global-set-key (kbd "C-x \\") 'align-regexp)
 
 ;; join line with previous
-(global-set-key (kbd "C-x ^") 'join-line)
+(global-set-key (kbd "C-c ^") 'join-line)
 
 ;; F6 stores a position in a file, F7 brings you back to this position
 (global-set-key (kbd "<f6>") '(lambda () (interactive) (point-to-register ?1)))
 
 ;; like vim's '*' binding
 (global-set-key (kbd "C-+")   'search-for-this-word)
-(global-set-key (kbd "C-x *") 'search-for-this-word)
 (global-set-key (kbd "C-*")   'isearch-lazy-highlight-cleanup)
 
 ;; fixup-whitespace puts the "right" amount of whitespace at the point
 ;; find everything with apropos
 (global-set-key (kbd "C-h a") 'apropos)
 
+;; copy from above lines
+(global-set-key (kbd "C-c <right>") 'copy-above-while-same)
+
 ;; flymake error finding
 (global-set-key (kbd "M-g M-e") 'flymake-goto-next-error)
 (global-set-key [remap next-error] 'next-error-or-flymake)
           (delete-file filename))
       (message (concat "Word Count: " result)))))
 
+(autoload 'copy-from-above-command "misc"
+  "Copy characters from previous nonblank line, starting just above point.
+
+  \(fn &optional arg)"
+  'interactive)
+
+(defun copy-above-while-same ()
+  "Copy from the previous two lines until the first difference."
+  (interactive)
+  (let* ((col (current-column))
+         (n (compare-buffer-substrings
+             (current-buffer) ;; This buffer
+             (save-excursion
+               (forward-line -2)
+               (move-to-column col)
+               (point)) ;; Start 1
+             (line-end-position -1) ;; End 1
+             (current-buffer) ;; Still this buffer
+             (save-excursion
+               (forward-line -1)
+               (move-to-column col)
+               (point)) ;; Start 2
+             (line-end-position 0)))) ;; End 2
+    (cond ((not (integerp n))
+           (copy-from-above-command 1))
+          ((> (abs n) 1)
+           (copy-from-above-command (1- (abs n) )))
+          (t ;; (zerop n)
+           (copy-from-above-command)))))
+
 
 ;; ---------- Extension configuration ------------------------------------------
 

tango-dark-enhancements-theme.el

    `(font-lock-function-name-face ((,class (:weight bold))))
    `(font-lock-keyword-face ((,class (:weight bold))))
    `(font-lock-type-face ((,class (:weight bold))))
+   `(grep-edit-face ((,class (:foreground ,butter-1 :background ,alum-7 :weight bold))))
+   `(grep-edit-done-face ((,class (:foreground ,blue-0 :weight bold))))
+   `(grep-edit-file-face ((,class (:background ,blue-3 :weight bold))))
+   `(header-line ((,class (:inherit nil :background ,alum-5.5))))
    `(hl-line ((,class (:background "#345"))))
    `(linum ((,class (:inherit (shadow fringe)))))
    `(mode-line ((,class (:background ,cham-0 :foreground ,alum-6