From f2b26178357f51b14e657c1b8a874d4af99c7625 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 26 Aug 2021 16:03:19 -0500 Subject: Change disabled-function logic. Don't disable everything /first/, just enable things I want to enable. --- init.el | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/init.el b/init.el index ced1a59..6d515e3 100644 --- a/init.el +++ b/init.el @@ -202,18 +202,26 @@ ;; for easy finding. ;; Enable all disabled commands. - (mapatoms (lambda (symbol) - (when (get symbol 'disabled) - (put symbol 'disabled nil)))) - + ;; This is an option, but I'm going to try /enabling/ just the ones that I + ;; use instead. + ;; (mapatoms (lambda (symbol) + ;; (when (get symbol 'disabled) + ;; (put symbol 'disabled nil)))) + + ;; Enable /some/ disabled commands + (dolist (enable-sym '(narrow-to-region + dired-find-alternate-file + narrow-to-page)) + (put enable-sym 'disabled nil)) + ;; Now, disable symbols as I wish. - (dolist (sym '(view-hello-file - suspend-frame - scroll-left - scroll-right - comment-set-column - set-fill-column)) - (put sym 'disabled t)) + (dolist (disable-sym '(view-hello-file + suspend-frame + scroll-left + scroll-right + comment-set-column + set-fill-column)) + (put disable-sym 'disabled t)) ;; And set the disabled function to something better than the default. ;; Now, I can run any disabled command, but I have to use M-x to do it. -- cgit 1.4.1-21-gabe81 From 88b90ef3af19f1561208e226000b82e0f9acbe92 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 26 Aug 2021 16:03:50 -0500 Subject: Resort minibuffer options --- init.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index 6d515e3..02cd850 100644 --- a/init.el +++ b/init.el @@ -655,10 +655,11 @@ like a dumbass." (apply fn args)))) (setup minibuffer - (:option minibuffer-prompt-properties - '(read-only t cursor-intangible t face minibuffer-prompt) - enable-recursive-minibuffers t + (:option enable-recursive-minibuffers t file-name-shadow-properties '(invisible t intangible t) + minibuffer-eldef-shorten-default t + minibuffer-prompt-properties + '(read-only t cursor-intangible t face minibuffer-prompt) read-answer-short t read-extended-command-predicate ; used on >28 #'command-completion-default-include-p) -- cgit 1.4.1-21-gabe81 From bfa31f593c904458e697477c8a7c3cb0018aa0c9 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 26 Aug 2021 16:04:08 -0500 Subject: Add `case-repeat-map' to change word case I'm pretty proud of this one, actually. --- init.el | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index 02cd850..77856e1 100644 --- a/init.el +++ b/init.el @@ -1005,7 +1005,32 @@ like a dumbass." "C-c c" capitalize-dwim "C-c u" upcase-dwim "C-c l" downcase-dwim - "C-c t" acdw/insert-iso-date)) + "C-c t" acdw/insert-iso-date) + + (defalias 'forward-word-with-case 'forward-word + "Alias for `forward-word' for use in `case-repeat-map'.") + (defalias 'backward-word-with-case 'backward-word + "Alias for `backward-word for use in `case-repeat-map'.") + + (defvar case-repeat-map + (let ((map (make-sparse-keymap))) + (define-key map "c" #'capitalize-word) + (define-key map "u" #'upcase-word) + (define-key map "l" #'downcase-word) + ;; movement + (define-key map "f" #'forward-word-with-case) + (define-key map "b" #'backward-word-with-case) + map) + "A map to repeat word-casing commands. For use with `repeat-mode'.") + (dolist (command '(capitalize-word + capitalize-dwim + upcase-word + upcase-dwim + downcase-word + downcase-dwim + forward-word-with-case + backward-word-with-case)) + (put command 'repeat-map 'case-repeat-map))) ;;; Packages -- cgit 1.4.1-21-gabe81 From b8a7f1e3676c067bf97f78e619f3f857f4a03e6f Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 26 Aug 2021 16:04:40 -0500 Subject: Check for `erc-track-mode' in `acdw-modeline/erc' --- lisp/acdw-modeline.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index 6a19428..5784148 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el @@ -33,7 +33,8 @@ (defun acdw-modeline/erc () "ERC indicator for the modeline." - (when (and (boundp 'erc-modified-channels-object)) + (when (and (bound-and-true-p erc-track-mode) + (boundp 'erc-modified-channels-object)) (format-mode-line erc-modified-channels-object))) (defun acdw-modeline/god-mode-indicator () -- cgit 1.4.1-21-gabe81