[Emacs] Simpler self-screenshot function

This commit is contained in:
Lucien Cartier-Tilet 2023-03-20 17:19:15 +01:00
parent 3b301d3bb6
commit 696c7cff3e
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
1 changed files with 4 additions and 5 deletions

View File

@ -574,11 +574,10 @@ As shown by the function `', type can weild the value `svg',
This function will output in /tmp a file beginning with \"Emacs\"
and ending with the extension of the requested TYPE."
(interactive)
(let* ((type (if type type
(intern (completing-read "Screenshot Type: "
'(png svg pdf postscript)))))
(extension (pcase type
(interactive (list
(intern (completing-read "Screenshot type: "
'(png svg pdf postscript)))))
(let* ((extension (pcase type
('png ".png")
('svg ".svg")
('pdf ".pdf")