From 50dc2f2f871c99ef03c491025fc57a008d6c25ac Mon Sep 17 00:00:00 2001 From: rearman Date: Tue, 29 Apr 2025 09:54:11 -0400 Subject: [PATCH] Send-mail for windows, doas and sudo for linux (not just bsd) --- re/re-os-specific.el | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/re/re-os-specific.el b/re/re-os-specific.el index 330f7fd..edb0d06 100644 --- a/re/re-os-specific.el +++ b/re/re-os-specific.el @@ -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 -- 2.39.5