about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-08-19 17:30:34 -0500
committerCase Duckworth2021-08-19 17:30:34 -0500
commit3a055f33e8e475a5f67ec4143d7c798ec2e79d13 (patch)
tree65e426013734a187622f17c002444ce211157871
parentUpdate `acdw/copy-text-plain' (diff)
parentAdd `sort-setq' (diff)
downloademacs-3a055f33e8e475a5f67ec4143d7c798ec2e79d13.tar.gz
emacs-3a055f33e8e475a5f67ec4143d7c798ec2e79d13.zip
Merge branch 'main' of tildegit.org:acdw/emacs
-rw-r--r--init.el5
-rw-r--r--lisp/acdw.el31
2 files changed, 36 insertions, 0 deletions
diff --git a/init.el b/init.el index 6cb9593..e17917b 100644 --- a/init.el +++ b/init.el
@@ -301,6 +301,7 @@
301 (when (boundp 'erc-autojoin-channels-alist) 301 (when (boundp 'erc-autojoin-channels-alist)
302 (mapcar #'car erc-autojoin-channels-alist)) 302 (mapcar #'car erc-autojoin-channels-alist))
303 erc-server-coding-system '(utf-8 . utf-8) 303 erc-server-coding-system '(utf-8 . utf-8)
304 erc-timestamp-intangible t
304 erc-track-exclude-types (append erc-hide-list 305 erc-track-exclude-types (append erc-hide-list
305 '("AWAY" 306 '("AWAY"
306 "353" "324" "329" "332" "333" "477")) 307 "353" "324" "329" "332" "333" "477"))
@@ -828,6 +829,10 @@ like a dumbass."
828 set-mark-command-repeat-pop t 829 set-mark-command-repeat-pop t
829 ) 830 )
830 831
832 (when (fboundp 'command-completion-default-include-p)
833 (setq read-extended-command-predicate
834 #'command-completion-default-include-p))
835
831 (:global "M-=" count-words 836 (:global "M-=" count-words
832 "C-w" kill-region-or-backward-word 837 "C-w" kill-region-or-backward-word
833 "<help> h" nil ; HELLO takes a long time to load on Windows 838 "<help> h" nil ; HELLO takes a long time to load on Windows
diff --git a/lisp/acdw.el b/lisp/acdw.el index 30cf8af..f642c65 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -535,5 +535,36 @@ It's called 'require-private' for historical reasons."
535 (when (fboundp mode) 535 (when (fboundp mode)
536 (funcall mode -1))))) 536 (funcall mode -1)))))
537 537
538
539;;; Sort setq...
540;; https://emacs.stackexchange.com/questions/33039/
541
542(defun sort-setq ()
543 (interactive)
544 (save-excursion
545 (save-restriction
546 (let ((sort-end (progn (end-of-defun)
547 (backward-char)
548 (point-marker)))
549 (sort-beg (progn (beginning-of-defun)
550 (re-search-forward "[ \\t]*(" (point-at-eol))
551 (forward-sexp)
552 (re-search-forward "\\<" (point-at-eol))
553 (point-marker))))
554 (narrow-to-region (1- sort-beg) (1+ sort-end))
555 (sort-subr nil #'sort-setq-next-record #'sort-setq-end-record)))))
556
557(defun sort-setq-next-record ()
558 (condition-case nil
559 (progn
560 (forward-sexp 1)
561 (backward-sexp))
562 ('scan-error (end-of-buffer))))
563
564(defun sort-setq-end-record ()
565 (condition-case nil
566 (forward-sexp 2)
567 ('scan-error (end-of-buffer))))
568
538(provide 'acdw) 569(provide 'acdw)
539;;; acdw.el ends here 570;;; acdw.el ends here