]> git.earman.xyz Git - emacsinit.git/commitdiff
Send-mail for windows, doas and sudo for linux (not just bsd)
authorrearman <rearman@r717.net>
Tue, 29 Apr 2025 13:54:11 +0000 (09:54 -0400)
committerrearman <rearman@r717.net>
Tue, 29 Apr 2025 13:54:11 +0000 (09:54 -0400)
re/re-os-specific.el

index 330f7fdfc6718d1ff433041cf48cd27766cfdfd5..edb0d06191095e63629aa9f5b41f665030b6ca88 100644 (file)
@@ -5,29 +5,27 @@
 
 (when (equal system-type 'windows-nt)
   (setq delete-by-moving-to-trash t w32-recognize-altgr 'nil)
+  (setopt send-mail-function 'mailclient-send-it)
   (defun re/unfuck-aveva-license nil
     "Remove the offending xml files.
 Use this when aveva can't find ass with both hands."
     (interactive)
     (let ((xml1 "c:/ProgramData/AVEVA/Licensing/License API2/Data/LocalAcquireInfo.xml")
-          (xml2 "c:/ProgramData/AVEVA/Licensing/License API2/Data/LocalBackEndAcquireInfo.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)))))
 
 (unless (equal system-type 'windows-nt)
-  (if (equal system-type 'berkeley-unix)
-      (defun doas nil
-        "Use TRAMP to reopen the current buffer as root using doas."
-        (interactive)
-        (when buffer-file-name
-          (find-alternate-file (concat "/doas:root@localhost:"
-                                       buffer-file-name))))
-    (defun sudo nil
-      "Use TRAMP to reopen the current buffer as root using sudo."
-      (interactive)
-      (when buffer-file-name
-        (find-alternate-file (concat "/doas:root@localhost:"
-                                     buffer-file-name))))))
+  (defun doas nil
+    "Use TRAMP to reopen the current buffer as root using doas."
+    (interactive)
+    (when buffer-file-name
+      (find-alternate-file (concat "/doas:root@localhost:" buffer-file-name))))
+  (defun sudo nil
+    "Use TRAMP to reopen the current buffer as root using sudo."
+    (interactive)
+    (when buffer-file-name
+      (find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name)))))
 
 (provide 're-os-specific)
 ;;; re-os-specific.el ends here