]> git.earman.xyz Git - emacsinit.git/commitdiff
Split Win-specific defuns into their own file
authorrearman <rearman@r717.net>
Sun, 8 Jan 2023 16:10:04 +0000 (11:10 -0500)
committerrearman <rearman@r717.net>
Sun, 8 Jan 2023 16:10:04 +0000 (11:10 -0500)
.gitignore
bindings.el
defuns.el
eshell/alias
init.el
win-defuns.el [new file with mode: 0644]

index 09386f9bcf920c43234b877d5f0e043ce13f0328..da38916eebd0d1b17974bb565a7ad8090e03b431 100644 (file)
@@ -1,3 +1,2 @@
 *
-!/eshell/alias
 !/*.el
index 5b8b11cb7d0da3529b1f88f8008247162600c3d3..ea31af414c40ec7c91e710a3e34eb216349ca336 100644 (file)
@@ -8,7 +8,6 @@
 (global-set-key (kbd "C-c r") 'rotate-windows)
 (global-set-key (kbd "C-c s") 'eshell)
 (global-set-key (kbd "C-c t") 'toggle-window-split)
-(global-set-key (kbd "C-c w") 'edit-work-eqs)
 (global-set-key (kbd "<f8>") 'recentf-open-files)
 ;; OVERRIDES
 (global-set-key [remap move-beginning-of-line] 'smart-beginning-of-line)
index 32647b7b4afaa9f91ab924dcb7365a266548a01c..ca4c7dc9e1349784288997cb6e3b85a5e9920b7c 100644 (file)
--- a/defuns.el
+++ b/defuns.el
@@ -38,11 +38,6 @@ Can't go prev line first, edge case of beginning of buffer."
   (interactive)
   (find-file user-init-file))
 
-(defun edit-work-eqs ()
-  "Bring up work-eqs.el for editing."
-  (interactive)
-  (find-file work-eqns))
-
 (defun toggle-window-split ()
   "If two windows are open, toggle their split layout between vert. and horiz.
 Stolen from http://whattheemacsd.com"
@@ -76,6 +71,8 @@ Stolen from http://whattheemacsd.com"
   (interactive)
   (cond ((not (> (count-windows)1))
         (message "You can't rotate a single window!"))
+       ((> (count-windows) 2)
+        (message "You can't rotate more than two windows!"))
        (t
         (setq i 1)
         (setq numWindows (count-windows))
@@ -106,14 +103,6 @@ Stolen from BrettWitty's dotemacs github repo."
     (and (= oldpos (point))
         (beginning-of-line))))
 
-(defun unfuck-aveva-license ()
-  "Remove the offending xml files when aveva can't find the license."
-  (interactive)
-  (let ((xml1 "c:/ProgramData/AVEVA/Licensing/License API2/Data/LocalAcquireInfo.xml")
-       (xml2 "c:/ProgramData/AVEVA/Licensing/License API2/Data/LocalBackEndAcquireInfo.xml"))
-    (when (file-exists-p xml1) (delete-file xml1))
-    (when (file-exists-p xml2) (delete-file xml2))))
-
 (defun eshell-send-on-close-paren ()
   "Makes eshell act somewhat like genera.
 Makes a closing paren execute the sexp.  Currently in test, look out for errors."
index 29107727ec59faef1d0663608d758241d98a1196..78ab70ee4fe95c0fc65b163dedd24d8052876f02 100644 (file)
@@ -1,2 +1 @@
 alias weather clear -l && curl https://wttr.in
-alias qmk c:/QMK_MSYS/conemu/ConEmu64.exe
diff --git a/init.el b/init.el
index b051f2a4962c061fe2cddb320200258605babd48..9607c2c006e24eede8848f38ea6c4797ce8b0ba5 100644 (file)
--- a/init.el
+++ b/init.el
@@ -1,7 +1,9 @@
 ;; -*- lexical-binding: t; -*-
 ;; SETUP FOR SHARED WINDOWS/WSL INIT
 (if (eq system-type 'windows-nt)
-    (progn (setq delete-by-moving-to-trash t))
+    (progn (setq delete-by-moving-to-trash t)
+          (load (expand-file-name "win-defuns.el" user-emacs-directory))
+          (eshell-eval-command "alias qmk \"c:/QMK_MSYS/conemu/ConEmu64.exe\""))
   nil)
 
 (load (expand-file-name "work-eqs.el" user-emacs-directory))
diff --git a/win-defuns.el b/win-defuns.el
new file mode 100644 (file)
index 0000000..518155f
--- /dev/null
@@ -0,0 +1,9 @@
+;; -*- lexical-binding: t; -*-
+;; DEFUNS FOR WINDOWS ONLY
+(defun unfuck-aveva-license ()
+  "Remove the offending xml files when aveva can't find the license."
+  (interactive)
+  (let ((xml1 "c:/ProgramData/AVEVA/Licensing/License API2/Data/LocalAcquireInfo.xml")
+       (xml2 "c:/ProgramData/AVEVA/Licensing/License API2/Data/LocalBackEndAcquireInfo.xml"))
+    (when (file-exists-p xml1) (delete-file xml1))
+    (when (file-exists-p xml2) (delete-file xml2))))