Browse Source

Better smerge colors, modular tortoise-svn

master
Macoy Madson 1 year ago
parent
commit
b355207592
5 changed files with 49 additions and 7 deletions
  1. +3
    -0
      Emacs/dotEmacs.el
  2. +19
    -0
      Emacs/language.el
  3. +16
    -5
      Emacs/source-control.el
  4. +3
    -0
      Emacs/visual-early.el
  5. +8
    -2
      Emacs/visual-late.el

+ 3
- 0
Emacs/dotEmacs.el View File

@ -77,6 +77,9 @@
;; Modes and customizations of modes for different syntaxes
(load-user-file "syntaxes.el")
;; Support for other languages (not programming languages) (mostly Japanese)
(load-user-file "language.el")
;; Customizations related to source control stuff like DSVN, Magit, etc.
(load-user-file "source-control.el")


+ 19
- 0
Emacs/language.el View File

@ -18,3 +18,22 @@
(set-window-configuration conf)
(switch-to-buffer "*Occur*")
(local-set-key (kbd "q") 'bury-buffer))))
;; From https://www.emacswiki.org/emacs/UsingEdict
;; (defun macoy-find-translation-japanese-internal (word)
;; "Find the region in the EDICT file."
;; (interactive "s言葉: ")
;; (let ((str (buffer-substring-no-properties start end))
;; (conf (current-window-configuration)))
;; (if (and macoy-kanjidict-location (= (length str) 1))
;; (find-file macoy-kanjidict-location)
;; (find-file macoy-edict-location))
;; (goto-char (point-min))
;; (when (occur str)
;; (set-window-configuration conf)
;; (switch-to-buffer "*Occur*")
;; (local-set-key (kbd "q") 'bury-buffer))))
;; (defun macoy-find-translation-japanese ()
;; (interactive)
;; (set-input-method 'japanese)
;; (call-interactively 'macoy-find-translation-japanese))

+ 16
- 5
Emacs/source-control.el View File

@ -2,34 +2,45 @@
;;
;; Source control
;;
(setq tortoise-svn-repository-path "D:/src")
(defun macoy-unix-path-to-windows-path (str)
(replace-regexp-in-string "/" "\\\\" str))
(defun macoy-tortoise-svn-make-path (str)
(format "/path:%s" (macoy-unix-path-to-windows-path str)))
(defun tortoise-svn-check-for-modifications-src ()
"Open the TortoiseSVN Check for Modifications window"
(interactive)
(message "Checking for modifications")
(start-process "CheckForModifications" nil
"tortoiseproc" "/command:repostatus" "/path:D:\\srcTip"))
"tortoiseproc" "/command:repostatus"
(macoy-tortoise-svn-make-path tortoise-svn-repository-path)))
(defun tortoise-svn-show-log-src ()
"Open the TortoiseSVN Log window"
"Open the TortoliseSVN Log window"
(interactive)
(message "SVN Log")
(start-process "SVNLog" nil
"tortoiseproc" "/command:log" "/path:D:\\srcTip"))
"tortoiseproc" "/command:log"
(macoy-tortoise-svn-make-path tortoise-svn-repository-path)))
(defun tortoise-svn-update-src ()
"Open the TortoiseSVN Update window"
(interactive)
(message "SVN Update")
(start-process "SVNUpdate" nil
"tortoiseproc" "/command:update" "/path:D:\\srcTip"))
"tortoiseproc" "/command:update"
(macoy-tortoise-svn-make-path tortoise-svn-repository-path)))
(defun tortoise-svn-create-patch-src ()
"Open the TortoiseSVN Create Patch window"
(interactive)
(message "SVN Create Patch")
(start-process "SVNCreatePatch" nil
"tortoiseproc" "/command:createpatch" "/noview" "/path:D:\\srcTip"))
"tortoiseproc" "/command:createpatch" "/noview"
(macoy-tortoise-svn-make-path tortoise-svn-repository-path)))
;; dsvn SVN frontend
(autoload 'svn-status "dsvn" "Run `svn status'." t)


+ 3
- 0
Emacs/visual-early.el View File

@ -76,6 +76,9 @@
(setq powerline-display-hud nil)
(setq powerline-display-buffer-size nil)
(setq powerline-display-mule-info nil)
;; (set-face-attribute 'mode-line nil :height 110)
;; (setq powerline-text-scale-factor 1.3)
;; (setq powerline-height 25)
(powerline-default-theme)
;; powerline-default-theme
;; powerline-center-theme


+ 8
- 2
Emacs/visual-late.el View File

@ -121,8 +121,14 @@
)
(when (require 'smerge-mode)
(set-face-attribute 'smerge-refined-added nil :background "#2c4a27")
(set-face-attribute 'smerge-refined-removed nil :background "#4a2727")
;; (set-face-attribute 'smerge-refined-added nil :background "#2c4a27")
(set-face-attribute 'smerge-refined-added nil :background "#182916")
(set-face-attribute 'smerge-refined-removed nil :background "#2c1717")
(set-face-attribute 'smerge-refined-changed nil :background "#2c4a27")
(set-face-attribute 'smerge-markers nil :background (face-background 'match))
(set-face-attribute 'smerge-base nil :background "#482300")
(set-face-attribute 'smerge-upper nil :background "#4f2929")
(set-face-attribute 'smerge-lower nil :background "#233c20")
)
;; Make magit's diff look similar/the same as diff-mode


Loading…
Cancel
Save