summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el80
1 files changed, 50 insertions, 30 deletions
diff --git a/init.el b/init.el index a598b16..22c06f8 100644 --- a/init.el +++ b/init.el
@@ -441,12 +441,10 @@
441 (:local-set outline-regexp eshell-prompt-regexp 441 (:local-set outline-regexp eshell-prompt-regexp
442 page-delimiter eshell-prompt-regexp) 442 page-delimiter eshell-prompt-regexp)
443 443
444 (:bind "C-d" #'eshell-quit-or-delete-char)
445
446 (:hook #'eshell-arg-hist-mode 444 (:hook #'eshell-arg-hist-mode
447 (defun eshell-mode@setup () 445 (defun eshell-mode@setup ()
448 (unless (bound-and-true-p eshell-customizations-loaded) 446 (require 'eshellrc (locate-user-emacs-file "eshell") :noerror)
449 (load (expand-file-name "eshell" user-emacs-directory)))))) 447 (:bind "C-d" #'eshell-quit-or-delete-char))))
450 448
451(setup eww 449(setup eww
452 (:also-load acdw-eww) 450 (:also-load acdw-eww)
@@ -675,9 +673,6 @@ specific to most general, they are these:
675 ;; <anything> -> mouse-1 /always/ follows link 673 ;; <anything> -> mouse-1 /always/ follows link
676 (:option mouse-1-click-follows-link t)) 674 (:option mouse-1-click-follows-link t))
677 675
678(setup mouse-avoidance
679 (mouse-avoidance-mode 'banish))
680
681(setup page 676(setup page
682 (:option page-delimiter 677 (:option page-delimiter
683 (rx bol (or "\f" ";;;") 678 (rx bol (or "\f" ";;;")
@@ -1067,8 +1062,9 @@ specific to most general, they are these:
1067 (with-eval-after-load 'circe 1062 (with-eval-after-load 'circe
1068 (:face circe-nick-highlight-face 1063 (:face circe-nick-highlight-face
1069 ((t (:inherit (modus-themes-hl-line modus-themes-bold)))) 1064 ((t (:inherit (modus-themes-hl-line modus-themes-bold))))
1070 circe-my-message-face 1065 ;; circe-my-message-face
1071 ((t (:inherit (modus-themes-slant)))))) 1066 ;; ((t (:inherit (modus-themes-slant))))
1067 ))
1072 1068
1073 (:bind "C-c C-p" #'circe-command-PART 1069 (:bind "C-c C-p" #'circe-command-PART
1074 "C-l" #'lui-track-jump-to-indicator 1070 "C-l" #'lui-track-jump-to-indicator
@@ -1219,7 +1215,7 @@ specific to most general, they are these:
1219 1215
1220(setup (:straight crux) 1216(setup (:straight crux)
1221 (:global "C-o" #'crux-smart-open-line 1217 (:global "C-o" #'crux-smart-open-line
1222 "M-o" #'crux-smart-open-line-above 1218 "M-o" #'open-paragraph
1223 "C-M-\\" #'crux-cleanup-buffer-or-region 1219 "C-M-\\" #'crux-cleanup-buffer-or-region
1224 "C-x 4 t" #'crux-transpose-windows) 1220 "C-x 4 t" #'crux-transpose-windows)
1225 1221
@@ -1917,7 +1913,7 @@ browser defined in `browse-url-secondary-browser-function'."
1917 org-clock-clocked-in-display 'mode-line 1913 org-clock-clocked-in-display 'mode-line
1918 org-clock-frame-title-format (cons '(t org-mode-line-string) 1914 org-clock-frame-title-format (cons '(t org-mode-line-string)
1919 (cons " --- " frame-title-format)) 1915 (cons " --- " frame-title-format))
1920 ;;org-clock-string-limit 7 ; gives time and not title 1916 org-clock-string-limit 25 ; gives enough information
1921 org-clock-persist t 1917 org-clock-persist t
1922 org-confirm-babel-evaluate nil 1918 org-confirm-babel-evaluate nil
1923 org-cycle-separator-lines 0 1919 org-cycle-separator-lines 0
@@ -1964,12 +1960,24 @@ browser defined in `browse-url-secondary-browser-function'."
1964 (:unbind "C-j" ; org-return-and-maybe-indent 1960 (:unbind "C-j" ; org-return-and-maybe-indent
1965 "M-j") 1961 "M-j")
1966 1962
1967 (:local-set unfill-fill-function #'org-fill-paragraph) 1963 (:local-set unfill-fill-function #'org-fill-paragraph
1964 wc-count-words-function
1965 (lambda (start end) "Count words stupidly with a limit."
1966 (acdw-org/count-words-stupidly start
1967 end
1968 999)))
1968 1969
1969 (with-eval-after-load 'org-export 1970 (with-eval-after-load 'org-export
1970 (:option (append org-export-filter-final-output-functions) 1971 (:option (append org-export-filter-final-output-functions)
1971 #'org-export-remove-zero-width-spaces)) 1972 #'org-export-remove-zero-width-spaces))
1972 1973
1974 (:local-hook before-save-hook
1975 (defun org/before-save@fix-blank-lines ()
1976 (acdw-org/fix-blank-lines t))
1977 before-save-hook
1978 (defun org/before-save@align-tags ()
1979 (org-align-tags :all)))
1980
1973 (:hook ;; #'variable-pitch-mode 1981 (:hook ;; #'variable-pitch-mode
1974 1982
1975 ;; (defun org-mode@before-save@fill-buffer () 1983 ;; (defun org-mode@before-save@fill-buffer ()
@@ -1981,22 +1989,23 @@ browser defined in `browse-url-secondary-browser-function'."
1981 ;; This is super ugly because I need to add a function to 1989 ;; This is super ugly because I need to add a function to
1982 ;; `before-save-hook', but only in org-mode buffers. So I make a hook 1990 ;; `before-save-hook', but only in org-mode buffers. So I make a hook
1983 ;; to make a hook. I'm sure there's a better way to do this. 1991 ;; to make a hook. I'm sure there's a better way to do this.
1984 (defun org-mode@fix-blank-lines-on-save () 1992 ;; (defun org-mode@fix-blank-lines-on-save ()
1985 (add-hook 'before-save-hook 1993 ;; (add-hook 'before-save-hook
1986 (defun acdw-org/fix-blank-lines-in-buffer () 1994 ;; (defun acdw-org/fix-blank-lines-in-buffer ()
1987 (acdw-org/fix-blank-lines t)) 1995 ;; (acdw-org/fix-blank-lines t))
1988 0 :local)) 1996 ;; 0 :local))
1989 1997
1990 (defun org-mode@wc-stupid () 1998 ;; (defun org-mode@wc-stupid ()
1991 (unless (and wc-mode 1999 ;; (unless (and wc-mode
1992 (> 0 (+ (or wc-orig-words 0) 2000 ;; (> 0 (+ (or wc-orig-words 0)
1993 (or wc-words-delta 0))))) 2001 ;; (or wc-words-delta 0)))))
1994 (setq-local 2002 ;; (setq-local
1995 wc-count-words-function 2003 ;; wc-count-words-function
1996 (lambda (start end) "Count words stupidly with a limit." 2004 ;; (lambda (start end) "Count words stupidly with a limit."
1997 (acdw-org/count-words-stupidly start 2005 ;; (acdw-org/count-words-stupidly start
1998 end 2006 ;; end
1999 999))))) 2007 ;; 999))))
2008 )
2000 2009
2001 (with-eval-after-load 'org 2010 (with-eval-after-load 'org
2002 (org-clock-persistence-insinuate)) 2011 (org-clock-persistence-insinuate))
@@ -2312,8 +2321,11 @@ the default is \"/\"."
2312 (list 2321 (list
2313 (propertize " " 2322 (propertize " "
2314 'display 2323 'display
2315 '((space :align-to 2324 '((space
2316 ,(unless visual-fill-column-mode 0)))) 2325 :align-to
2326 ,(unless
2327 (bound-and-true-p visual-fill-column-mode)
2328 0))))
2317 (funcall topsy-fn)))))) 2329 (funcall topsy-fn))))))
2318 2330
2319(setup (:straight trashed) 2331(setup (:straight trashed)
@@ -2409,7 +2421,15 @@ If used with a numeric prefix argument N, N backticks will be inserted."
2409 (setq-local indicate-empty-lines nil 2421 (setq-local indicate-empty-lines nil
2410 indicate-buffer-boundaries nil) 2422 indicate-buffer-boundaries nil)
2411 (acdw/setup-fringes)))) 2423 (acdw/setup-fringes))))
2412 (:advise text-scale-adjust :after #'visual-fill-column-adjust)) 2424 (:advise text-scale-adjust :after #'visual-fill-column-adjust)
2425 ;; Fix bindings
2426 (when (bound-and-true-p mouse-wheel-mode)
2427 (with-eval-after-load 'visual-fill-column
2428 (dolist (margin '(right-margin left-margin))
2429 (dolist (event '(wheel-down wheel-up))
2430 (define-key visual-fill-column-mode-map
2431 (vector margin event)
2432 #'mwheel-scroll))))))
2413 2433
2414(setup (:straight visual-regexp) 2434(setup (:straight visual-regexp)
2415 (:global "M-%" #'vr/query-replace)) 2435 (:global "M-%" #'vr/query-replace))