1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00
Commit Graph

233 Commits

Author SHA1 Message Date
Stefan Kangas
3f8db3bbe5 image-dired: Fix gallery directory permissions
* lisp/image/image-dired.el (image-dired-gallery-generate): Set
umask to 077 before creating gallery directory.
2023-08-05 17:57:52 +02:00
Manuel Giraud
9026990c66 Fix thumbnail update when thumb name is based on image content
* lisp/image/image-dired-util.el
(image-dired-update-thumbnail-at-point): New function to update
thumbnail when original image contents changed.
* lisp/image/image-dired-external.el
(image-dired-rotate-original): Use it.
* lisp/image/image-dired.el (image-dired-display-thumbs): Fix
spacing while here.  (Bug#61394)
2023-08-04 13:52:37 +03:00
Manuel Giraud
7b30e11b2a Revert thumbnail naming for 'per-directory' storage method
* lisp/image/image-dired-util.el (image-dired-thumb-name): Revert
to "filename.thumb.jpg" for 'per-directory' storage.  (Bug#61394)

* lisp/image/image-dired.el (image-dired-thumbnail-storage): Fix
documentation.
2023-08-03 11:42:13 +03:00
Manuel Giraud
83b6a8a514 New option 'image-dired-thumb-naming' (bug#61394)
* lisp/image/image-dired.el (image-dired-thumb-naming): New user
option to control thumbnail name.

* lisp/image/image-dired-util.el (image-dired-thumb-name): Update
to use new user option and compute contents SHA-1 if needed.
(image-dired-contents-sha1): New function to compute the SHA-1 of the
first 4KiB of a file.
2023-07-27 17:00:59 +03:00
Eli Zaretskii
5fecdbcd81 Merge from origin/emacs-29
5ef7ff0573 ; Start a new ChangeLog.4 file.
11126c6d30 Fix 'C-h k' for "Paste from Kill Menu" in context menus
74ddfe811f ; * doc/misc/calc.texi (Rewrites Tutorial): Fix a typo (b...
08cda286c3 Improve the documentation of the XDS support
14d1c00e80 Allow reindentation of images inserted by 'mm-inline-image'
b63a9eda01 Fix "C-h k" and "C-h c" with Paste from Kill Menu
b36c21e27d Change cursor color on NS port when it matches the face b...
96714c106b Improve documentation of image-related commands
6a2863ca01 Fix handling of sliced images
5be79fd05a ; * etc/NEWS: Announce 'cyrillic-mongolian' IM.
ca1a0fda98 ; Fix last change.
ce63462dbd Add cyrillic-mongolian input method
5880179270 ; Minor addition to the Emacs FAQ
88847dee12 Jsonrpc: don't bind inhibit-read-only to t so early
cb8c87a423 Allow active region when IM is used

# Conflicts:
#	etc/NEWS
2023-04-15 12:43:37 -04:00
Eli Zaretskii
6a2863ca01 Fix handling of sliced images
* lisp/image.el (image-slice-map): New keymap, without some
bindings that make no sense with sliced images.
(insert-image, insert-sliced-image): Use it.
(insert-sliced-image): Make the 'keymap' property rear-nonsticky,
to prevent calling image commands when point is to the right of
the slice.  (Bug#62679)

* lisp/image/image-crop.el (image-cut, image-crop): Doc fixes.
(image-crop): Don't try using stock MS-Widows convert.exe
program.  Use 'image--get-image' to support sliced images.
2023-04-08 12:43:34 +03:00
Manuel Giraud
54949f0669 Fix out of sync counters in image-dired
* lisp/image/image-dired.el (image-dired-delete-char): Update
thumbnails counter upon deletion.
(image-dired--update-header-line): Compute thumbnail index
dynamically.
(image-dired-insert-thumbnail): Remove now unused image-number
text property.  (Bug#61922)
2023-03-09 12:01:38 +02:00
Stefan Kangas
4a5335158d Merge from origin/emacs-29
97a83ff31f Eglot: fix M-x eglot-show-workspace-configuration (bug#61...
48a0804d10 ruby-mode: Fix method call indentation in rhs of multiple...
16d012cf3b * lisp/net/tramp.el (tramp-remote-path): Improve docstring.
b371697cdc Minor change in 'dired--find-possibly-alternative-file'
c2b5c6acc5 Implement prefix arg for 'c-ts-mode-toggle-comment-style'
eb2ab52fb0 Defaults to zero for image-dired--number-of-thumbnails
5dc163f592 ; Add a doc string for 'ediff-window-display-p' obsolescence
2023-03-01 06:30:20 +01:00
Manuel Giraud
eb2ab52fb0 Defaults to zero for image-dired--number-of-thumbnails
* lisp/image/image-dired.el (image-dired--number-of-thumbnails):
Defaults zero to avoid wrong type argument error.  (Bug#61734)
2023-02-28 15:25:07 +02:00
Stefan Kangas
fad3665069 Merge from origin/emacs-29
94e70ed426 ; * lisp/emacs-lisp/eldoc.el (eldoc-display-in-echo-area)...
1841299a11 Eglot: implement inlay hints (bug#61412, bug#61066)
28ed0d1840 Eglot: run eglot-managed-mode-hook after LSP didOpen
7ad5d9babe Eglot: restore eldoc-documentation-functions on shutdown
711a775ba7 Eglot: simplify capability-checking code
ea7251ad6d Eglot: go back to setting eldoc-documentation-strategy again
6016f1982d ; * etc/NEWS: Fix typo again
d411b4d1fd ; * etc/NEWS (C-x v !): Additional text.
a0b6725234 ; * doc/emacs/vc1-xtra.texi (Preparing Patches): Wording ...
43c4dd6f96 ; * doc/emacs/anti.texi (Antinews): Adjust to latest chan...
20c654b6f8 Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs ...
177d0cf2a9 ; * etc/NEWS: Fix typos.
db7096a532 Yield to erc-move-to-prompt before unhiding prompt
db21c84bc9 ; Improve doc string of 'C-q'
a6be0be1db ; Clarify "kill files" in Gnus manual
d816429e2f * lisp/progmodes/python.el (python--import-sources): Fix ...
1f4886fdb0 Do not error out on non image file (bug#61639)
003759a6dc Explain effect of variable-pitch fonts on fill-column
ba91a76659 Avoid division by zero in get_narrowed_* functions
fb5dbf6de7 ; Fix documentation of 'icon-title-format'.
48c9a50771 * etc/NEWS: Mention new buffer display action alist entries
4dc1f2b9a0 ; * src/xterm.c (x_update_end): Condition on HAVE_XDBE
f1c8389806 Fix build --without-xdbe
ef38774c02 Improve dnd-direct-save-remote-files docstring
cf53e62a79 Add 'process-status' to process shortdoc
68df9e5953 * lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename)...
06ba948416 Improve text about deleting windows
1976ca1634 Make 'emacs-news-cycle-tag' work at all levels

# Conflicts:
#	etc/NEWS
2023-02-23 06:30:16 +01:00
Manuel Giraud
1f4886fdb0 Do not error out on non image file (bug#61639)
* lisp/image/image-dired.el
(image-dired-display-thumbs): Do not insert non image file and do not
display image-dired buffer if it is empty.
2023-02-22 15:20:45 +02:00
Stefan Kangas
47c833537a Merge from origin/emacs-29
1630bfb5d0 Merge from origin/emacs-28
e2ac0d416b ; Merge from origin/emacs-28
068b53500e ; Improve image-dired-thumbnail-storage docstring
497ed0fb42 ; * doc/emacs/dired.texi (Image-Dired): Fix last change.
4aa397e71b More doc on image-dired-dired-* (bug#61624)
893ddd5903 Eglot: improve treatment of completion items without :sor...
4a77fcb147 Update ChangeLog and AUTHORS for Emacs 28.3
e339926272 Fix etags local command injection vulnerability
5d05ea803e Fixed ctags local command execute vulnerability
22fb5ff512 Fix ruby-mode.el local command injection vulnerability (b...
807d2d5b3a Fix htmlfontify.el command injection vulnerability.
ae9bfed50d Fix storing email into nnmail by Gnus
2023-02-21 10:28:34 +01:00
Stefan Kangas
068b53500e ; Improve image-dired-thumbnail-storage docstring
* lisp/image/image-dired.el (image-dired-thumbnail-storage):
Improve docstring.
2023-02-19 17:30:53 +01:00
Stefan Kangas
34f44ae07e Merge from origin/emacs-29
871cf33a45 ; * admin/make-tarball.txt: Minor copyedit.
4faebba2fe Fix invocation of File->Close from the menu bar
cd05fca5f7 ; Improve documentation of 'native-comp-enable-subr-tramp...
c61a30e160 Update thumbnail buffer's header more
4c49452cde (treesit-query-validate): Fix reusing the output buffer
d560dc5044 (rust-ts-mode--font-lock-settings): Highlight closure par...
c15bc91e1b * Fix `native-comp-enable-subr-trampolines' semantic
774051873d Fix documentation of 'just-one-space' and 'delete-horizon...
7337f07250 ; Remove NEWS entry about deleted variable.
fb5299ba09 ; Fix wording of last change.
9f508cef85 Fix 'display-buffer-use-least-recent-window'
5190ea6259 Fix point moving when calling python-shell-send-region
6c0d821017 (project-try-vc): Remove unused defvar/require
4f9862e435 ; Fix typo
a638c79bc5 Delete redundant question from Gnus FAQ
4a90d67eb6 Slightly improve hashcash documentation
6ea3c105ab Fix cursor motion when there's line-prefix and display st...
e985466556 Fix comment in treesit_record_change (bug#61369)
1e5cebc88b Spell out RPN abbreviation in Calc manual intro

# Conflicts:
#	etc/NEWS
#	lisp/window.el
2023-02-19 11:38:09 +01:00
Manuel Giraud
c61a30e160 Update thumbnail buffer's header more
* lisp/image/image-dired.el (image-dired-display-thumbs): Call
image-dired--update-header-line.  (Bug#61508)
2023-02-19 08:24:52 +02:00
Stefan Kangas
08bd066149 Merge from origin/emacs-29
4da398d8b5 ; Fix typos
074008ee2d ; Fix doc strings in lisp/image/ directory
2d1e43436d ; Improve documentation of hash functions.
900f7e0727 ; Remove extraneous local variables from image-dired-*.el...
4f053afe8e bug-reference: prevent match-data clobbering (bug#61395)
10af9fbcad ; * admin/notes/tree-sitter/starter-guide: Typos.
9ac242ce93 ; Fix recent changes in treesit docs
f5789aefc2 Rename LIMIT to DEPTH in tree-sitter functions (bug#61231)
b39821fdce ; Fix incorrect function name in treesit manual
5190173696 Add 'live' property to treesit-node-check (bug#61235)
56960a6558 Update to Transient v0.3.7-205-gb8ad0da
68a6b364d1 Fix 'rmail-summary-output'
67c6ec2559 lisp-mode: add docstring recognition for more common lisp...
417a8ed8b0 ; Improve discoverability of empty file names handling
e47cf6ca15 Update to Transient v0.3.7-204-gecff8c2
b04cce02ff Fix Scala entry in Eglot's DB of LSP servers

# Conflicts:
#	lisp/transient.el
2023-02-12 03:27:46 +01:00
Stefan Kangas
4da398d8b5 ; Fix typos 2023-02-12 03:23:41 +01:00
Eli Zaretskii
074008ee2d ; Fix doc strings in lisp/image/ directory
* lisp/image/wallpaper.el (wallpaper-setter)
(wallpaper--find-command, wallpaper--x-monitor-name)
(wallpaper--format-arg):
* lisp/image/image-dired-util.el
(image-dired-associated-dired-buffer)
(image-dired--with-dired-buffer):
* lisp/image/image-dired-tags.el (image-dired--with-db-file)
(image-dired-remove-tag, image-dired-list-tags)
(image-dired-tag-files, image-dired-write-comments)
(image-dired-update-property):
* lisp/image/image-dired-external.el (image-dired-cmd-pngnq-options)
(image-dired-cmd-pngcrush-program)
(image-dired-cmd-pngcrush-options)
(image-dired-cmd-optipng-options)
(image-dired-cmd-create-standard-thumbnail-options)
(image-dired-cmd-rotate-original-program)
(image-dired-cmd-rotate-original-options)
(image-dired-cmd-write-exif-data-options, image-dired-queue)
(image-dired-queue-active-limit, image-dired-pngnq-thumb)
(image-dired-pngcrush-thumb, image-dired-optipng-thumb)
(image-dired-thumb-queue-run, image-dired-get-exif-file-name)
(image-dired-thumbnail-set-image-description):
* lisp/image/image-dired.el (image-dired-thumbnail-storage)
(image-dired-tags-db-file)
(image-dired-rotate-original-ask-before-overwrite)
(image-dired-line-up-method, image-dired-track-movement)
(image-dired-display-properties-format)
(image-dired-external-viewer)
(image-dired-show-all-from-dir-max-files)
(image-dired-insert-image)
(image-dired-dired-with-window-configuration)
(image-dired-restore-window-configuration)
(image-dired-track-original-file)
(image-dired-toggle-movement-tracking)
(image-dired-format-properties-string)
(image-dired--on-file-in-dired-buffer)
(image-dired-thumbnail-display-external)
(image-dired-display-image, image-dired-copy-filename-as-kill):
* lisp/image/image-dired-dired.el
(image-dired-dired-toggle-marked-thumbs)
(image-dired-dired-after-readin-hook)
(image-dired-next-line-and-display)
(image-dired-previous-line-and-display)
(image-dired-mark-and-display-next, image-dired-track-thumbnail)
(image-dired-dired-next-line, image-dired-dired-previous-line)
(image-dired-dired-display-external)
(image-dired-copy-with-exif-file-name)
(image-dired-mark-tagged-files)
(image-dired-dired-display-properties):
* lisp/image/image-crop.el (image-crop-exif-rotate)
(image-crop-resize-command, image-crop-cut-command)
(image-crop-crop-command, image-crop-rotate-command)
(image-crop-buffer-text-function, image-cut-color):
* lisp/image/image-converter.el (image-converter)
(image-convert-to-format, image-converter-regexp)
(image-converter--converters, image-convert-p, image-convert)
(image-converter--value, image-converter--probe)
(image-converter--find-converter, image-converter--convert)
(image-converter-add-handler):
* lisp/image/exif.el (exif-parse-buffer, exif-field)
(exif-orientation, exif--direct-ascii-value)
(exif--process-value, exif--read-chunk, exif--read-number-be)
(exif--read-number-le, exif--read-number): Fix doc strings.
2023-02-11 16:49:54 +02:00
Eli Zaretskii
900f7e0727 ; Remove extraneous local variables from image-dired-*.el files
These cause annoying prompts when visiting these files, and evidently
belong to a third-party package.
* lisp/image/image-dired-external.el:
* lisp/image/image-dired-tags.el:
* lisp/image/image-dired-dired.el:
* lisp/image/image-dired-util.el: Remove unsafe local-variables.
2023-02-11 11:48:48 +02:00
Mattias Engdegård
0bece4d33f Data argument to signal should be a list
* lisp/calendar/iso8601.el (iso8601-parse, iso8601-parse-date)
(iso8601-parse-time, iso8601-parse-zone, iso8601-parse-duration)
(iso8601-parse-interval):
* lisp/emacs-lisp/cl-lib.el (cl-values-list):
* lisp/emacs-lisp/comp.el (comp-decrypt-arg-list)
(comp-spill-lap-function, comp-emit-switch)
(comp-compute-dominator-tree, comp-final):
* lisp/image.el (image-type):
* lisp/image/exif.el (exif--parse-jpeg, exif--parse-exif-chunk)
(exif--parse-directory, exif--read-chunk, exif--read-number-be)
(exif--read-number-le):
* lisp/vc/vc.el (vc-default-last-change):
Wrap obvious non-list data arguments to `signal` in a list.
2023-01-03 14:03:58 +01:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Stefan Kangas
db2ed9f333 ; Fix several symbol name typos 2022-10-26 23:04:23 +02:00
Stefan Kangas
5e83c0117e Fix setting the wallpaper with "swaybg" and "wbg"
* lisp/image/wallpaper.el (wallpaper-setter): Add 'init-action'
and 'detach' fields to structure.
(wallpaper--init-action-kill): New helper function.
(wallpaper--default-setters): Use above new fields for "swaybg" and
"wbg", to start/restart the corresponding processes as needed.
(wallpaper-default-set-function): Call 'init-action' function if
there is one.  If 'detach', use 'call-process' instead of
'start-process'.  (Bug#57781)

* test/lisp/image/wallpaper-tests.el (wallpaper--find-setter)
(wallpaper--find-setter/call-predicate)
(wallpaper--find-setter/set-current-setter)
(wallpaper-set/runs-command, wallpaper-set/runs-command/detach)
(wallpaper-set/calls-init-action)
(wallpaper-set/calls-wallpaper-set-function): New tests.
2022-10-07 22:07:09 +02:00
Stefan Kangas
55bd6a5cd4 ; Make wallpaper--format-arg more resilient
* lisp/image/wallpaper.el (wallpaper--format-arg): Make more
resilient to errors.
2022-10-07 10:53:55 +02:00
Stefan Kangas
d9bd14975b image-dired: Shorten several long names
* lisp/image/image-dired.el (image-dired-image-mode-map)
(image-dired-image-mode): Rename from
'image-dired-display-image-mode-map' and
'image-dired-display-image-mode'.  Update all uses and make old
names into obsolete aliases.
(image-dired-display-this, image-dired-display-next)
(image-dired-display-previous): Rename from
'image-dired-display-thumbnail-original-image',
'image-dired-display-next-thumbnail-original', and
'image-dired-display-previous-thumbnail-original'.  Update all uses
and make old names into obsolete aliases.
* doc/emacs/dired.texi (Image-Dired): Update documentation for the
above changes, and improve indexing.
2022-10-04 17:36:09 +02:00
Stefan Kangas
f4252f3171 image-dired: Fix arrow keys in thumbs buffer
* lisp/image/image-dired.el (image-dired-thumbnail-mode-map): Also
remap 'left-char' and 'right-char'.
2022-10-04 16:18:20 +02:00
Peter Münster
d4f56e9666 Delete thumbs in image-dired-do-flagged-delete after confirmation
* lisp/image/image-dired.el (image-dired-do-flagged-delete): Remove
thumbnails only after confirming deletion of the files.  (Bug#58255)
2022-10-02 20:16:37 +02:00
Eli Zaretskii
a577b12d64 ; * lisp/image/wallpaper.el (wallpaper--x-monitor-name): Doc fix. 2022-09-29 20:03:51 +03:00
Stefan Kangas
696c528379 Fix loading wallpaper.el on MS-Windows
* lisp/image/wallpaper.el (wallpaper--find-command)
(wallpaper--find-command-args): Avoid backtrace when
'wallpaper--find-setter' returns nil, e.g. on MS-Windows.
(Bug#58167)
2022-09-29 18:44:03 +02:00
Peter Münster
21fc2b04e9 New command image-dired-do-flagged-delete
* lisp/image/image-dired.el (image-dired-delete-marked): Remove command,
because it was too buggy.
(image-dired-do-flagged-delete): New command that does almost the same
as the above removed command but with flagged images.
(image-dired-thumbnail-mode-map): Bind "x" to
'image-dired-do-flagged-delete'.
2022-09-29 16:32:49 +02:00
Peter Münster
1457c231b5 image-dired-delete-char: Don't disturb formatting
* lisp/image/image-dired.el (image-dired-delete-char): Don't disturb
the expected formatting of the thumbnail buffer (always one
space/newline after a thumbnail).
2022-09-29 16:31:03 +02:00
Stefan Kangas
2c331dbb4e wallpaper-set: Get monitor name on non-graphical display
* lisp/image/wallpaper.el
(wallpaper--format-arg): Break out function from here...
(wallpaper--x-monitor-name): ...to here.  Try to get the monitor name
non-graphical displays, and prompt if that doesn't work.
(wallpaper-default-set-function): Improve debugging output.
Ref. https://lists.gnu.org/r/emacs-devel/2022-09/msg01910.html
2022-09-29 16:10:27 +02:00
Stefan Kangas
b71241742c Prompt for wallpaper width/height only when needed
* lisp/image/wallpaper.el (wallpaper--format-arg): Don't prompt for
width and height unless the values are actually used.
2022-09-29 15:39:58 +02:00
Stefan Kangas
26ef0f1221 ; image-dired: Fix last change
* test/lisp/image/image-dired-util-tests.el
(image-dired-thumb-name/per-directory):
* lisp/image/image-dired-util.el (image-dired-thumb-name): Fix
last change.
2022-09-28 14:29:11 +02:00
Stefan Kangas
ca043773db ; Fix debugging image-dired-dired-toggle-marked-thumbs
* lisp/image/image-dired-dired.el
(image-dired-dired-toggle-marked-thumbs): Fix debugging.
2022-09-28 12:36:42 +02:00
Stefan Kangas
6cffaa3b6d image-dired: End thumbnail file names with ".jpg"
* lisp/image/image-dired-util.el (image-dired-thumb-name): Always
end thumbnail name in ".jpg" and simplify naming to just use the
SHA-1 hash.  (Bug#57961)
* test/lisp/image/image-dired-util-tests.el
(image-dired-thumb-name/image-dired): Adjust test for the above
change.
* etc/NEWS: Announce the above change.
2022-09-28 12:36:42 +02:00
Stefan Kangas
adaa2fc90e ; * lisp/image/image-dired.el: Fix typo. 2022-09-27 23:28:28 +02:00
Stefan Kangas
9e0c21ea73 Make image-dired-dired-toggle-marked-thumbs faster
* lisp/image/image-dired-dired.el
(image-dired-dired-toggle-marked-thumbs): Don't show progress, since
it makes things slower.
2022-09-27 23:26:07 +02:00
Stefan Kangas
42290bf823 image-dired: Fix header line when file is missing
* lisp/image/image-dired.el
(image-dired-format-properties-string): Don't error when file has
been deleted.
2022-09-27 22:59:42 +02:00
Stefan Kangas
49d40cd953 ; Simplify wallpaper--format-arg with let-alist
* lisp/image/wallpaper.el (wallpaper--format-arg): Use let-alist.
2022-09-27 16:12:40 +02:00
Stefan Kangas
1e4f40db3a ; * lisp/image/wallpaper.el (wallpaper--format-arg): Fix typo. 2022-09-27 15:33:09 +02:00
Stefan Kangas
a27e483213 Fix OBOE in image-dired--with-marked
* lisp/image/image-dired.el (image-dired--with-marked): Fix off-by-one
error.
2022-09-27 02:14:54 +02:00
Stefan Kangas
93b9cf4184 Get rid of default wallpaper-setter constructor
* lisp/image/wallpaper.el (wallpaper-setter): Actually get rid of
the default constructor.
2022-09-26 21:32:55 +02:00
Stefan Kangas
bb9df76dc9 Set XFCE wallpaper also in single-workspace-mode
This fixes setting the wallpaper on XFCE whether or not the
"/backdrop/single-workspace-mode" setting is true or false.
That XFCE setting controls whether or not the same wallpaper is used
on all workspaces or not.

* lisp/image/wallpaper.el (wallpaper-setter)
(wallpaper-command-args, wallpaper-default-set-function): Allow
using a function for getting the command line arguments.
(wallpaper-xfce-command-args): New function.
(wallpaper--default-setters): Use above new function for XFCE.
2022-09-26 21:26:50 +02:00
Eli Zaretskii
6d0fec5ae0 ; * lisp/image/wallpaper.el (cl-macs): Require, to avoid warnings. 2022-09-26 19:29:47 +03:00
Stefan Kangas
2ec061bf9c Display a message when wallpaper was set
* lisp/image/wallpaper.el (wallpaper-default-set-function): Display a
message when the wallpaper was successfully set.
2022-09-26 17:41:39 +02:00
Stefan Kangas
b0289e7f6d Fix setting the wallpaper in XFCE
* lisp/image/wallpaper.el  (wallpaper-command-args)
(wallpaper-default-set-function): Support new format specifiers
%S for screen, %W for workspace, and %M for monitor.
(wallpaper--default-setters): Use above new specifiers for XFCE.
(wallpaper--format-arg): New defun broken out from...
(wallpaper-default-set-function): ...here.
(wallpaper--get-height-or-width): Support noninteractive use.
* test/lisp/image/wallpaper-tests.el (wallpaper--format-arg/filename)
(wallpaper--format-arg/filename-hex)
(wallpaper--format-arg/width, wallpaper--format-arg/screen)
(wallpaper--format-arg/monitor, wallpaper--format-arg/workspace):
New tests.
2022-09-26 17:41:37 +02:00
Stefan Kangas
35d5ad713e 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.
2022-09-26 17:41:09 +02:00
Stefan Kangas
9b73c9edda Autoload image-dired-thumbnail-storage :safe property
* lisp/image/image-dired.el (image-dired-thumbnail-storage):
Autoload :safe property.
2022-09-26 15:36:22 +02:00
Stefan Kangas
e0565e3896 Refactor system specific code in wallpaper.el
* lisp/image/wallpaper.el (wallpaper-set-function): New defvar
containing system specific function for setting wallpaper.
(wallpaper-default-set-function): Factor out function from...
(wallpaper-set): ...here.  Use above new defvar.

(wallpaper-default-file-name-regexp): Delete defvar.
(wallpaper-image-file-extensions): New defvar.
(wallpaper--image-file-regexp): New defun that returns a regexp to
match for completion purposes.

(wallpaper--use-default-set-function-p): New defun.
(wallpaper--find-command, wallpaper--find-command-arguments):
Do nothing on MS-Windows and Haiku.
2022-09-25 17:28:04 +02:00