This commit is contained in:
Case Duckworth 2021-08-26 20:05:22 -05:00
commit 65e2de6ded
2 changed files with 50 additions and 15 deletions

62
init.el
View File

@ -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.
@ -647,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)
@ -996,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

View File

@ -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 ()