1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

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.
This commit is contained in:
Mark Oteiza 2017-09-12 13:08:47 -04:00
parent 4612b2a2b3
commit 370d0e7aa7
13 changed files with 57 additions and 57 deletions

View file

@ -1045,7 +1045,7 @@ This function simply drops any transparency."
"Check whether STR, seen at point, is CSS named color.
Returns STR if it is a valid color. Special care is taken
to exclude some SCSS constructs."
(when-let ((color (assoc str css--color-map)))
(when-let* ((color (assoc str css--color-map)))
(save-excursion
(goto-char start-point)
(forward-comment (- (point)))
@ -1154,7 +1154,7 @@ for determining whether point is within a selector."
(defun css--colon-inside-funcall ()
"Return t if point is inside a function call."
(when-let (opening-paren-pos (nth 1 (syntax-ppss)))
(when-let* ((opening-paren-pos (nth 1 (syntax-ppss))))
(save-excursion
(goto-char opening-paren-pos)
(eq (char-after) ?\())))