summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-04-14 10:04:28 -0500
committerCase Duckworth2021-04-14 10:04:28 -0500
commit272537bf842b4c8e14b1866b6f1d93a6d386437d (patch)
tree0fb06260526f359b8d63de3b15e0dc7d3c9ad05c
parentChange frame-title-format (diff)
downloademacs-272537bf842b4c8e14b1866b6f1d93a6d386437d.tar.gz
emacs-272537bf842b4c8e14b1866b6f1d93a6d386437d.zip
Change :option to setq-default for some setup forms
:option loads the symbols with custom-load-symbol, but for some of the settings
I don't care about that.
-rw-r--r--init.el56
1 files changed, 31 insertions, 25 deletions
diff --git a/init.el b/init.el index 2c850c1..4e9525e 100644 --- a/init.el +++ b/init.el
@@ -324,17 +324,23 @@
324 eldoc-echo-area-use-multiline-p nil)) 324 eldoc-echo-area-use-multiline-p nil))
325 325
326(setup flyspell 326(setup flyspell
327 (:option ispell-program-name "hunspell" 327 (setq-default ispell-program-name "hunspell"
328 ispell-dictionary "en_US" 328 ispell-dictionary "en_US"
329 ispell-personal-dictionary "~/.hunspell_personal") 329 ispell-personal-dictionary "~/.hunspell_personal")
330 (:needs ispell-program-name) ; don't proceed if not installed 330 (:needs ispell-program-name) ; don't proceed if not installed
331 331
332 (ispell-set-spellchecker-params)
333 (unless (file-exists-p ispell-personal-dictionary) 332 (unless (file-exists-p ispell-personal-dictionary)
334 (write-region "" nil ispell-personal-dictionary nil 0)) 333 (write-region "" nil ispell-personal-dictionary nil 0))
335 334
336 (add-hook 'text-mode-hook #'flyspell-mode) 335 (defun flyspell-start ()
337 (add-hook 'prog-mode-hook #'flyspell-prog-mode)) 336 "Start `flyspell-mode' or `flyspell-prog-mode', depending on current mode."
337 (interactive)
338 (cond ((derived-mode-p 'text-mode)
339 (flyspell-mode))
340 ((derived-mode-p 'prog-mode)
341 (flyspell-prog-mode))
342 (t (message "Non-text or -prog mode. Run `flyspell-mode'."))))
343 (:leader "s" flyspell-start))
338 344
339(setup scratch 345(setup scratch
340 (hook-defun immortal-scratch kill-buffer-query-functions 346 (hook-defun immortal-scratch kill-buffer-query-functions
@@ -397,13 +403,13 @@
397 ediff-split-window-function 'split-window-horizontally)) 403 ediff-split-window-function 'split-window-horizontally))
398 404
399(setup browse-url 405(setup browse-url
400 (:option browse-url-browser-function 'eww-browse-url 406 (setq-default browse-url-browser-function 'eww-browse-url
401 browse-url-secondary-browser-function 407 browse-url-secondary-browser-function
402 (if (executable-find "firefox") 408 (if (executable-find "firefox")
403 'browse-url-firefox 409 'browse-url-firefox
404 'browse-url-default-browser) 410 'browse-url-default-browser)
405 browse-url-new-window-flag t 411 browse-url-new-window-flag t
406 browse-url-firefox-new-window-is-tab t) 412 browse-url-firefox-new-window-is-tab t)
407 (when (eq acdw/system :work) 413 (when (eq acdw/system :work)
408 (add-to-list 'exec-path "C:/Program Files/Mozilla Firefox"))) 414 (add-to-list 'exec-path "C:/Program Files/Mozilla Firefox")))
409 415
@@ -442,17 +448,17 @@
442 (:mode "\\.\\(gemini\\|gmi\\)\\'")) 448 (:mode "\\.\\(gemini\\|gmi\\)\\'"))
443 449
444(setup dired 450(setup dired
445 (:option dired-recursive-copies 'always 451 (setq-default dired-recursive-copies 'always
446 dired-recursive-deletes 'always 452 dired-recursive-deletes 'always
447 delete-by-moving-to-trash t 453 delete-by-moving-to-trash t
448 dired-listing-switches "-Al" 454 dired-listing-switches "-Al"
449 ls-lisp-dirs-first t 455 ls-lisp-dirs-first t
450 dired-ls-F-marks-symlinks t 456 dired-ls-F-marks-symlinks t
451 dired-no-confirm '(byte-compile 457 dired-no-confirm '(byte-compile
452 chgrp chmod chown copy 458 chgrp chmod chown copy
453 hardlink load move 459 hardlink load move
454 shell touch symlink) 460 shell touch symlink)
455 dired-dwim-target t) 461 dired-dwim-target t)
456 (:also-load dired-x) 462 (:also-load dired-x)
457 (:hook dired-hide-details-mode 463 (:hook dired-hide-details-mode
458 hl-line-mode) 464 hl-line-mode)
@@ -469,7 +475,7 @@
469 (:hook-into dired-mode)) 475 (:hook-into dired-mode))
470 476
471 (setup (:straight trashed) 477 (setup (:straight trashed)
472 (:option trashed-action-confirmer 'y-or-n-p)))) 478 (setq-default trashed-action-confirmer 'y-or-n-p))))
473 479
474(setup (:straight magit) 480(setup (:straight magit)
475 (:leader "g" magit-status) 481 (:leader "g" magit-status)