diff options
author | Case Duckworth | 2022-01-27 19:26:33 -0600 |
---|---|---|
committer | Case Duckworth | 2022-01-27 19:26:33 -0600 |
commit | 1e5c351253784ca3bd05c9e0db1e9dc53ab9a1e1 (patch) | |
tree | 20802d017c3e25dd9c39ee2eb3c24b789f2afbc9 /lisp | |
parent | Add bmp to images (diff) | |
download | emacs-1e5c351253784ca3bd05c9e0db1e9dc53ab9a1e1.tar.gz emacs-1e5c351253784ca3bd05c9e0db1e9dc53ab9a1e1.zip |
Whose birthday is it?
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/+emacs.el | 6 | ||||
-rw-r--r-- | lisp/+ispell.el | 34 | ||||
-rw-r--r-- | lisp/+jabber.el | 3 |
3 files changed, 28 insertions, 15 deletions
diff --git a/lisp/+emacs.el b/lisp/+emacs.el index 1679886..b40e9c4 100644 --- a/lisp/+emacs.el +++ b/lisp/+emacs.el | |||
@@ -92,9 +92,9 @@ Do this only if the buffer is not visiting a file." | |||
92 | native-comp-deferred-compilation nil | 92 | native-comp-deferred-compilation nil |
93 | read-answer-short t | 93 | read-answer-short t |
94 | read-buffer-completion-ignore-case t | 94 | read-buffer-completion-ignore-case t |
95 | read-extended-command-predicate (when (fboundp | 95 | ;; read-extended-command-predicate (when (fboundp |
96 | 'command-completion-default-include-p) | 96 | ;; 'command-completion-default-include-p) |
97 | 'command-completion-default-include-p) | 97 | ;; 'command-completion-default-include-p) |
98 | recenter-positions '(top middle bottom) | 98 | recenter-positions '(top middle bottom) |
99 | regexp-search-ring-max 100 | 99 | regexp-search-ring-max 100 |
100 | regexp-search-ring-max 200 | 100 | regexp-search-ring-max 200 |
diff --git a/lisp/+ispell.el b/lisp/+ispell.el index e35b2f1..c3ee417 100644 --- a/lisp/+ispell.el +++ b/lisp/+ispell.el | |||
@@ -49,26 +49,31 @@ before the LISTS." | |||
49 | (push string words)))))) | 49 | (push string words)))))) |
50 | words)) | 50 | words)) |
51 | 51 | ||
52 | (defun +ispell-move-buffer-words-to-dir-locals () | 52 | ;;;###autoload |
53 | (interactive) | 53 | (defun +ispell-move-buffer-words-to-dir-locals (&optional arg) |
54 | "Move the current buffer-local words to .dir-locals.el. | ||
55 | This function prompts the user to save .dir-locals.el, unless | ||
56 | prefix ARG is non-nil; then it just saves them." | ||
57 | (interactive "P") | ||
54 | (unless (buffer-file-name) | 58 | (unless (buffer-file-name) |
55 | (user-error "Buffer not attached to file")) | 59 | (user-error "Buffer not attached to file")) |
56 | (hack-dir-local-variables) | 60 | (hack-dir-local-variables) |
57 | (let ((words (+ispell-buffer-local-words-list)) | 61 | (when-let ((new-words (+ispell-append-removing-duplicates |
58 | (dir-local-words (+ispell-append-removing-duplicates | 62 | :test #'string= |
59 | (alist-get 'ispell-buffer-session-localwords | 63 | ispell-buffer-session-localwords |
60 | dir-local-variables-alist) | 64 | (alist-get 'ispell-buffer-session-localwords |
61 | (alist-get 'ispell-buffer-session-localwords | 65 | dir-local-variables-alist) |
62 | file-local-variables-alist)))) | 66 | (alist-get 'ispell-buffer-session-localwords |
67 | file-local-variables-alist) | ||
68 | (+ispell-buffer-local-words-list)))) | ||
63 | (save-excursion | 69 | (save-excursion |
64 | (add-dir-local-variable | 70 | (add-dir-local-variable |
65 | major-mode | 71 | major-mode |
66 | 'ispell-buffer-session-localwords | 72 | 'ispell-buffer-session-localwords |
67 | (setq ispell-buffer-session-localwords | 73 | (setq ispell-buffer-session-localwords |
68 | (+ispell-append-removing-duplicates | 74 | new-words)) |
69 | :test #'string= | 75 | (when (or arg |
70 | dir-local-words ispell-buffer-session-localwords words))) | 76 | (y-or-n-p "Save .dir-locals.el?")) |
71 | (when (y-or-n-p "Save .dir-locals.el?") | ||
72 | (save-buffer)) | 77 | (save-buffer)) |
73 | (bury-buffer)) | 78 | (bury-buffer)) |
74 | (or ispell-buffer-local-name | 79 | (or ispell-buffer-local-name |
@@ -78,5 +83,10 @@ before the LISTS." | |||
78 | (while (search-forward ispell-words-keyword nil t) | 83 | (while (search-forward ispell-words-keyword nil t) |
79 | (delete-region (point-at-bol) (1+ (point-at-eol))))))) | 84 | (delete-region (point-at-bol) (1+ (point-at-eol))))))) |
80 | 85 | ||
86 | ;;;###autoload | ||
87 | (defun +ispell-move-buffer-words-to-dir-locals-hook () | ||
88 | "Convenience function for binding to a hook." | ||
89 | (+ispell-move-buffer-words-to-dir-locals t)) | ||
90 | |||
81 | (provide '+ispell) | 91 | (provide '+ispell) |
82 | ;;; +ispell.el ends here | 92 | ;;; +ispell.el ends here |
diff --git a/lisp/+jabber.el b/lisp/+jabber.el index 69bc8c9..a0fdea7 100644 --- a/lisp/+jabber.el +++ b/lisp/+jabber.el | |||
@@ -25,5 +25,8 @@ This does the same as `jabber-activity-show-p', but for the | |||
25 | (when (funcall +jabber-tracking-show-p group) | 25 | (when (funcall +jabber-tracking-show-p group) |
26 | (tracking-add-buffer buffer 'jabber-activity-face))) | 26 | (tracking-add-buffer buffer 'jabber-activity-face))) |
27 | 27 | ||
28 | ;;; TODO: Hiding presence messages: | ||
29 | ;; https://paste.sr.ht/~hdasch/f0ad09fbcd08e940a4fda71c2f40abc1c4efd45f | ||
30 | |||
28 | (provide '+jabber) | 31 | (provide '+jabber) |
29 | ;;; +jabber.el ends here | 32 | ;;; +jabber.el ends here |