summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-08-26 20:05:22 -0500
committerCase Duckworth2021-08-26 20:05:22 -0500
commit65e2de6dedb9e59a1b1206442b4d05709ee51fd3 (patch)
tree1f92234dccfce7820744140f9a06cb1c8861b8cf
parentMaximize frame at home (diff)
parentCheck for `erc-track-mode' in `acdw-modeline/erc' (diff)
downloademacs-65e2de6dedb9e59a1b1206442b4d05709ee51fd3.tar.gz
emacs-65e2de6dedb9e59a1b1206442b4d05709ee51fd3.zip
Merge branch 'main' of https://tildegit.org/acdw/emacs
-rw-r--r--init.el64
-rw-r--r--lisp/acdw-modeline.el3
2 files changed, 51 insertions, 16 deletions
diff --git a/init.el b/init.el index 4da4b86..f040fc7 100644 --- a/init.el +++ b/init.el
@@ -202,18 +202,26 @@
202 ;; for easy finding. 202 ;; for easy finding.
203 203
204 ;; Enable all disabled commands. 204 ;; Enable all disabled commands.
205 (mapatoms (lambda (symbol) 205 ;; This is an option, but I'm going to try /enabling/ just the ones that I
206 (when (get symbol 'disabled) 206 ;; use instead.
207 (put symbol 'disabled nil)))) 207 ;; (mapatoms (lambda (symbol)
208 208 ;; (when (get symbol 'disabled)
209 ;; (put symbol 'disabled nil))))
210
211 ;; Enable /some/ disabled commands
212 (dolist (enable-sym '(narrow-to-region
213 dired-find-alternate-file
214 narrow-to-page))
215 (put enable-sym 'disabled nil))
216
209 ;; Now, disable symbols as I wish. 217 ;; Now, disable symbols as I wish.
210 (dolist (sym '(view-hello-file 218 (dolist (disable-sym '(view-hello-file
211 suspend-frame 219 suspend-frame
212 scroll-left 220 scroll-left
213 scroll-right 221 scroll-right
214 comment-set-column 222 comment-set-column
215 set-fill-column)) 223 set-fill-column))
216 (put sym 'disabled t)) 224 (put disable-sym 'disabled t))
217 225
218 ;; And set the disabled function to something better than the default. 226 ;; And set the disabled function to something better than the default.
219 ;; Now, I can run any disabled command, but I have to use M-x to do it. 227 ;; Now, I can run any disabled command, but I have to use M-x to do it.
@@ -647,10 +655,11 @@ like a dumbass."
647 (apply fn args)))) 655 (apply fn args))))
648 656
649(setup minibuffer 657(setup minibuffer
650 (:option minibuffer-prompt-properties 658 (:option enable-recursive-minibuffers t
651 '(read-only t cursor-intangible t face minibuffer-prompt)
652 enable-recursive-minibuffers t
653 file-name-shadow-properties '(invisible t intangible t) 659 file-name-shadow-properties '(invisible t intangible t)
660 minibuffer-eldef-shorten-default t
661 minibuffer-prompt-properties
662 '(read-only t cursor-intangible t face minibuffer-prompt)
654 read-answer-short t 663 read-answer-short t
655 read-extended-command-predicate ; used on >28 664 read-extended-command-predicate ; used on >28
656 #'command-completion-default-include-p) 665 #'command-completion-default-include-p)
@@ -996,7 +1005,32 @@ like a dumbass."
996 "C-c c" capitalize-dwim 1005 "C-c c" capitalize-dwim
997 "C-c u" upcase-dwim 1006 "C-c u" upcase-dwim
998 "C-c l" downcase-dwim 1007 "C-c l" downcase-dwim
999 "C-c t" acdw/insert-iso-date)) 1008 "C-c t" acdw/insert-iso-date)
1009
1010 (defalias 'forward-word-with-case 'forward-word
1011 "Alias for `forward-word' for use in `case-repeat-map'.")
1012 (defalias 'backward-word-with-case 'backward-word
1013 "Alias for `backward-word for use in `case-repeat-map'.")
1014
1015 (defvar case-repeat-map
1016 (let ((map (make-sparse-keymap)))
1017 (define-key map "c" #'capitalize-word)
1018 (define-key map "u" #'upcase-word)
1019 (define-key map "l" #'downcase-word)
1020 ;; movement
1021 (define-key map "f" #'forward-word-with-case)
1022 (define-key map "b" #'backward-word-with-case)
1023 map)
1024 "A map to repeat word-casing commands. For use with `repeat-mode'.")
1025 (dolist (command '(capitalize-word
1026 capitalize-dwim
1027 upcase-word
1028 upcase-dwim
1029 downcase-word
1030 downcase-dwim
1031 forward-word-with-case
1032 backward-word-with-case))
1033 (put command 'repeat-map 'case-repeat-map)))
1000 1034
1001 1035
1002;;; Packages 1036;;; Packages
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 @@
33 33
34(defun acdw-modeline/erc () 34(defun acdw-modeline/erc ()
35 "ERC indicator for the modeline." 35 "ERC indicator for the modeline."
36 (when (and (boundp 'erc-modified-channels-object)) 36 (when (and (bound-and-true-p erc-track-mode)
37 (boundp 'erc-modified-channels-object))
37 (format-mode-line erc-modified-channels-object))) 38 (format-mode-line erc-modified-channels-object)))
38 39
39(defun acdw-modeline/god-mode-indicator () 40(defun acdw-modeline/god-mode-indicator ()