aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMark Oteiza2017-09-12 13:08:47 -0400
committerMark Oteiza2017-09-12 13:18:10 -0400
commit370d0e7aa7309b25fb9e974164261077b326e8e2 (patch)
tree47b2bbce79feb9a889a06f67b650a892c95ccc4d /lisp
parent4612b2a2b37026bef5a9b8e92878a15dabb9b261 (diff)
downloademacs-370d0e7aa7309b25fb9e974164261077b326e8e2.tar.gz
emacs-370d0e7aa7309b25fb9e974164261077b326e8e2.zip
Update uses of if-let and when-let
* lisp/dom.el (dom-previous-sibling): * lisp/emacs-lisp/package.el (package--with-work-buffer): (package--sort-deps-in-alist, package--sort-by-dependence): (package-install-from-archive, package-install): (package-menu-execute, package-menu--populate-new-package-list): * lisp/filenotify.el (file-notify--rm-descriptor): (file-notify--event-watched-file, file-notify--event-file-name): (file-notify--event-file1-name, file-notify-rm-watch): (file-notify-valid-p): * lisp/gnus/message.el (message-toggle-image-thumbnails): * lisp/gnus/nnimap.el (nnimap-request-move-article): * lisp/ibuf-ext.el (ibuffer-repair-saved-filters): * lisp/mpc.el (mpc-format): * lisp/net/eww.el (eww-tag-meta, eww-process-text-input): (eww-save-history): * lisp/net/shr.el (shr-tag-base, shr-tag-object, shr-make-table-1): * lisp/progmodes/prog-mode.el (prettify-symbols--post-command-hook): * lisp/svg.el (svg-remove): * lisp/textmodes/css-mode.el (css--named-color): (css--colon-inside-funcall): * lisp/textmodes/sgml-mode.el (html-current-buffer-classes): (html-current-buffer-ids): Use if-let* and when-let* instead.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dom.el2
-rw-r--r--lisp/emacs-lisp/package.el26
-rw-r--r--lisp/filenotify.el12
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/gnus/nnimap.el2
-rw-r--r--lisp/ibuf-ext.el2
-rw-r--r--lisp/mpc.el12
-rw-r--r--lisp/net/eww.el20
-rw-r--r--lisp/net/shr.el6
-rw-r--r--lisp/progmodes/prog-mode.el10
-rw-r--r--lisp/svg.el8
-rw-r--r--lisp/textmodes/css-mode.el4
-rw-r--r--lisp/textmodes/sgml-mode.el8
13 files changed, 57 insertions, 57 deletions
diff --git a/lisp/dom.el b/lisp/dom.el
index 4d0d4233db3..52e7f4baf17 100644
--- a/lisp/dom.el
+++ b/lisp/dom.el
@@ -162,7 +162,7 @@ ATTRIBUTE would typically be `class', `id' or the like."
162 162
163(defun dom-previous-sibling (dom node) 163(defun dom-previous-sibling (dom node)
164 "Return the previous sibling of NODE in DOM." 164 "Return the previous sibling of NODE in DOM."
165 (when-let (parent (dom-parent dom node)) 165 (when-let* ((parent (dom-parent dom node)))
166 (let ((siblings (dom-children parent)) 166 (let ((siblings (dom-children parent))
167 (previous nil)) 167 (previous nil))
168 (while siblings 168 (while siblings
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 889d7943c94..7301dbd61dd 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1192,7 +1192,7 @@ errors signaled by ERROR-FORM or by BODY).
1192 (let ((,b-sym (current-buffer))) 1192 (let ((,b-sym (current-buffer)))
1193 (require 'url-handlers) 1193 (require 'url-handlers)
1194 (unless-error ,body 1194 (unless-error ,body
1195 (when-let ((er (plist-get status :error))) 1195 (when-let* ((er (plist-get status :error)))
1196 (error "Error retrieving: %s %S" ,url-sym er)) 1196 (error "Error retrieving: %s %S" ,url-sym er))
1197 (with-current-buffer ,b-sym 1197 (with-current-buffer ,b-sym
1198 (goto-char (point-min)) 1198 (goto-char (point-min))
@@ -1770,8 +1770,8 @@ Only these packages will be in the return value an their cdrs are
1770destructively set to nil in ONLY." 1770destructively set to nil in ONLY."
1771 (let ((out)) 1771 (let ((out))
1772 (dolist (dep (package-desc-reqs package)) 1772 (dolist (dep (package-desc-reqs package))
1773 (when-let ((cell (assq (car dep) only)) 1773 (when-let* ((cell (assq (car dep) only))
1774 (dep-package (cdr-safe cell))) 1774 (dep-package (cdr-safe cell)))
1775 (setcdr cell nil) 1775 (setcdr cell nil)
1776 (setq out (append (package--sort-deps-in-alist dep-package only) 1776 (setq out (append (package--sort-deps-in-alist dep-package only)
1777 out)))) 1777 out))))
@@ -1790,7 +1790,7 @@ if all the in-between dependencies are also in PACKAGE-LIST."
1790 (dolist (cell alist out-list) 1790 (dolist (cell alist out-list)
1791 ;; `package--sort-deps-in-alist' destructively changes alist, so 1791 ;; `package--sort-deps-in-alist' destructively changes alist, so
1792 ;; some cells might already be empty. We check this here. 1792 ;; some cells might already be empty. We check this here.
1793 (when-let ((pkg-desc (cdr cell))) 1793 (when-let* ((pkg-desc (cdr cell)))
1794 (setcdr cell nil) 1794 (setcdr cell nil)
1795 (setq out-list 1795 (setq out-list
1796 (append (package--sort-deps-in-alist pkg-desc alist) 1796 (append (package--sort-deps-in-alist pkg-desc alist)
@@ -1847,7 +1847,7 @@ if all the in-between dependencies are also in PACKAGE-LIST."
1847 ;; Update the old pkg-desc which will be shown on the description buffer. 1847 ;; Update the old pkg-desc which will be shown on the description buffer.
1848 (setf (package-desc-signed pkg-desc) t) 1848 (setf (package-desc-signed pkg-desc) t)
1849 ;; Update the new (activated) pkg-desc as well. 1849 ;; Update the new (activated) pkg-desc as well.
1850 (when-let ((pkg-descs (cdr (assq (package-desc-name pkg-desc) package-alist)))) 1850 (when-let* ((pkg-descs (cdr (assq (package-desc-name pkg-desc) package-alist))))
1851 (setf (package-desc-signed (car pkg-descs)) t)))))))))) 1851 (setf (package-desc-signed (car pkg-descs)) t))))))))))
1852 1852
1853(defun package-installed-p (package &optional min-version) 1853(defun package-installed-p (package &optional min-version)
@@ -1970,12 +1970,12 @@ to install it but still mark it as selected."
1970 (unless (or dont-select (package--user-selected-p name)) 1970 (unless (or dont-select (package--user-selected-p name))
1971 (package--save-selected-packages 1971 (package--save-selected-packages
1972 (cons name package-selected-packages))) 1972 (cons name package-selected-packages)))
1973 (if-let ((transaction 1973 (if-let* ((transaction
1974 (if (package-desc-p pkg) 1974 (if (package-desc-p pkg)
1975 (unless (package-installed-p pkg) 1975 (unless (package-installed-p pkg)
1976 (package-compute-transaction (list pkg) 1976 (package-compute-transaction (list pkg)
1977 (package-desc-reqs pkg))) 1977 (package-desc-reqs pkg)))
1978 (package-compute-transaction () (list (list pkg)))))) 1978 (package-compute-transaction () (list (list pkg))))))
1979 (package-download-transaction transaction) 1979 (package-download-transaction transaction)
1980 (message "`%s' is already installed" name)))) 1980 (message "`%s' is already installed" name))))
1981 1981
@@ -3281,7 +3281,7 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm."
3281 (package--update-selected-packages .install .delete) 3281 (package--update-selected-packages .install .delete)
3282 (package-menu--perform-transaction install-list delete-list) 3282 (package-menu--perform-transaction install-list delete-list)
3283 (when package-selected-packages 3283 (when package-selected-packages
3284 (if-let ((removable (package--removable-packages))) 3284 (if-let* ((removable (package--removable-packages)))
3285 (message "Package menu: Operation finished. %d packages %s" 3285 (message "Package menu: Operation finished. %d packages %s"
3286 (length removable) 3286 (length removable)
3287 (substitute-command-keys 3287 (substitute-command-keys
@@ -3353,7 +3353,7 @@ Store this list in `package-menu--new-package-list'."
3353 3353
3354(defun package-menu--find-and-notify-upgrades () 3354(defun package-menu--find-and-notify-upgrades ()
3355 "Notify the user of upgradable packages." 3355 "Notify the user of upgradable packages."
3356 (when-let ((upgrades (package-menu--find-upgrades))) 3356 (when-let* ((upgrades (package-menu--find-upgrades)))
3357 (message "%d package%s can be upgraded; type `%s' to mark %s for upgrading." 3357 (message "%d package%s can be upgraded; type `%s' to mark %s for upgrading."
3358 (length upgrades) 3358 (length upgrades)
3359 (if (= (length upgrades) 1) "" "s") 3359 (if (= (length upgrades) 1) "" "s")
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 64cfab143ec..6a3b9e17439 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -71,7 +71,7 @@ struct.")
71 "Remove DESCRIPTOR from `file-notify-descriptors'. 71 "Remove DESCRIPTOR from `file-notify-descriptors'.
72DESCRIPTOR should be an object returned by `file-notify-add-watch'. 72DESCRIPTOR should be an object returned by `file-notify-add-watch'.
73If it is registered in `file-notify-descriptors', a stopped event is sent." 73If it is registered in `file-notify-descriptors', a stopped event is sent."
74 (when-let (watch (gethash descriptor file-notify-descriptors)) 74 (when-let* ((watch (gethash descriptor file-notify-descriptors)))
75 ;; Send `stopped' event. 75 ;; Send `stopped' event.
76 (unwind-protect 76 (unwind-protect
77 (funcall 77 (funcall
@@ -106,12 +106,12 @@ It is a form ((DESCRIPTOR ACTION FILE [FILE1-OR-COOKIE]) CALLBACK).")
106(defun file-notify--event-watched-file (event) 106(defun file-notify--event-watched-file (event)
107 "Return file or directory being watched. 107 "Return file or directory being watched.
108Could be different from the directory watched by the backend library." 108Could be different from the directory watched by the backend library."
109 (when-let (watch (gethash (car event) file-notify-descriptors)) 109 (when-let* ((watch (gethash (car event) file-notify-descriptors)))
110 (file-notify--watch-absolute-filename watch))) 110 (file-notify--watch-absolute-filename watch)))
111 111
112(defun file-notify--event-file-name (event) 112(defun file-notify--event-file-name (event)
113 "Return file name of file notification event, or nil." 113 "Return file name of file notification event, or nil."
114 (when-let (watch (gethash (car event) file-notify-descriptors)) 114 (when-let* ((watch (gethash (car event) file-notify-descriptors)))
115 (directory-file-name 115 (directory-file-name
116 (expand-file-name 116 (expand-file-name
117 (or (and (stringp (nth 2 event)) (nth 2 event)) "") 117 (or (and (stringp (nth 2 event)) (nth 2 event)) "")
@@ -121,7 +121,7 @@ Could be different from the directory watched by the backend library."
121(defun file-notify--event-file1-name (event) 121(defun file-notify--event-file1-name (event)
122 "Return second file name of file notification event, or nil. 122 "Return second file name of file notification event, or nil.
123This is available in case a file has been moved." 123This is available in case a file has been moved."
124 (when-let (watch (gethash (car event) file-notify-descriptors)) 124 (when-let* ((watch (gethash (car event) file-notify-descriptors)))
125 (and (stringp (nth 3 event)) 125 (and (stringp (nth 3 event))
126 (directory-file-name 126 (directory-file-name
127 (expand-file-name 127 (expand-file-name
@@ -375,7 +375,7 @@ FILE is the name of the file whose event is being reported."
375(defun file-notify-rm-watch (descriptor) 375(defun file-notify-rm-watch (descriptor)
376 "Remove an existing watch specified by its DESCRIPTOR. 376 "Remove an existing watch specified by its DESCRIPTOR.
377DESCRIPTOR should be an object returned by `file-notify-add-watch'." 377DESCRIPTOR should be an object returned by `file-notify-add-watch'."
378 (when-let (watch (gethash descriptor file-notify-descriptors)) 378 (when-let* ((watch (gethash descriptor file-notify-descriptors)))
379 (let ((handler (find-file-name-handler 379 (let ((handler (find-file-name-handler
380 (file-notify--watch-directory watch) 380 (file-notify--watch-directory watch)
381 'file-notify-rm-watch))) 381 'file-notify-rm-watch)))
@@ -399,7 +399,7 @@ DESCRIPTOR should be an object returned by `file-notify-add-watch'."
399(defun file-notify-valid-p (descriptor) 399(defun file-notify-valid-p (descriptor)
400 "Check a watch specified by its DESCRIPTOR. 400 "Check a watch specified by its DESCRIPTOR.
401DESCRIPTOR should be an object returned by `file-notify-add-watch'." 401DESCRIPTOR should be an object returned by `file-notify-add-watch'."
402 (when-let (watch (gethash descriptor file-notify-descriptors)) 402 (when-let* ((watch (gethash descriptor file-notify-descriptors)))
403 (let ((handler (find-file-name-handler 403 (let ((handler (find-file-name-handler
404 (file-notify--watch-directory watch) 404 (file-notify--watch-directory watch)
405 'file-notify-valid-p))) 405 'file-notify-valid-p)))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 996b0ac5afc..214cf61e84d 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -8410,7 +8410,7 @@ Used in `message-simplify-recipients'."
8410 (save-excursion 8410 (save-excursion
8411 (goto-char (point-min)) 8411 (goto-char (point-min))
8412 (while (not (eobp)) 8412 (while (not (eobp))
8413 (when-let ((props (get-text-property (point) 'display))) 8413 (when-let* ((props (get-text-property (point) 'display)))
8414 (when (and (consp props) 8414 (when (and (consp props)
8415 (eq (car props) 'image)) 8415 (eq (car props) 'image))
8416 (put-text-property (point) (1+ (point)) 'display nil) 8416 (put-text-property (point) (1+ (point)) 'display nil)
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 2943c8dc7d2..6424d9d780b 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -950,7 +950,7 @@ textual parts.")
950 internal-move-group server message-id 950 internal-move-group server message-id
951 nnimap-request-articles-find-limit))))) 951 nnimap-request-articles-find-limit)))))
952 ;; Move the article to a different method. 952 ;; Move the article to a different method.
953 (when-let ((result (eval accept-form))) 953 (when-let* ((result (eval accept-form)))
954 (nnimap-change-group group server) 954 (nnimap-change-group group server)
955 (nnimap-delete-article article) 955 (nnimap-delete-article article)
956 result)))))) 956 result))))))
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 2a68f777d95..8bcd18864c1 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -375,7 +375,7 @@ format. See `ibuffer-update-saved-filters-format' and
375 (let ((fixed (ibuffer-update-saved-filters-format ibuffer-saved-filters))) 375 (let ((fixed (ibuffer-update-saved-filters-format ibuffer-saved-filters)))
376 (prog1 376 (prog1
377 (setq ibuffer-saved-filters (cdr fixed)) 377 (setq ibuffer-saved-filters (cdr fixed))
378 (when-let (old-format-detected (car fixed)) 378 (when-let* ((old-format-detected (car fixed)))
379 (let ((warning-series t) 379 (let ((warning-series t)
380 (updated-form 380 (updated-form
381 (with-output-to-string 381 (with-output-to-string
diff --git a/lisp/mpc.el b/lisp/mpc.el
index cce752739be..73692e228f7 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -1029,12 +1029,12 @@ If PLAYLIST is t or nil or missing, use the main playlist."
1029 (let ((dir (file-name-directory (cdr (assq 'file info))))) 1029 (let ((dir (file-name-directory (cdr (assq 'file info)))))
1030 ;; (debug) 1030 ;; (debug)
1031 (push `(equal ',dir (file-name-directory (cdr (assq 'file info)))) pred) 1031 (push `(equal ',dir (file-name-directory (cdr (assq 'file info)))) pred)
1032 (if-let ((covers '(".folder.png" "cover.jpg" "folder.jpg")) 1032 (if-let* ((covers '(".folder.png" "cover.jpg" "folder.jpg"))
1033 (cover (cl-loop for file in (directory-files (mpc-file-local-copy dir)) 1033 (cover (cl-loop for file in (directory-files (mpc-file-local-copy dir))
1034 if (member (downcase file) covers) 1034 if (member (downcase file) covers)
1035 return (concat dir file))) 1035 return (concat dir file)))
1036 (file (with-demoted-errors "MPC: %s" 1036 (file (with-demoted-errors "MPC: %s"
1037 (mpc-file-local-copy cover)))) 1037 (mpc-file-local-copy cover))))
1038 (let (image) 1038 (let (image)
1039 (if (null size) (setq image (create-image file)) 1039 (if (null size) (setq image (create-image file))
1040 (let ((tempfile (make-temp-file "mpc" nil ".jpg"))) 1040 (let ((tempfile (make-temp-file "mpc" nil ".jpg")))
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 03d9172b655..2938e35dd5f 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -521,7 +521,7 @@ Currently this means either text/html or application/xhtml+xml."
521(defun eww-tag-meta (dom) 521(defun eww-tag-meta (dom)
522 (when (and (cl-equalp (dom-attr dom 'http-equiv) "refresh") 522 (when (and (cl-equalp (dom-attr dom 'http-equiv) "refresh")
523 (< eww-redirect-level 5)) 523 (< eww-redirect-level 5))
524 (when-let (refresh (dom-attr dom 'content)) 524 (when-let* ((refresh (dom-attr dom 'content)))
525 (when (or (string-match "^\\([0-9]+\\) *;.*url=\"\\([^\"]+\\)\"" refresh) 525 (when (or (string-match "^\\([0-9]+\\) *;.*url=\"\\([^\"]+\\)\"" refresh)
526 (string-match "^\\([0-9]+\\) *;.*url='\\([^']+\\)'" refresh) 526 (string-match "^\\([0-9]+\\) *;.*url='\\([^']+\\)'" refresh)
527 (string-match "^\\([0-9]+\\) *;.*url=\\([^ ]+\\)" refresh)) 527 (string-match "^\\([0-9]+\\) *;.*url=\\([^ ]+\\)" refresh))
@@ -1110,13 +1110,13 @@ just re-display the HTML already fetched."
1110See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") 1110See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
1111 1111
1112(defun eww-process-text-input (beg end replace-length) 1112(defun eww-process-text-input (beg end replace-length)
1113 (when-let (pos (and (< (1+ end) (point-max)) 1113 (when-let* ((pos (and (< (1+ end) (point-max))
1114 (> (1- end) (point-min)) 1114 (> (1- end) (point-min))
1115 (cond 1115 (cond
1116 ((get-text-property (1+ end) 'eww-form) 1116 ((get-text-property (1+ end) 'eww-form)
1117 (1+ end)) 1117 (1+ end))
1118 ((get-text-property (1- end) 'eww-form) 1118 ((get-text-property (1- end) 'eww-form)
1119 (1- end))))) 1119 (1- end))))))
1120 (let* ((form (get-text-property pos 'eww-form)) 1120 (let* ((form (get-text-property pos 'eww-form))
1121 (properties (text-properties-at pos)) 1121 (properties (text-properties-at pos))
1122 (buffer-undo-list t) 1122 (buffer-undo-list t)
@@ -1799,8 +1799,8 @@ If CHARSET is nil then use UTF-8."
1799 (setq eww-data (list :title "")) 1799 (setq eww-data (list :title ""))
1800 ;; Don't let the history grow infinitely. We store quite a lot of 1800 ;; Don't let the history grow infinitely. We store quite a lot of
1801 ;; data per page. 1801 ;; data per page.
1802 (when-let (tail (and eww-history-limit 1802 (when-let* ((tail (and eww-history-limit
1803 (nthcdr eww-history-limit eww-history))) 1803 (nthcdr eww-history-limit eww-history))))
1804 (setcdr tail nil))) 1804 (setcdr tail nil)))
1805 1805
1806(defvar eww-current-buffer) 1806(defvar eww-current-buffer)
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index fe93fc32ad3..cb915da1c1c 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1363,7 +1363,7 @@ ones, in case fg and bg are nil."
1363 plist))) 1363 plist)))
1364 1364
1365(defun shr-tag-base (dom) 1365(defun shr-tag-base (dom)
1366 (when-let (base (dom-attr dom 'href)) 1366 (when-let* ((base (dom-attr dom 'href)))
1367 (setq shr-base (shr-parse-base base))) 1367 (setq shr-base (shr-parse-base base)))
1368 (shr-generic dom)) 1368 (shr-generic dom))
1369 1369
@@ -1388,7 +1388,7 @@ ones, in case fg and bg are nil."
1388 (unless shr-inhibit-images 1388 (unless shr-inhibit-images
1389 (let ((start (point)) 1389 (let ((start (point))
1390 url multimedia image) 1390 url multimedia image)
1391 (when-let (type (dom-attr dom 'type)) 1391 (when-let* ((type (dom-attr dom 'type)))
1392 (when (string-match "\\`image/svg" type) 1392 (when (string-match "\\`image/svg" type)
1393 (setq url (dom-attr dom 'data) 1393 (setq url (dom-attr dom 'data)
1394 image t))) 1394 image t)))
@@ -2178,7 +2178,7 @@ flags that control whether to collect or render objects."
2178 (when (and (not (stringp column)) 2178 (when (and (not (stringp column))
2179 (or (memq (dom-tag column) '(td th)) 2179 (or (memq (dom-tag column) '(td th))
2180 (not column))) 2180 (not column)))
2181 (when-let (span (dom-attr column 'rowspan)) 2181 (when-let* ((span (dom-attr column 'rowspan)))
2182 (aset rowspans i (+ (aref rowspans i) 2182 (aset rowspans i (+ (aref rowspans i)
2183 (1- (string-to-number span))))) 2183 (1- (string-to-number span)))))
2184 ;; Sanity check for invalid column-spans. 2184 ;; Sanity check for invalid column-spans.
diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
index 8f66f1c9541..eddaa89ef97 100644
--- a/lisp/progmodes/prog-mode.el
+++ b/lisp/progmodes/prog-mode.el
@@ -225,11 +225,11 @@ on the symbol."
225 (apply #'font-lock-flush prettify-symbols--current-symbol-bounds) 225 (apply #'font-lock-flush prettify-symbols--current-symbol-bounds)
226 (setq prettify-symbols--current-symbol-bounds nil)) 226 (setq prettify-symbols--current-symbol-bounds nil))
227 ;; Unprettify the current symbol. 227 ;; Unprettify the current symbol.
228 (when-let ((c (get-prop-as-list 'composition)) 228 (when-let* ((c (get-prop-as-list 'composition))
229 (s (get-prop-as-list 'prettify-symbols-start)) 229 (s (get-prop-as-list 'prettify-symbols-start))
230 (e (get-prop-as-list 'prettify-symbols-end)) 230 (e (get-prop-as-list 'prettify-symbols-end))
231 (s (apply #'min s)) 231 (s (apply #'min s))
232 (e (apply #'max e))) 232 (e (apply #'max e)))
233 (with-silent-modifications 233 (with-silent-modifications
234 (setq prettify-symbols--current-symbol-bounds (list s e)) 234 (setq prettify-symbols--current-symbol-bounds (list s e))
235 (remove-text-properties s e '(composition)))))) 235 (remove-text-properties s e '(composition))))))
diff --git a/lisp/svg.el b/lisp/svg.el
index fc1a6d60e1a..8310eba6292 100644
--- a/lisp/svg.el
+++ b/lisp/svg.el
@@ -264,10 +264,10 @@ If the SVG is later changed, the image will also be updated."
264 264
265(defun svg-remove (svg id) 265(defun svg-remove (svg id)
266 "Remove the element identified by ID from SVG." 266 "Remove the element identified by ID from SVG."
267 (when-let ((node (car (dom-by-id 267 (when-let* ((node (car (dom-by-id
268 svg 268 svg
269 (concat "\\`" (regexp-quote id) 269 (concat "\\`" (regexp-quote id)
270 "\\'"))))) 270 "\\'")))))
271 (dom-remove-node svg node))) 271 (dom-remove-node svg node)))
272 272
273(provide 'svg) 273(provide 'svg)
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 1e49ca81fcc..44ba870662a 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -1045,7 +1045,7 @@ This function simply drops any transparency."
1045 "Check whether STR, seen at point, is CSS named color. 1045 "Check whether STR, seen at point, is CSS named color.
1046Returns STR if it is a valid color. Special care is taken 1046Returns STR if it is a valid color. Special care is taken
1047to exclude some SCSS constructs." 1047to exclude some SCSS constructs."
1048 (when-let ((color (assoc str css--color-map))) 1048 (when-let* ((color (assoc str css--color-map)))
1049 (save-excursion 1049 (save-excursion
1050 (goto-char start-point) 1050 (goto-char start-point)
1051 (forward-comment (- (point))) 1051 (forward-comment (- (point)))
@@ -1154,7 +1154,7 @@ for determining whether point is within a selector."
1154 1154
1155(defun css--colon-inside-funcall () 1155(defun css--colon-inside-funcall ()
1156 "Return t if point is inside a function call." 1156 "Return t if point is inside a function call."
1157 (when-let (opening-paren-pos (nth 1 (syntax-ppss))) 1157 (when-let* ((opening-paren-pos (nth 1 (syntax-ppss))))
1158 (save-excursion 1158 (save-excursion
1159 (goto-char opening-paren-pos) 1159 (goto-char opening-paren-pos)
1160 (eq (char-after) ?\()))) 1160 (eq (char-after) ?\())))
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 1f99786ae7c..78fbbb59363 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -2242,8 +2242,8 @@ The result is cached in `html--buffer-classes-cache'."
2242 (classes 2242 (classes
2243 (seq-mapcat 2243 (seq-mapcat
2244 (lambda (el) 2244 (lambda (el)
2245 (when-let (class-list 2245 (when-let* ((class-list
2246 (cdr (assq 'class (dom-attributes el)))) 2246 (cdr (assq 'class (dom-attributes el)))))
2247 (split-string class-list))) 2247 (split-string class-list)))
2248 (dom-by-class dom "")))) 2248 (dom-by-class dom ""))))
2249 (setq-local html--buffer-classes-cache (cons tick classes)) 2249 (setq-local html--buffer-classes-cache (cons tick classes))
@@ -2260,8 +2260,8 @@ The result is cached in `html--buffer-ids-cache'."
2260 (ids 2260 (ids
2261 (seq-mapcat 2261 (seq-mapcat
2262 (lambda (el) 2262 (lambda (el)
2263 (when-let (id-list 2263 (when-let* ((id-list
2264 (cdr (assq 'id (dom-attributes el)))) 2264 (cdr (assq 'id (dom-attributes el)))))
2265 (split-string id-list))) 2265 (split-string id-list)))
2266 (dom-by-id dom "")))) 2266 (dom-by-id dom ""))))
2267 (setq-local html--buffer-ids-cache (cons tick ids)) 2267 (setq-local html--buffer-ids-cache (cons tick ids))