Inital 31.1 changes

This commit is contained in:
2026-08-24 17:07:24 -07:00
parent fe65b9bbe4
commit fce9247c63
8 changed files with 41 additions and 354 deletions
+13 -16
View File
@@ -27,6 +27,8 @@
;; Use melpa
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Safer package upgrades
(setopt package-review-policy '(not (archive . "gnu") (archive . "nongnu")))
(package-initialize)
;; Ensure use-package is installed
@@ -628,6 +630,7 @@ directory. Otherwise, run `find-file' on that file."
(require 'mozc nil t)
(setq default-input-method "japanese-mozc")
(with-eval-after-load 'mozc
(defvar mozc-candidate-style)
(require 'mozc-posframe)
(setq mozc-candidate-style 'posframe))
@@ -1249,6 +1252,7 @@ environment variable accordingly."
(not (eq (current-local-map)
read-passwd-map)))))
:config
(defvar corfu--extra)
(defun my/corfu-move-to-minibuffer ()
(interactive)
(when completion-in-region--data
@@ -1276,12 +1280,6 @@ environment variable accordingly."
(apply oldfun args)))
(advice-add 'corfu-popupinfo--get-documentation :around
'my/-corfu-popupinfo-close-help-buffer))
(use-package corfu-terminal
:init
(corfu-terminal-mode 1)
:config
(require 'corfu-terminal-popupinfo)
(corfu-terminal-popupinfo-mode 1))
(use-package dabbrev
:ensure nil
@@ -1411,7 +1409,7 @@ If BUFFER is nil, the current buffer is used."
"Return a list of error strings describing the Racket errors at point."
(let (out)
(dolist (ov (overlays-at (point)))
(when-let ((face (overlay-get ov 'face)))
(when-let* ((face (overlay-get ov 'face)))
(cl-case face
(racket-xp-error-face
(when-let* ((help-echo (get-text-property (point) 'help-echo)))
@@ -2396,8 +2394,7 @@ line in the block and manually deal with indentation."
:hook (lisp-mode . my/-format-only-when-sly-running)
:init
(defun my/-apheleia-sly-skip-function ()
(or (not (featurep 'sly))
(not sly-mode)
(or (not (bound-and-true-p sly-mode))
(not (sly-connected-p))))
(defun my/-format-only-when-sly-running ()
"Make apheleia-mode format lisp buffers only when sly is running."
@@ -2412,7 +2409,7 @@ line in the block and manually deal with indentation."
(inferior-lisp-program "/usr/bin/sbcl")
:init
(defun my/-sly-fix-special-buffers ()
(when (string-match-p (rx bos "*" (* any) "*" eos) (buffer-name))
(when (string-match-p (rx bos "*" (* not-newline) "*" eos) (buffer-name))
(setq-local show-trailing-whitespace nil)))
(add-hook 'lisp-mode-hook 'my/-sly-fix-special-buffers)
:config
@@ -2665,7 +2662,7 @@ Note that this erases the buffer before doing anything."
"Return a Jupyter buffer that can evaluate the code MODE is editing.
MODE defaults to `major-mode'."
(when-let* ((name (symbol-name (or mode major-mode)))
((string-match (rx bos (group (+? any)) (? "-ts") "-mode" eos)
((string-match (rx bos (group (+? not-newline)) (? "-ts") "-mode" eos)
name)))
(my/-find-jupyter-buffer-for-lang (match-string 1 name))))
@@ -2888,7 +2885,7 @@ argument."
(defun my/dir-container-p (&optional dir)
"Return non-nil if DIR is a remote directory that is a container.
Actually, return the method name."
(car (member (file-remote-p default-directory 'method)
(car (member (file-remote-p (or dir default-directory) 'method)
'("docker" "podman" "kubernetes" "dockercp" "podmancp"
"toolbox" "distrobox" "flatpak" "apptainer" "nspawn"))))
(defun my/dir-distrobox-p (&optional dir)
@@ -3093,7 +3090,7 @@ Actually, return the method name."
If no name is given, list all bookmarks instead."
(if name
(progn
(string-match (rx bos (group (* (not "/"))) (* "/") (group (* any)))
(string-match (rx bos (group (* (not "/"))) (* "/") (group (* not-newline)))
name)
(let* ((bm-name (match-string 1 name))
(after-path (match-string 2 name))
@@ -3128,7 +3125,7 @@ If no name is given, list all bookmarks instead."
(let ((arg (pcomplete-arg)))
(if (not (cl-find ?/ arg))
(pcomplete-here (mapcar (##concat % "/") (bookmark-all-names)))
(when (string-match (rx bos (group (+ (not "/"))) (+ "/") (group (* any)))
(when (string-match (rx bos (group (+ (not "/"))) (+ "/") (group (* not-newline)))
arg)
(let ((bm-name (match-string 1 arg))
(after-path (match-string 2 arg)))
@@ -3443,7 +3440,7 @@ The name is compared with the field name using TESTFN (defaults to `equal')."
(when (and (message-point-in-header-p)
(message-beginning-of-header t))
(beginning-of-line)
(when (and (looking-at (rx bol (group (+? any)) ":" (? " ")))
(when (and (looking-at (rx bol (group (+? not-newline)) ":" (? " ")))
(funcall (or testfn 'equal) (match-string 1) name))
(match-end 0)))))
@@ -3473,7 +3470,7 @@ The name is compared with the field name using TESTFN (defaults to `equal')."
This is the same as `evil-ret' except that it works for links in
`mu4e-view-mode'."
:type line
(if-let ((url (get-text-property (point) 'mu4e-url)))
(if-let* ((url (get-text-property (point) 'mu4e-url)))
(mu4e--view-browse-url-from-binding url)
(funcall-interactively #'evil-ret count)))
(defun my/-mu4e-setup-view-mode ()