From b0c3c90e9e173ada14073b90c2ff5d6d25ed0da3 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 4 Sep 2021 23:54:12 -0500 Subject: Whitespace ... more --- init.el | 35 ++++++++++++++++++++++++++--------- lisp/acdw-re.el | 4 +++- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/init.el b/init.el index 73f4744..e5b7796 100644 --- a/init.el +++ b/init.el @@ -325,6 +325,7 @@ AKA, DO NOT USE THIS FUNCTION!!!" " a" #'consult-apropos ;; Isearch integration "M-s e" #'consult-isearch) + (:with-map isearch-mode-map (:bind "M-e" #'consult-isearch "M-s e" #'consult-isearch @@ -941,19 +942,34 @@ successive invocations." (add-to-list 'auto-mode-alist '("\\.fs\\'" . forth-mode)) (add-to-list 'auto-mode-alist '("\\.fb\\'" . forth-block-mode))) + (setup goto-addr (if (fboundp #'global-goto-address-mode) (global-goto-address-mode) (add-hook 'after-change-major-mode-hook #'goto-address-mode))) - ;; TODO: figure out a popper.el / shackle.el ... thing to fix this (setup (:straight helpful) - (:option helpful-max-buffers 5) + (:option helpful-switch-buffer-function + (defun helpful-pop-to-buffer (&rest args) + (let ((foo + (if (eq major-mode 'helpful-mode) + #'pop-to-buffer-same-window + #'pop-to-buffer))) + (apply foo args)))) + (:global " f" #'helpful-callable " v" #'helpful-variable " k" #'helpful-key - " o" #'helpful-symbol)) + " o" #'helpful-symbol) + + (:bind "q" (defun helpful-quit () + (interactive) + (when (eq major-mode 'helpful-mode) + (quit-window) + (unless (or (= 1 (count-windows)) + (eq major-mode 'helpful-mode)) + (delete-window)))))) (setup (:straight hungry-delete) (:option hungry-delete-chars-to-skip " \t" @@ -1366,7 +1382,7 @@ browser defined in `browse-url-secondary-browser-function'." (add-hook (intern (concat (symbol-name mode) "-hook")) #'paredit@setup)) - (:also-load 'eldoc) + (:also-load eldoc) (eldoc-add-command 'paredit-backward-delete 'paredit-close-round)) (setup (:straight paren-face) @@ -1711,9 +1727,8 @@ If used with a numeric prefix argument N, N backticks will be inserted." (:advise variable-pitch-mode :after (defun variable-pitch-mode@setup (&rest _) "Set up `variable-pitch-mode' with my customizations." - (display-fill-column-indicator-mode (if buffer-face-mode - -1 - +1))))) + (display-fill-column-indicator-mode + (if buffer-face-mode -1 +1))))) (setup (:straight (vertico :host github @@ -1804,8 +1819,10 @@ If used with a numeric prefix argument N, N backticks will be inserted." (which-key-mode +1)) (setup whitespace - (:option whitespace-style - '(empty indentation space-before-tab space-after-tab) + (:option whitespace-style '(empty + indentation + space-before-tab + space-after-tab) indent-tabs-mode nil tab-width 4 backward-delete-char-untabify-method 'hungry) diff --git a/lisp/acdw-re.el b/lisp/acdw-re.el index ea1c42a..f7df241 100644 --- a/lisp/acdw-re.el +++ b/lisp/acdw-re.el @@ -48,7 +48,9 @@ surrounded by word boundaries." "") " regexp" (if (with-selected-window reb-target-window - (region-active-p)) " in region" "")) + (region-active-p)) + " in region" + "")) t)) (pnt (car acdw/re-builder-positions)) (beg (cadr acdw/re-builder-positions)) -- cgit 1.4.1-21-gabe81