summaryrefslogtreecommitdiffhomepage
path: root/custom
diff options
context:
space:
mode:
Diffstat (limited to 'custom')
-rw-r--r--custom/jao-custom-blog.el2
-rw-r--r--custom/jao-custom-completion.el12
-rw-r--r--custom/jao-custom-email.el6
-rw-r--r--custom/jao-custom-eww.el8
-rw-r--r--custom/jao-custom-exwm.el24
-rw-r--r--custom/jao-custom-gnus.el2
-rw-r--r--custom/jao-custom-notmuch.el12
-rw-r--r--custom/jao-custom-org.el2
-rw-r--r--custom/jao-custom-w3m.el2
9 files changed, 35 insertions, 35 deletions
diff --git a/custom/jao-custom-blog.el b/custom/jao-custom-blog.el
index 4b74601..a11c5c0 100644
--- a/custom/jao-custom-blog.el
+++ b/custom/jao-custom-blog.el
@@ -171,7 +171,7 @@
(to (expand-file-name (file-name-nondirectory from)
org-static-blog-posts-directory)))
(rename-file from to)
- (when-let* ((b (get-buffer from)))
+ (when-let ((b (get-buffer from)))
(kill-buffer b))
(find-file to)
(jao-org-static-blog-update-date)
diff --git a/custom/jao-custom-completion.el b/custom/jao-custom-completion.el
index cdffcdc..9524e23 100644
--- a/custom/jao-custom-completion.el
+++ b/custom/jao-custom-completion.el
@@ -175,9 +175,9 @@
(defvar jao-consult-narrow nil)
(defun jao-consult-initial-narrow ()
- (when-let* ((c (cond ((eq this-command #'consult-buffer)
- (cdr (assoc (jao-afio-frame-name) jao-consult-narrow)))
- ((eq this-command #'consult-mode-command) ?m))))
+ (when-let (c (cond ((eq this-command #'consult-buffer)
+ (cdr (assoc (jao-afio-frame-name) jao-consult-narrow)))
+ ((eq this-command #'consult-mode-command) ?m)))
(setq unread-command-events (append unread-command-events `(,c 32)))))
(add-hook 'minibuffer-setup-hook #'jao-consult-initial-narrow)
@@ -290,7 +290,7 @@
(defun jao-embark-targets--w3m-anchor ()
(when (not (region-active-p))
- (when-let* ((url (or (jao-url-around-point)
+ (when-let ((url (or (jao-url-around-point)
(thing-at-point 'url)
(and (derived-mode-p 'w3m-mode)
(or (w3m-anchor) w3m-current-url))
@@ -396,12 +396,12 @@
(with-eval-after-load "notmuch"
(defun jao-link-hint--notmuch-next-part (&optional bound)
- (when-let* ((p (next-single-property-change (point) :notmuch-part nil bound)))
+ (when-let (p (next-single-property-change (point) :notmuch-part nil bound))
(and (< p (or bound (point-max))) p)))
(defun jao-link-hint--notmuch-part-p ()
(and (get-text-property (point) :notmuch-part)
- (when-let* ((b (button-at (point)))) (button-label b))))
+ (when-let (b (button-at (point))) (button-label b))))
(link-hint-define-type 'notmuch-part
:next #'jao-link-hint--notmuch-next-part
diff --git a/custom/jao-custom-email.el b/custom/jao-custom-email.el
index dd898ad..a3d1a92 100644
--- a/custom/jao-custom-email.el
+++ b/custom/jao-custom-email.el
@@ -69,8 +69,8 @@
(defun jao-message-insert-bcc ()
(when jao-notmuch-enabled
(let ((f (or (message-fetch-field "From") "")))
- (when-let* ((b (seq-some (lambda (x) (when (string-match-p (car x) f) (cdr x)))
- jao-message--bcc-alist)))
+ (when-let (b (seq-some (lambda (x) (when (string-match-p (car x) f) (cdr x)))
+ jao-message--bcc-alist))
(insert "Bcc: " b "\n")))))
;; (when jao-notmuch-enabled
@@ -170,7 +170,7 @@
(save-excursion
(save-restriction
(message-narrow-to-headers)
- (when-let* ((to (message-fetch-field "To")))
+ (when-let ((to (message-fetch-field "To")))
(when (string-match-p jao-mails-regexp to)
(unless (y-or-n-p "Message is addressed to yourself. Continue?")
(error "Message not sent")))))))
diff --git a/custom/jao-custom-eww.el b/custom/jao-custom-eww.el
index 726f682..6a2e8e2 100644
--- a/custom/jao-custom-eww.el
+++ b/custom/jao-custom-eww.el
@@ -32,7 +32,7 @@
;;; opening URLs
(defun jao-eww-copy-link ()
(interactive)
- (when-let* ((lnk (or (car (eww-links-at-point)) (eww-current-url))))
+ (when-let (lnk (or (car (eww-links-at-point)) (eww-current-url)))
(message "%s" lnk)
(kill-new lnk)))
@@ -83,7 +83,7 @@
;;; images
(defun jao-eww-next-image ()
(interactive nil eww-mode)
- (when-let* ((p (text-property-search-forward 'image-displayer nil nil t)))
+ (when-let (p (text-property-search-forward 'image-displayer nil nil t))
(goto-char (prop-match-beginning p))))
;;; close page and reopen
@@ -91,7 +91,7 @@
(defun jao-eww-close ()
(interactive nil eww-mode)
- (when-let* ((current (eww-current-url)))
+ (when-let (current (eww-current-url))
(add-to-list 'jao-eww--closed-urls current))
(let ((nxt (car (jao-eww-session-invisible-buffers))))
(kill-current-buffer)
@@ -220,7 +220,7 @@ It should be the title of the web page as returned by `rdrview'"
(with-eval-after-load "org" (require 'ol-eww nil t))
(defun jao-eww-buffer-name ()
- (when-let* ((s (or (plist-get eww-data :title)
+ (when-let ((s (or (plist-get eww-data :title)
(plist-get eww-data :url))))
(when (not (string-blank-p s)) (format "%s" s))))
(setq eww-auto-rename-buffer #'jao-eww-buffer-name)
diff --git a/custom/jao-custom-exwm.el b/custom/jao-custom-exwm.el
index 2135935..e5c67f8 100644
--- a/custom/jao-custom-exwm.el
+++ b/custom/jao-custom-exwm.el
@@ -185,7 +185,7 @@
(when cln
(if (jao-exwm--check-name cln)
(current-buffer)
- (when-let* ((b (jao-exwm-find-class-buffer cln)))
+ (when-let ((b (jao-exwm-find-class-buffer cln)))
(pop-to-buffer b)))))
(defun jao-exwm-switch-to-next-class ()
@@ -341,21 +341,21 @@
(defun jao-exwm-zathura-goto-org (&optional arg)
(interactive "P")
- (when-let* ((info (jao-zathura--file-info (current-buffer)))
- (file (jao-org-find-for-pdf (car info))))
- (let ((newp (not (file-exists-p file))))
- (when (or arg newp) (org-store-link nil t))
- (find-file-other-window file)
- (when newp
- (jao-org-insert-doc-skeleton)
- (org-insert-link)))))
+ (when-let ((info (jao-zathura--file-info (current-buffer))))
+ (when-let ((file (jao-org-find-for-pdf (car info))))
+ (let ((newp (not (file-exists-p file))))
+ (when (or arg newp) (org-store-link nil t))
+ (find-file-other-window file)
+ (when newp
+ (jao-org-insert-doc-skeleton)
+ (org-insert-link))))))
(defun jao-exwm-zathura-goto-org* ()
(interactive)
(jao-exwm-zathura-goto-org t))
(defun jao-exwm-org-store-zathura-link ()
- (when-let* ((info (jao-zathura--file-info (current-buffer))))
+ (when-let ((info (jao-zathura--file-info (current-buffer))))
(let* ((file-name (car info))
(page (cadr info))
(desc (jao-pdf-section-title page file-name)))
@@ -385,7 +385,7 @@
(interactive)
(if jao-browse-doc-use-emacs-p
(jao-org-goto-pdf)
- (when-let* ((pdf (jao-exwm-org-to-pdf-file)))
+ (when-let (pdf (jao-exwm-org-to-pdf-file))
(jao-zathura-open-doc pdf))))
(with-eval-after-load "org"
@@ -422,7 +422,7 @@
(defun jao-exwm-kill-firefox-url ()
(interactive)
- (when-let* ((b (jao-exwm-find-class-buffer "Firefox")))
+ (when-let (b (jao-exwm-find-class-buffer "Firefox"))
(let ((cb (current-buffer)))
(switch-to-buffer b)
(jao-exwm--send-str "yy")
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el
index c56599e..70823ef 100644
--- a/custom/jao-custom-gnus.el
+++ b/custom/jao-custom-gnus.el
@@ -583,7 +583,7 @@
(let ((offset (or (and (search-forward-regexp "^Enclosure: " nil t) 2)
(and (search-forward-regexp "^Enclosure$" nil t) -2))))
(when offset (forward-char offset))
- (if-let* ((url (jao-url-around-point)))
+ (if-let ((url (jao-url-around-point)))
(jao-mpc-add-or-play-url url)
(error "No enclosure found"))))))
diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el
index 7b1540f..42d9e12 100644
--- a/custom/jao-custom-notmuch.el
+++ b/custom/jao-custom-notmuch.el
@@ -60,7 +60,7 @@
(defun jao-notmuch-tree-widen-search ()
(interactive)
- (when-let* ((query (notmuch-tree-get-query)))
+ (when-let ((query (notmuch-tree-get-query)))
(let ((notmuch-show-process-crypto (notmuch-tree--message-process-crypto)))
(notmuch-tree-close-message-window)
(notmuch-tree (string-replace jao-notmuch--newa "" query)))))
@@ -73,7 +73,7 @@
searches))
(defun jao-notmuch-hello--insert-searches (searches title)
- (when-let* ((searches (notmuch-hello-query-counts searches)))
+ (when-let (searches (notmuch-hello-query-counts searches))
(let* ((cnt (when title
(seq-reduce (lambda (c q)
(+ c (or (plist-get q :count) 0)))
@@ -348,7 +348,7 @@
(if (not (search-forward "Enclosure:" nil t))
(user-error "No enclosure in message body")
(re-search-forward "https?://" nil t)
- (if-let* ((url (thing-at-point-url-at-point)))
+ (if-let (url (thing-at-point-url-at-point))
(progn
(message "%s %s ..." (if add "Adding" "Playing") url)
(unless add (jao-mpc-clear))
@@ -363,7 +363,7 @@
"quant-ph updates on arXiv.org: ")))
(defun jao-mail-clean-address (args)
- (when-let* ((address (car args)))
+ (when-let ((address (car args)))
(list (thread-last (replace-regexp-in-string jao-mail-clean-rx "" address)
(replace-regexp-in-string " " ", ")))))
@@ -430,8 +430,8 @@
(defun jao-notmuch-browse-url (ext)
(interactive "P")
- (when-let* ((url (or (jao-notmuch--via-url)
- (car (last (jao-notmuch-message-urls))))))
+ (when-let (url (or (jao-notmuch--via-url)
+ (car (last (jao-notmuch-message-urls)))))
(funcall (if ext browse-url-secondary-browser-function #'browse-url)
url)))
diff --git a/custom/jao-custom-org.el b/custom/jao-custom-org.el
index 1b15e72..4d2e622 100644
--- a/custom/jao-custom-org.el
+++ b/custom/jao-custom-org.el
@@ -254,7 +254,7 @@
(defun jao-insert-eww-link ()
"Look for last eww buffer and insert an org link to it."
(interactive)
- (when-let* ((b (car (jao-eww-session-eww-buffers))))
+ (when-let (b (car (jao-eww-session-eww-buffers)))
(let ((lnk (with-current-buffer b
(format "[[%s][%s]]"
(eww-current-url)
diff --git a/custom/jao-custom-w3m.el b/custom/jao-custom-w3m.el
index 57d0c4a..43b9e2d 100644
--- a/custom/jao-custom-w3m.el
+++ b/custom/jao-custom-w3m.el
@@ -6,7 +6,7 @@
(fn `(lambda (b)
(with-current-buffer b
(string= ,url (w3m-canonicalize-url w3m-current-url))))))
- (when-let* ((b (seq-find fn (w3m-list-buffers))))
+ (when-let (b (seq-find fn (w3m-list-buffers)))
(pop-to-buffer b))))
(defun jao-w3m-browse-url (url &rest r)