summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/+Info.el17
-rw-r--r--lisp/+elisp.el2
-rw-r--r--lisp/+modeline.el3
-rw-r--r--lisp/+org-capture.el5
4 files changed, 25 insertions, 2 deletions
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 @@
1;;; +Info.el -*- lexical-binding: t; -*-
2
3;;Copyright (C) 2022 Case Duckworth
4
5;;; Code:
6
7(require 'info)
8
9(defun +Info-copy-current-node-name (&optional arg)
10 "Put the name of the current Info invocation intothe kill ring.
11This is the same as `Info-copy-current-node-name', but with the
12arg reversed."
13 (interactive "P" Info-mode)
14 (Info-copy-current-node-name (unless arg 0)))
15
16(provide '+Info)
17;;; +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 @@
6 (interactive) 6 (interactive)
7 (if (region-active-p) 7 (if (region-active-p)
8 (eval-region (region-beginning) (region-end)) 8 (eval-region (region-beginning) (region-end))
9 (eval-buffer))) 9 (+eval-region@pulse (lambda (_ _) (eval-buffer)) (point-min) (point-max))))
10 10
11;; Should I move this to `+pulse' ? 11;; Should I move this to `+pulse' ?
12(defun +eval-region@pulse (advised beg end &rest args) 12(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
91 (propertize (+string-truncate (format-mode-line mode-name) 12) 91 (propertize (+string-truncate (format-mode-line mode-name) 12)
92 'face 'bold 92 'face 'bold
93 'keymap mode-line-major-mode-keymap 93 'keymap mode-line-major-mode-keymap
94 'help-echo (concat mode-name " mode\nmouse-1: show menu.") 94 'help-echo (concat (format-mode-line mode-name)
95 " mode\nmouse-1: show menu.")
95 'mouse-face 'mode-line-highlight))) 96 'mouse-face 'mode-line-highlight)))
96 97
97(defcustom +modeline-modified-icon-alist '((ephemeral . "*") 98(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 @@
3;;; Code: 3;;; Code:
4 4
5(require 'cl-lib) 5(require 'cl-lib)
6(require 'acdw)
6;; We don't require `org-capture' here because I'll have to require this library 7;; We don't require `org-capture' here because I'll have to require this library
7;; to init.el /before/ org-capture is fully needed. But I do need to declare 8;; to init.el /before/ org-capture is fully needed. But I do need to declare
8;; `org-capture-templates'. 9;; `org-capture-templates'.
@@ -39,6 +40,10 @@ LIST is a symbol and defaults to `org-capture-templates'."
39 (set list (sort (symbol-value list) (lambda (a b) 40 (set list (sort (symbol-value list) (lambda (a b)
40 (string< (car a) (car b)))))) 41 (string< (car a) (car b))))))
41 42
43(defun +org-capture-sort-after-init (&optional list)
44 "Sort LIST with `+org-capture-sort' after Emacs init."
45 (+ensure-after-init #'+org-capture-sort))
46
42;;;###autoload 47;;;###autoload
43(defun +org-capture-templates-setf (key value &optional list sort-after) 48(defun +org-capture-templates-setf (key value &optional list sort-after)
44 "Add KEY to LIST, using `setf'. 49 "Add KEY to LIST, using `setf'.