diff --git a/Emacs/build-systems.el b/Emacs/build-systems.el index 583b7ac..baa8f8f 100644 --- a/Emacs/build-systems.el +++ b/Emacs/build-systems.el @@ -9,20 +9,14 @@ (interactive) (message "Building using Jam") (let ((default-directory (read-directory-name "Directory: "))) - (compile - "jam -j4 -q") - ) - ) + (compile "jam -j4 -q"))) (defun build-universal-jam-clean () "Build using jam (select directory first)" (interactive) (message "Jam clean") (let ((default-directory (read-directory-name "Directory: "))) - (compile - "jam clean") - ) - ) + (compile "jam clean"))) ;; ;; Build system manager - select from multiple different compilation commands @@ -32,8 +26,7 @@ (setq macoy-build-system-list (list '("Jam (current directory)" build-universal-jam) '("Jam Clean (current directory)" build-universal-jam-clean) - ) - ) + )) (setq macoy-build-system-default nil) @@ -44,37 +37,23 @@ (when macoy-build-system-default (message "Building %s" (car macoy-build-system-default)) (let ((build-function (nth 1 macoy-build-system-default))) - (call-interactively build-function) - ) - ) + (call-interactively build-function))) (unless macoy-build-system-default - ;; (message "No default build system selected. Run macoy-build-system-select-then-build") - (call-interactively 'macoy-build-system-select-then-build) - ) - ) - ) + (call-interactively 'macoy-build-system-select-then-build)))) (defun macoy-build-system-select () "Select default build system using Ido" (interactive) ;; Use Ido to pick the build system (let ((build-system-ido-list nil) (selected-build-system nil)) - (message "Going to build list") ;; Build a list of only the names of build systems (dolist (build-system macoy-build-system-list build-system-ido-list) - (add-to-list 'build-system-ido-list (car build-system)) - ) - (message "build list completed, going to set selected-build-system via Ido") + (add-to-list 'build-system-ido-list (car build-system))) ;; Let the user select the build system using Ido (setq selected-build-system (ido-completing-read "Build system: " build-system-ido-list)) - (message "Build system set; finding by string and setting the default") (dolist (build-system macoy-build-system-list) (when (string-equal selected-build-system (car build-system)) - (setq macoy-build-system-default build-system) - ) - ) - ) - ) + (setq macoy-build-system-default build-system))))) (defun macoy-build-system-select-then-build () "Select a build from `macoy-build-system-list' and build it" @@ -82,8 +61,7 @@ (call-interactively 'macoy-build-system-select) ;; Execute the build - (macoy-build-system-build) - ) + (macoy-build-system-build)) (global-set-key (kbd "") 'macoy-build-system-build) (global-set-key (kbd "S-") 'macoy-build-system-select-then-build) diff --git a/Emacs/core-settings.el b/Emacs/core-settings.el index 2617637..4b21e57 100644 --- a/Emacs/core-settings.el +++ b/Emacs/core-settings.el @@ -84,11 +84,22 @@ (mapcar (lambda (buffer-to-kill) (when (get-buffer buffer-to-kill) - (kill-buffer buffer-to-kill)) - ) - macoy-buffers-to-kill - ) - ) + (kill-buffer buffer-to-kill))) + macoy-buffers-to-kill)) + +(defun macoy-bury-buffer-anywhere (buffer-or-name) + "Bury all windows showing BUFFER-OR-NAME. +BUFFER-OR-NAME may be a buffer or the name of an existing buffer +and defaults to the current buffer. For example, +(macoy-bury-buffer-anywhere \"*Compile-Log*\") +would dismiss the compile log, if it was visible" + (let ((buffer (window-normalize-buffer buffer-or-name)) + ;; Handle the "inverted" meaning of the FRAME argument wrt other + ;; `window-list-1' based function. + (all-frames t)) + (dolist (window (window-list-1 nil nil all-frames)) + (when (eq (window-buffer window) buffer) + (switch-to-prev-buffer window))))) ;; Store recently opened files so we can easily reopen them (recentf-mode 1) diff --git a/Emacs/packages.el b/Emacs/packages.el index 65af770..55e09ff 100644 --- a/Emacs/packages.el +++ b/Emacs/packages.el @@ -44,6 +44,7 @@ ivy-xref iy-go-to-char keyfreq + lua-mode magit multiple-cursors org-jira @@ -67,4 +68,4 @@ (when packages (message "Installing packages...") (package-refresh-contents) - (mapc 'macoy-package-install packages))))) \ No newline at end of file + (mapc 'macoy-package-install packages))))) diff --git a/Emacs/source-control.el b/Emacs/source-control.el index 920aabc..87d6291 100644 --- a/Emacs/source-control.el +++ b/Emacs/source-control.el @@ -8,28 +8,28 @@ (interactive) (message "Checking for modifications") (start-process "CheckForModifications" nil - "tortoiseproc" "/command:repostatus" "/path:F:\\CJUNCTIONS\\src")) + "tortoiseproc" "/command:repostatus" "/path:D:\\srcTip")) (defun tortoise-svn-show-log-src () "Open the TortoiseSVN Log window" (interactive) (message "SVN Log") (start-process "SVNLog" nil - "tortoiseproc" "/command:log" "/path:F:\\CJUNCTIONS\\src")) + "tortoiseproc" "/command:log" "/path:D:\\srcTip")) (defun tortoise-svn-update-src () "Open the TortoiseSVN Update window" (interactive) (message "SVN Update") (start-process "SVNUpdate" nil - "tortoiseproc" "/command:update" "/path:F:\\CJUNCTIONS\\src")) + "tortoiseproc" "/command:update" "/path:D:\\srcTip")) (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:F:\\CJUNCTIONS\\src")) + "tortoiseproc" "/command:createpatch" "/noview" "/path:D:\\srcTip")) ;; dsvn SVN frontend (autoload 'svn-status "dsvn" "Run `svn status'." t) @@ -40,9 +40,7 @@ (interactive) (if (projectile-project-p) (svn-status (projectile-project-root)) - (call-interactively 'svn-status) - ) - ) + (call-interactively 'svn-status))) (global-set-key (kbd "") 'macoy-svn-status) (global-set-key (kbd "S-") 'vc-print-root-log) @@ -58,11 +56,8 @@ ;; magit (when (string-equal (buffer-name) "COMMIT_EDITMSG") - (call-interactively 'with-editor-finish) - ) + (call-interactively 'with-editor-finish)) ;; dsvn (when (derived-mode-p 'log-edit-mode) - (call-interactively 'log-edit-done) - ) - ) + (call-interactively 'log-edit-done))) diff --git a/Emacs/visual-early.el b/Emacs/visual-early.el index 2ad8a80..17f64d0 100644 --- a/Emacs/visual-early.el +++ b/Emacs/visual-early.el @@ -73,7 +73,7 @@ ;; Powerline: nicer status bar ;; (require 'powerline) -(setq powerline-default-separator 'butt) +(setq powerline-default-separator 'slant) (setq powerline-display-hud nil) (setq powerline-display-buffer-size nil) (setq powerline-display-mule-info nil)