]> git.eshelyaron.com Git - emacs.git/commit
Rewrite wallpaper.el to use a cl-defstruct
authorStefan Kangas <stefankangas@gmail.com>
Sun, 18 Sep 2022 09:48:24 +0000 (11:48 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Mon, 26 Sep 2022 15:41:09 +0000 (17:41 +0200)
commit35d5ad713ee05f5cd922f66462df41deed95f7e8
tree6546c8d79f7921476ecf769720a13dd44b713c9f
parenta386833503430732a5c9bed8dbc5c3073f72b5ab
Rewrite wallpaper.el to use a cl-defstruct

* lisp/image/wallpaper.el
(wallpaper--default-commands): Delete variable.
(wallpaper-setter): New cl-defstruct.
(wallpaper--default-methods-create): New macro.
(wallpaper--default-setters):
(wallpaper--current-setter): New variables.
(wallpaper--find-setter): New defun to pick a wallpaper-setter.
(wallpaper--find-command, wallpaper--find-command-args):
Use 'wallpaper--find-setter'.
(wallpaper-command): Doc fix.

* test/lisp/image/wallpaper-tests.el
(wallpaper--find-command/return-string)
(wallpaper--find-command-args/return-list)
(wallpaper--image-file-regexp/return-string): New tests.
lisp/image/wallpaper.el
test/lisp/image/wallpaper-tests.el