From 1b12caa6b8404140dd05372d6ab8f791e1cf9438 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 4 Jan 2022 23:57:39 -0600 Subject: Changes --- lisp/+Info.el | 17 +++++++++++++++++ lisp/+elisp.el | 2 +- lisp/+modeline.el | 3 ++- lisp/+org-capture.el | 5 +++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 lisp/+Info.el (limited to 'lisp') diff --git a/lisp/+Info.el b/lisp/+Info.el new file mode 100644 index 0000000..a3c2fcd --- /dev/null +++ b/lisp/+Info.el @@ -0,0 +1,17 @@ +;;; +Info.el -*- lexical-binding: t; -*- + +;;Copyright (C) 2022 Case Duckworth + +;;; Code: + +(require 'info) + +(defun +Info-copy-current-node-name (&optional arg) + "Put the name of the current Info invocation intothe kill ring. +This is the same as `Info-copy-current-node-name', but with the +arg reversed." + (interactive "P" Info-mode) + (Info-copy-current-node-name (unless arg 0))) + +(provide '+Info) +;;; +Info.el ends here diff --git a/lisp/+elisp.el b/lisp/+elisp.el index d2f018a..3eafbf3 100644 --- a/lisp/+elisp.el +++ b/lisp/+elisp.el @@ -6,7 +6,7 @@ (interactive) (if (region-active-p) (eval-region (region-beginning) (region-end)) - (eval-buffer))) + (+eval-region@pulse (lambda (_ _) (eval-buffer)) (point-min) (point-max)))) ;; Should I move this to `+pulse' ? (defun +eval-region@pulse (advised beg end &rest args) diff --git a/lisp/+modeline.el b/lisp/+modeline.el index db3deb4..4063d83 100644 --- a/lisp/+modeline.el +++ b/lisp/+modeline.el @@ -91,7 +91,8 @@ This function makes a lambda, so you can throw it straight into (propertize (+string-truncate (format-mode-line mode-name) 12) 'face 'bold 'keymap mode-line-major-mode-keymap - 'help-echo (concat mode-name " mode\nmouse-1: show menu.") + 'help-echo (concat (format-mode-line mode-name) + " mode\nmouse-1: show menu.") 'mouse-face 'mode-line-highlight))) (defcustom +modeline-modified-icon-alist '((ephemeral . "*") diff --git a/lisp/+org-capture.el b/lisp/+org-capture.el index 6968657..ba036bd 100644 --- a/lisp/+org-capture.el +++ b/lisp/+org-capture.el @@ -3,6 +3,7 @@ ;;; Code: (require 'cl-lib) +(require 'acdw) ;; We don't require `org-capture' here because I'll have to require this library ;; to init.el /before/ org-capture is fully needed. But I do need to declare ;; `org-capture-templates'. @@ -39,6 +40,10 @@ LIST is a symbol and defaults to `org-capture-templates'." (set list (sort (symbol-value list) (lambda (a b) (string< (car a) (car b)))))) +(defun +org-capture-sort-after-init (&optional list) + "Sort LIST with `+org-capture-sort' after Emacs init." + (+ensure-after-init #'+org-capture-sort)) + ;;;###autoload (defun +org-capture-templates-setf (key value &optional list sort-after) "Add KEY to LIST, using `setf'. -- cgit 1.4.1-21-gabe81