Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.4 KiB

  1. ;;; prelude-wsl.el --- Emacs Prelude: WSL-specific setup.
  2. ;;
  3. ;; Copyright © 2011-2021 Bozhidar Batsov
  4. ;;
  5. ;; URL: https://github.com/bbatsov/prelude
  6. ;; This file is not part of GNU Emacs.
  7. ;;; Commentary:
  8. ;; Additional setup that's useful when running Emacs in WSL.
  9. ;;; License:
  10. ;; This program is free software; you can redistribute it and/or
  11. ;; modify it under the terms of the GNU General Public License
  12. ;; as published by the Free Software Foundation; either version 3
  13. ;; of the License, or (at your option) any later version.
  14. ;;
  15. ;; This program is distributed in the hope that it will be useful,
  16. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. ;; GNU General Public License for more details.
  19. ;;
  20. ;; You should have received a copy of the GNU General Public License
  21. ;; along with GNU Emacs; see the file COPYING. If not, write to the
  22. ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  23. ;; Boston, MA 02110-1301, USA.
  24. ;;; Code:
  25. ;; teach Emacs how to open links with your default browser
  26. (let ((cmd-exe "/mnt/c/Windows/System32/cmd.exe")
  27. (cmd-args '("/c" "start")))
  28. (when (file-exists-p cmd-exe)
  29. (setq browse-url-generic-program cmd-exe
  30. browse-url-generic-args cmd-args
  31. browse-url-browser-function 'browse-url-generic
  32. search-web-default-browser 'browse-url-generic)))
  33. (provide 'prelude-wsl)
  34. ;;; prelude-wsl.el ends here