]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoimage-dired: Fix thumbnail options for gm
Peter Münster [Fri, 16 Sep 2022 00:21:22 +0000 (02:21 +0200)]
image-dired: Fix thumbnail options for gm

* lisp/image/image-dired-external.el
(image-dired-cmd-create-standard-thumbnail-options): Fix options for
"gm" (GraphicsMagick).  (Bug#52200)

2 years ago; * etc/NEWS: Improve and re-arrange Image-Dired section.
Stefan Kangas [Thu, 15 Sep 2022 22:22:27 +0000 (00:22 +0200)]
; * etc/NEWS: Improve and re-arrange Image-Dired section.

2 years agoImprove image-dired-display-properties-format
Stefan Kangas [Thu, 15 Sep 2022 21:56:11 +0000 (23:56 +0200)]
Improve image-dired-display-properties-format

* lisp/image/image-dired.el
(image-dired-display-properties-format): Change default format,
improve docstring and add :safe property

2 years agoimage-dired: Show header line on start
Stefan Kangas [Thu, 15 Sep 2022 21:34:41 +0000 (23:34 +0200)]
image-dired: Show header line on start

* lisp/image/image-dired.el (image-dired-show-all-from-dir): Update
header line, to ensure that it is immediately visible on start.

2 years agocombine-change-calls-1: Fix case where `body` also changes other bufs
Stefan Monnier [Thu, 15 Sep 2022 20:31:00 +0000 (16:31 -0400)]
combine-change-calls-1: Fix case where `body` also changes other bufs

* lisp/subr.el (combine-change-calls-1): Only set the current buffer's part
of the `*-change-functions` hooks.

2 years agoimage-dired: Fix performance bug with mouse click
Stefan Kangas [Thu, 15 Sep 2022 20:19:00 +0000 (22:19 +0200)]
image-dired: Fix performance bug with mouse click

* lisp/image/image-dired.el
(image-dired--on-file-in-dired-buffer): Move call to
'image-dired-thumb-update-marks' from here...
(image-dired--do-mark-command): ...to here.  Add new optional
argument UPDATE to control calling it.  Update callers.
(image-dired-mouse-toggle-mark-1): Fix performance bug by setting
above new optional argument to nil.  (Bug#53599)

2 years agoMake image-dired-toggle-mark-thumb-original-file obsolete
Stefan Kangas [Thu, 15 Sep 2022 20:08:19 +0000 (22:08 +0200)]
Make image-dired-toggle-mark-thumb-original-file obsolete

* lisp/image/image-dired.el
(image-dired-toggle-mark-thumb-original-file): Make obsolete.
(image-dired-mouse-toggle-mark-1): Don't use above obsolete
function.

2 years agoInclude nil as valid wallpaper-commmand
Mattias Engdegård [Thu, 15 Sep 2022 19:59:16 +0000 (21:59 +0200)]
Include nil as valid wallpaper-commmand

* lisp/image/wallpaper.el (wallpaper-command):
Include nil in the type since that is a valid value for the variable,
and may be the default value.  This should fix test-custom-opts.

2 years agoCC Mode: Handle C++20 modules
Alan Mackenzie [Thu, 15 Sep 2022 19:54:22 +0000 (19:54 +0000)]
CC Mode: Handle C++20 modules

* lisp/progmodes/cc-engine.el (c-before-after-change-check-c++-modules): New
function.
(c-forward-<>-arglist): Add special handling for "import <...>".

* lisp/progmodes/cc-fonts.el (c-preprocessor-face-name): Add extra "fallback"
face after font-lock-reference-face, namely font-lock-constant-face.
(c-cpp-matchers): Don't fontify the <> delimiters for XEmacs in #include <..>.
(c-basic-matchers-before): Add c-font-lock-c++-modules to the C++ value.
(c-forward-c++-module-name, c-forward-c++-module-partition-name)
(c-font-lock-c++-modules): New functions.

* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions)
(c-before-font-lock-functions): Include
c-before-after-change-check-c++-modules in the C++ value of these variables.
(c-module-name-re): New c-lang-const/var.
(c-other-decl-kwds): Add a C++ value "export".
(c-<>-sexp-kwds): Add a new component c-import-<>-kwds.
(c-import-<>-kwds, c-module-kwds): New c-lang-consts.
(c-module-key): New c-lang-const/var.

2 years ago; Fix wallpaper-set on TTY
Stefan Kangas [Thu, 15 Sep 2022 17:21:51 +0000 (19:21 +0200)]
; Fix wallpaper-set on TTY

* lisp/image/wallpaper.el (wallpaper-set): Don't check for
'display-graphic-p', to allow setting the wallpaper from a TTY.

2 years agoDocument MS-Windows support in wallpaper.el
Stefan Kangas [Thu, 15 Sep 2022 17:12:10 +0000 (19:12 +0200)]
Document MS-Windows support in wallpaper.el

* lisp/image/wallpaper.el: Add MS-Windows to Commentary.
(wallpaper-command, wallpaper-command-args, wallpaper-set):
Document MS-Windows support.

2 years agoImprove error when wallpaper-command is nil
Stefan Kangas [Thu, 15 Sep 2022 16:48:41 +0000 (18:48 +0200)]
Improve error when wallpaper-command is nil

* lisp/image/wallpaper.el (wallpaper-set): Improve the error message
when 'wallpaper-command' is nil.

2 years agoSupport macOS in wallpaper.el
Stefan Kangas [Thu, 15 Sep 2022 16:27:48 +0000 (18:27 +0200)]
Support macOS in wallpaper.el

* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper-command): Support macOS using "osascript".
(wallpaper-set): Display image name when wallpaper-debug is t.

2 years agoFix outline image icon display (bug#57813)
Juri Linkov [Thu, 15 Sep 2022 16:30:17 +0000 (19:30 +0300)]
Fix outline image icon display (bug#57813)

* lisp/outline.el (outline--make-button-overlay): Don't overwrite
image display with string display when image exists.
(outline--fix-up-all-buttons): Optimize.

2 years ago; Silence byte-compiler in wallpaper.el
Stefan Kangas [Thu, 15 Sep 2022 13:44:06 +0000 (15:44 +0200)]
; Silence byte-compiler in wallpaper.el

* lisp/image/wallpaper.el (w32-set-wallpaper): Declare.

2 years ago; Fix last change in w32fns.c.
Eli Zaretskii [Thu, 15 Sep 2022 11:59:50 +0000 (14:59 +0300)]
; Fix last change in w32fns.c.

2 years agoImplement support for 'wallpaper-set' on MS-Windows
Eli Zaretskii [Thu, 15 Sep 2022 11:51:31 +0000 (14:51 +0300)]
Implement support for 'wallpaper-set' on MS-Windows

* src/w32fns.c (Fw32_set_wallpaper): New primitive.
(syms_of_w32fns): Defsubr it.
(globals_of_w32fns): Attempt to load SystemParametersInfoW from
its DLL at run time.

* lisp/image/wallpaper.el (wallpaper-set): Support MS-Windows by
calling 'w32-set-wallpaper'.

* etc/NEWS: Update and simplify wording of the 'wallpaper-set'
entry.

2 years agoAdd rudimentary font-locking to edit-abbrevs-mode
Stefan Kangas [Thu, 15 Sep 2022 09:27:57 +0000 (11:27 +0200)]
Add rudimentary font-locking to edit-abbrevs-mode

* lisp/abbrev.el (abbrev-table-name): New face.
(edit-abbrevs-mode-font-lock-keywords): New defvar.
(edit-abbrevs-mode): Support font-locking.

2 years agoUse `eql` or `eq` instead of `=` in some places
Mattias Engdegård [Sat, 27 Aug 2022 12:20:38 +0000 (14:20 +0200)]
Use `eql` or `eq` instead of `=` in some places

For a switch op to be generated, comparisons must be made using `eq`,
`eql` or `equal`, not `=`.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
* lisp/files.el (file-modes-char-to-who, file-modes-char-to-right):
* lisp/international/titdic-cnv.el (tit-process-header):
* lisp/language/ethio-util.el (ethio-input-special-character)
(ethio-fidel-to-tex-buffer):
* lisp/language/lao.el (consonant):
Use `eq` or `eql` instead of `=`.

In these cases either `eq` or `eql` would do and the choice does not
affect the resulting code.  We compare numbers with `eql` and
characters with `eq` as a matter of style.

2 years agoSimplify and shrink reader buffers
Mattias Engdegård [Wed, 14 Sep 2022 17:19:08 +0000 (19:19 +0200)]
Simplify and shrink reader buffers

A big on-stack buffer in a potentially long-running function can
interact badly with the GC's conservative scanning of the C stack.
It may make the scanning slower (since the stack frame is big) and
risks accidental retention of objects from stack detritus
(because the buffer isn't cleaned on entry).

* src/lread.c (stackbufsize): Remove.
(read_integer, read_string_literal, read_bool_vector): Use a local
buffer instead of piggy-backing on that in read0.
(read0): Reduce buffer to something suitable for most identifiers and
numbers.

2 years agomapconcat fast path with `identity` function argument
Mattias Engdegård [Wed, 14 Sep 2022 16:46:40 +0000 (18:46 +0200)]
mapconcat fast path with `identity` function argument

This makes (mapconcat #'identity SEQ) slightly faster than
(apply #'concat SEQ), which used to be much faster.
Notably, `string-join` benefits from this change as it uses mapconcat.

* src/fns.c (Fmapconcat): Speed up execution when the function
argument is `identity`.

2 years agoMore fixes for XDND proxy support
Po Lu [Thu, 15 Sep 2022 07:30:32 +0000 (15:30 +0800)]
More fixes for XDND proxy support

* src/xterm.c (handle_one_xevent): Check replies against
toplevel, not proxy.

2 years agoUse substitute-command-keys in proced-help
Stefan Kangas [Thu, 15 Sep 2022 07:17:30 +0000 (09:17 +0200)]
Use substitute-command-keys in proced-help

* lisp/proced.el (proced-help-string, proced-help): Use
substitute-command-keys.

2 years ago; Fix doc string of 'loaddefs-generate'
Eli Zaretskii [Thu, 15 Sep 2022 06:16:41 +0000 (09:16 +0300)]
; Fix doc string of 'loaddefs-generate'

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Doc fix.
(Bug#57815)

2 years agoRevert "; Fix doc string of 'loaddefs-generate'"
Eli Zaretskii [Thu, 15 Sep 2022 06:14:59 +0000 (09:14 +0300)]
Revert "; Fix doc string of 'loaddefs-generate'"

This reverts commit 5fe9a1a85ae6d54196031157a735352f6ab655ff.
It included unrelated changes.

2 years ago; Fix doc string of 'loaddefs-generate'
Eli Zaretskii [Thu, 15 Sep 2022 06:12:13 +0000 (09:12 +0300)]
; Fix doc string of 'loaddefs-generate'

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Doc fix.
(Bug#57815)

2 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 15 Sep 2022 04:30:40 +0000 (06:30 +0200)]
Merge from origin/emacs-28

5543aea1b2 Automate exporting etc/NEWS to HTML
23a91163ed * Makefile.in (uninstall): Remove the *.eln files.  (Bug#5...

2 years agoAllow using a symbol as an index into an alist in Eshell
Jim Porter [Tue, 13 Sep 2022 23:14:00 +0000 (16:14 -0700)]
Allow using a symbol as an index into an alist in Eshell

* lisp/eshell/esh-var.el (eshell-index-value): If INDEX is a symbol,
use 'assoc' for indexing.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var-assoc)
(esh-var-test/quoted-interp-var-assoc): Add checks for indexing via
symbol (bug#57787).

2 years agoUse '^' key for detach command bindings
Sean Whitton [Wed, 14 Sep 2022 16:49:27 +0000 (09:49 -0700)]
Use '^' key for detach command bindings

* lisp/tab-bar.el (tab-prefix-map): Move tear-off-window to C-x w ^ f.
Bind tab-window-detach to C-x w ^ t.
* lisp/window.el (window-prefix-map): Bind tab-detach to C-x t ^ f.

2 years agoAdd image-transform-reset-to-original to manual
Stefan Kangas [Wed, 14 Sep 2022 22:53:12 +0000 (00:53 +0200)]
Add image-transform-reset-to-original to manual

* doc/emacs/files.texi (Image Mode):
Add 'image-transform-reset-to-original'.
Suggested by Juri Linkov <juri@linkov.net>.

2 years agoSupport fbsetbg in wallpaper.el
Stefan Kangas [Wed, 14 Sep 2022 22:53:00 +0000 (00:53 +0200)]
Support fbsetbg in wallpaper.el

* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper-command): Add "fbsetbg".

2 years agopcomplete: Generate completions from --help messages
Augusto Stoffel [Thu, 8 Sep 2022 09:09:42 +0000 (11:09 +0200)]
pcomplete: Generate completions from --help messages

* lisp/pcomplete.el (pcomplete-from-help): New function (and hash
table) to get pcomplete candidates from help messages.
(pcomplete-here-using-help): Helper function to define pcomplete for
simple commands
(pcomplete-completions-at-point): Provide annotation-function and
company-docsig properties.
* lisp/pcmpl-git.el: New file, provides pcomplete for Git.
* lisp/pcmpl-gnu.el: Add pcomplete for awk, gpg and gdb, emacs and
emacsclient.
* lisp/pcmpl-linux.el: Add pcomplete for systemctl and journalctl.
* lisp/pcmpl-rpm.el: Add pcomplete for dnf.
* lisp/pcmpl-unix.el: Add pcomplete for sudo and most commands found
in GNU Coreutils.
* lisp/pcmpl-x.el: Add pcomplete for tex, pdftex, latex, pdflatex,
rigrep and rclone.
* test/lisp/pcomplete-tests.el (pcomplete-test-parse-gpg-help,
pcomplete-test-parse-git-help): Tests for the new functions.

2 years ago; * src/emacs.c (usage_message): Remove stray tabs.
Augusto Stoffel [Wed, 14 Sep 2022 18:11:28 +0000 (20:11 +0200)]
; * src/emacs.c (usage_message): Remove stray tabs.

2 years ago; * lisp/image/image-crop.el (image-elide, image-crop): Doc fixes.
Eli Zaretskii [Wed, 14 Sep 2022 18:37:50 +0000 (21:37 +0300)]
; * lisp/image/image-crop.el (image-elide, image-crop): Doc fixes.

2 years agoAllow specifying the color to use in image-elide
Lars Ingebrigtsen [Wed, 14 Sep 2022 18:21:54 +0000 (20:21 +0200)]
Allow specifying the color to use in image-elide

* lisp/image/image-crop.el (image-crop-elide-command): Adjust to
allow specifying the color.
(image-elide): Prompt for a color.
(image-crop--crop-image-update): Pass the color along.

2 years agoAutomate exporting etc/NEWS to HTML
Stefan Kangas [Wed, 14 Sep 2022 14:22:59 +0000 (16:22 +0200)]
Automate exporting etc/NEWS to HTML

* admin/admin.el (make-news-html-file): New function.
* .gitignore: Ignore generated "etc/NEWS*.html" file.

2 years agoMake image-crop variables into user options
Lars Ingebrigtsen [Wed, 14 Sep 2022 16:33:09 +0000 (18:33 +0200)]
Make image-crop variables into user options

* lisp/image/image-crop.el (image-crop): New group.
(image-crop-crop-command, image-crop-resize-command)
(image-crop-elide-command, image-crop-crop-command): Make into
defcustoms.

2 years agoSupport hsetroot in wallpaper.el
Stefan Kangas [Wed, 14 Sep 2022 16:17:42 +0000 (18:17 +0200)]
Support hsetroot in wallpaper.el

* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper-command): Add "hsetroot".

2 years ago; Fix typo in wallpaper--default-commands
Stefan Kangas [Wed, 14 Sep 2022 16:12:39 +0000 (18:12 +0200)]
; Fix typo in wallpaper--default-commands

* lisp/image/wallpaper.el (wallpaper--default-commands): Fix typo.

2 years ago; * etc/NEWS: Fix typo.
Stefan Kangas [Wed, 14 Sep 2022 15:45:34 +0000 (17:45 +0200)]
; * etc/NEWS: Fix typo.

2 years agoRegenerated ldefs-boot.el
Lars Ingebrigtsen [Wed, 14 Sep 2022 15:54:05 +0000 (17:54 +0200)]
Regenerated ldefs-boot.el

2 years agoSpeed up Emacs build by autoloading vc-git-annotate-switches-safe-p
Lars Ingebrigtsen [Wed, 14 Sep 2022 15:53:41 +0000 (17:53 +0200)]
Speed up Emacs build by autoloading vc-git-annotate-switches-safe-p

* lisp/vc/vc-git.el (vc-git-annotate-switches-safe-p): Put the
definition into the loaddefs file.

2 years agoFix image-mode.el compilation
Lars Ingebrigtsen [Wed, 14 Sep 2022 14:04:42 +0000 (16:04 +0200)]
Fix image-mode.el compilation

* lisp/image/image-crop.el (text-property-search): Require.

2 years agoMake image cropping work in image-mode buffers
Lars Ingebrigtsen [Wed, 14 Sep 2022 14:04:23 +0000 (16:04 +0200)]
Make image cropping work in image-mode buffers

* lisp/image-mode.el (image-mode): Update the buffer text after
cropping (bug#57793).

2 years agoDon't alter the buffer contents in image-crop by default
Lars Ingebrigtsen [Wed, 14 Sep 2022 13:59:55 +0000 (15:59 +0200)]
Don't alter the buffer contents in image-crop by default

* lisp/image/image-crop.el (image-crop-buffer-text-function):
Allow modes to alter the textual representation.
(image-crop): Delete the complete image data without assuming it's
all on one line (which isn't the case in image-mode, for instance).
(image-crop--crop-image-update, image-crop--insert-image-data):
Use image-crop-buffer-text-function.
(image-crop--default-buffer-text): New default action -- don't
alter the buffer contents (bug#57793).

2 years agoRaise default max-specpdl-size and max-lisp-eval-depth
Mattias Engdegård [Wed, 14 Sep 2022 12:36:24 +0000 (14:36 +0200)]
Raise default max-specpdl-size and max-lisp-eval-depth

Recent changes have caused bootstrapping to fail for certain
configurations, and it was likely getting close to the limits
for others.  This change raises the limits to those previously
used when configured for nativecomp:

  max-specpdl-size raised from 1800 to 2500
  max-lisp-eval-depth raised from 800 to 1600

* src/eval.c (init_eval_once): Raise limits.
* doc/lispref/eval.texi (Eval):
* doc/lispref/variables.texi (Local Variables): Document new values.

2 years agoRename image transform commands to be less confusing
Stefan Kangas [Wed, 14 Sep 2022 13:34:38 +0000 (15:34 +0200)]
Rename image transform commands to be less confusing

* lisp/image-mode.el
(image-transform-original): Rename from this...
(image-transform-reset-to-original): ...to this.  Make old name
into an obsolete function alias and update all callers.
(image-transform-reset): Rename from this...
(image-transform-reset-to-initial): ...to this.  Make old name
into an obsolete function alias and update all callers.
(Bug#51451)
* doc/emacs/files.texi (Image Mode): Update for above change.

2 years ago; * doc/emacs/files.texi (Image Mode): Improve indexing.
Stefan Kangas [Wed, 14 Sep 2022 13:31:45 +0000 (15:31 +0200)]
; * doc/emacs/files.texi (Image Mode): Improve indexing.

2 years agoRemove the save-match-data from shell-command
Lars Ingebrigtsen [Wed, 14 Sep 2022 13:26:30 +0000 (15:26 +0200)]
Remove the save-match-data from shell-command

* lisp/simple.el (shell-command): Remove save-match-data, since
we're (in many cases) altering the match data earlier in the
function anyway (bug#57795).

2 years agoFix textsec-suspicious foreground color
Lars Ingebrigtsen [Wed, 14 Sep 2022 13:17:43 +0000 (15:17 +0200)]
Fix textsec-suspicious foreground color

* lisp/international/textsec-check.el (textsec-suspicious): Set
the foreground, too (bug#57796).

2 years agoAlso use eww URL transformers in the actual links
Lars Ingebrigtsen [Wed, 14 Sep 2022 13:16:27 +0000 (15:16 +0200)]
Also use eww URL transformers in the actual links

* lisp/net/eww.el (eww-mode): Use it to transform URLs
(bug#57796).

* lisp/net/shr.el (shr-url-transformer): New variable.
(shr-tag-a): Use it.

2 years agoAdd new command image-mode-wallpaper-set
Stefan Kangas [Wed, 14 Sep 2022 13:01:58 +0000 (15:01 +0200)]
Add new command image-mode-wallpaper-set

* lisp/image-mode.el (wallpaper): Require.
(image-mode-wallpaper-set): New command.
(image-mode-map): Bind above new command to "W".

2 years ago; * lisp/image/wallpaper.el: Minor doc fixes.
Stefan Kangas [Wed, 14 Sep 2022 11:30:22 +0000 (13:30 +0200)]
; * lisp/image/wallpaper.el: Minor doc fixes.

2 years agoAdd :type to wallpaper-command
Stefan Kangas [Wed, 14 Sep 2022 11:22:22 +0000 (13:22 +0200)]
Add :type to wallpaper-command

* lisp/image/wallpaper.el (wallpaper-command): Make it easier to
customize by adding a :type declaration covering all supported values.

2 years agoAdd consteval and constinit keywords to cc-mode
Evan Klitzke [Wed, 14 Sep 2022 12:32:29 +0000 (14:32 +0200)]
Add consteval and constinit keywords to cc-mode

* lisp/progmodes/cc-langs.el (c-modifier-kwds): Add consteval and
constinit keywords (introduced in C++20) (bug#51092).

Copyright-paperwork-exempt: yes

2 years ago* Makefile.in (uninstall): Remove the *.eln files. (Bug#57771)
Eli Zaretskii [Wed, 14 Sep 2022 12:14:00 +0000 (15:14 +0300)]
* Makefile.in (uninstall): Remove the *.eln files.  (Bug#57771)

2 years agoFix more misleading cl-case quoting in tests
Basil L. Contovounesios [Wed, 14 Sep 2022 10:51:41 +0000 (13:51 +0300)]
Fix more misleading cl-case quoting in tests

* test/lisp/dnd-tests.el (x-begin-drag):
* test/lisp/so-long-tests/so-long-tests-helpers.el
(so-long-tests-assert-active, so-long-tests-assert-reverted): Remove
misleading quoting in cl-case clauses (bug#51368).

2 years agoMake it easier to customize wallpaper command
Stefan Kangas [Wed, 14 Sep 2022 10:12:46 +0000 (12:12 +0200)]
Make it easier to customize wallpaper command

* lisp/image/wallpaper.el
(wallpaper--default-commands): New defvar.
(wallpaper--find-command): Use above new defvar.
(wallpaper--find-command-arguments): New defun.
(wallpaper-command): Rename from 'wallpaper-commands' and change
type to string.  Use 'wallpaper--find-command' to set it.
(wallpaper-command-args): New defcustom.  Use
'wallpaper--find-command-arguments' to set it.
(wallpaper--set-wallpaper-command): New defun.  Use as :set property
for 'wallpaper-command'.
(wallpaper-set): Use above new defcustoms to set the wallpaper.
Suggested by Eli Zaretskii <eliz@gnu.org>.

2 years agoImprove wallpaper.el docs for recent changes
Stefan Kangas [Wed, 14 Sep 2022 09:10:10 +0000 (11:10 +0200)]
Improve wallpaper.el docs for recent changes

* lisp/image/wallpaper.el: Fix documentation to better reflect that no
external command is needed on Haiku.
* etc/NEWS: Update entry on wallpaper.el.

2 years agoAllow setting wallpaper from TTY
Stefan Kangas [Wed, 14 Sep 2022 08:52:39 +0000 (10:52 +0200)]
Allow setting wallpaper from TTY

* lisp/image/wallpaper.el (wallpaper-set): Allow setting wallpaper
when 'display-graphic-p' is nil.
(wallpaper-default-width, wallpaper-default-height):
New variables.
(wallpaper--get-height-or-width): New helper function.

2 years ago* lisp/image/wallpaper.el (wallpaper-commands): Add xwallpaper.
Stefan Kangas [Wed, 14 Sep 2022 08:41:07 +0000 (10:41 +0200)]
* lisp/image/wallpaper.el (wallpaper-commands): Add xwallpaper.

2 years agoSupport recent KDE Plasma in wallpaper.el
Stefan Kangas [Wed, 14 Sep 2022 08:29:16 +0000 (10:29 +0200)]
Support recent KDE Plasma in wallpaper.el

* lisp/image/wallpaper.el (wallpaper-commands): Support recent KDE
Plasma.
(wallpaper--check-command): New cl-defmethod.

2 years agoFix desktop environment check on Ubuntu
Stefan Kangas [Wed, 14 Sep 2022 08:26:07 +0000 (10:26 +0200)]
Fix desktop environment check on Ubuntu

* lisp/image/wallpaper.el (xdg): Require.
(wallpaper--check-command): Use xdg-current-desktop instead of reading
XDG_CURRENT_DESKTOP directly.  This fixes things on e.g. Ubuntu, where
XDG_CURRENT_DESKTOP might contain a string like "ubuntu:GNOME".

2 years ago; * etc/NEWS: Improve wording of 'xdg-state-home' entry.
Stefan Kangas [Wed, 14 Sep 2022 08:15:08 +0000 (10:15 +0200)]
; * etc/NEWS: Improve wording of 'xdg-state-home' entry.

2 years agoAdd new function xdg-current-desktop to xdg.el
Stefan Kangas [Wed, 14 Sep 2022 08:15:26 +0000 (10:15 +0200)]
Add new function xdg-current-desktop to xdg.el

* lisp/xdg.el (xdg-current-desktop): New function.
* test/lisp/xdg-tests.el (xdg-current-desktop): New test.

2 years agoImprove messages in image-crop.el
Stefan Kangas [Wed, 14 Sep 2022 06:45:45 +0000 (08:45 +0200)]
Improve messages in image-crop.el

* lisp/image/image-crop.el (image-crop)
(image-crop--crop-image-1): Improve messages and include the name
of the current operation.

2 years agoImplement wallpaper.el support for Haiku
Po Lu [Wed, 14 Sep 2022 06:24:49 +0000 (06:24 +0000)]
Implement wallpaper.el support for Haiku

* lisp/image/wallpaper.el (haiku-set-wallpaper, wallpaper-set):
Use `haiku-set-wallpaper' on Haiku.
* lisp/term/haiku-win.el (haiku-write-node-attribute)
(haiku-send-message, haiku-set-wallpaper): New function.
* src/haiku_support.cc (be_write_node_message, be_send_message):
New functions.
* src/haiku_support.h: Update prototypes.
* src/haikuselect.c (haiku_message_to_lisp)
(haiku_lisp_to_message): Fix CSTR type handling to include NULL
byte.
(haiku_report_system_error, Fhaiku_write_node_attribute)
(Fhaiku_send_message): New functions.
(syms_of_haikuselect): Add defsubrs.

2 years agoSupport wbg in wallpaper.el (Bug#57781)
Stefan Kangas [Wed, 14 Sep 2022 02:44:12 +0000 (04:44 +0200)]
Support wbg in wallpaper.el (Bug#57781)

* lisp/image/wallpaper.el (wallpaper-commands): Add "wbg".
(wallpaper--check-command): New cl-defmethod for "wbg".

2 years ago; Prefer string-join in image-dired
Stefan Kangas [Tue, 13 Sep 2022 16:54:14 +0000 (18:54 +0200)]
; Prefer string-join in image-dired

* lisp/image/image-dired-dired.el (subr-x): Require.
(image-dired-dired-display-properties): Prefer string-join.
* lisp/image/image-dired.el (subr-x): Require.
(image-dired-update-header-line): Prefer string-join.

2 years agoFix recently-added cl-macs tests
Lars Ingebrigtsen [Wed, 14 Sep 2022 00:30:54 +0000 (02:30 +0200)]
Fix recently-added cl-macs tests

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-error)
(cl-case-warning): Fix warning matches.

2 years agoMake help-fns--generalized-variable more resilient
Lars Ingebrigtsen [Tue, 13 Sep 2022 16:32:30 +0000 (18:32 +0200)]
Make help-fns--generalized-variable more resilient

* lisp/help-fns.el (help-fns--generalized-variable): Don't bug out
when a key binding isn't a symbol.

2 years agoPrefer defvar-keymap for repeat-map in outline.el
Juri Linkov [Tue, 13 Sep 2022 18:17:55 +0000 (21:17 +0300)]
Prefer defvar-keymap for repeat-map in outline.el

* lisp/outline.el (outline-navigation-repeat-map)
(outline-editing-repeat-map): Prefer defvar-keymap.

2 years agoPort alignas definition to C23
Paul Eggert [Tue, 13 Sep 2022 17:41:34 +0000 (12:41 -0500)]
Port alignas definition to C23

* src/lisp.h (alignas): C23 is removing the __alignas_is_defined
macro, so do not rely on it. Instead, do not define alignas if C23
or later, or if C++11 or later.

2 years ago; * etc/NEWS: Fix wording of 'image-crop' entry.
Eli Zaretskii [Tue, 13 Sep 2022 17:00:30 +0000 (20:00 +0300)]
; * etc/NEWS: Fix wording of 'image-crop' entry.

2 years agoFix wallpaper.el build warning
Lars Ingebrigtsen [Tue, 13 Sep 2022 16:28:14 +0000 (18:28 +0200)]
Fix wallpaper.el build warning

* lisp/image/wallpaper.el (require): Fix build warning.

2 years agoRevert "Fix help--analyze-key problem when not called from menu"
Lars Ingebrigtsen [Tue, 13 Sep 2022 16:25:32 +0000 (18:25 +0200)]
Revert "Fix help--analyze-key problem when not called from menu"

This reverts commit 7e374b96635ce70f574fba351defc765e9a52da9.

This should not be needed -- perhaps it was triggered by
an ephemeral code change in my running Emacs.

2 years agoUse wallpaper-set in thumbs.el
Stefan Kangas [Tue, 13 Sep 2022 16:02:21 +0000 (18:02 +0200)]
Use wallpaper-set in thumbs.el

* lisp/thumbs.el (wallpaper): Require.
(thumbs-setroot-command): Make defcustom obsolete.
(thumbs-call-setroot-command): Make obsolete in favor of
wallpaper-set.
(thumbs-set-image-at-point-to-root-window, thumbs-set-root)
(thumbs-dired-setroot): Use wallpaper-set instead of
thumbs-call-setroot-command.
(thumbs-before-setroot-hook, thumbs-after-setroot-hook): Make
obsolete.

2 years agoAdd new command image-dired-set-wallpaper
Stefan Kangas [Tue, 13 Sep 2022 15:56:22 +0000 (17:56 +0200)]
Add new command image-dired-set-wallpaper

* lisp/image/image-dired.el (wallpaper): Require.
(image-dired-set-wallpaper): New command.
(image-dired-thumbnail-mode-map): Bind above new command to "W".

2 years agoAdd new library wallpaper.el
Stefan Kangas [Tue, 13 Sep 2022 14:57:01 +0000 (16:57 +0200)]
Add new library wallpaper.el

* lisp/image/wallpaper.el: New file.

2 years ago; image-dired: Delete unnecessary :group arg
Stefan Kangas [Tue, 13 Sep 2022 15:16:33 +0000 (17:16 +0200)]
; image-dired: Delete unnecessary :group arg

* lisp/image/image-dired.el (image-dired-db-file): Delete unnecessary
:group arg.

2 years agoRemove a nil cl-case case
Lars Ingebrigtsen [Tue, 13 Sep 2022 16:24:14 +0000 (18:24 +0200)]
Remove a nil cl-case case

* lisp/emacs-lisp/testcover.el (testcover-coverage-combine):
Remove the nil case, which will never match (bug#51368).

2 years agoFix some misleading quoting in cl-case
Lars Ingebrigtsen [Tue, 13 Sep 2022 16:19:26 +0000 (18:19 +0200)]
Fix some misleading quoting in cl-case

* lisp/progmodes/compile.el (compilation-auto-jump):
* lisp/image/image-crop.el (image-crop--crop-image-1):
(image-crop--crop-image-1):
* lisp/image/exif.el (exif--process-value):
* lisp/image-mode.el (image-mode--next-file):
* lisp/dnd.el (dnd-begin-text-drag):
(dnd-begin-file-drag):
(dnd-begin-drag-files): Fix misleading quoting in cl-case (bug#51368).

2 years ago; * etc/NEWS: More detail about 'image-crop' and 'image-elide'.
Eli Zaretskii [Tue, 13 Sep 2022 15:58:21 +0000 (18:58 +0300)]
; * etc/NEWS: More detail about 'image-crop' and 'image-elide'.

2 years agoRegenerated ldefs-boot.el
Lars Ingebrigtsen [Tue, 13 Sep 2022 15:27:20 +0000 (17:27 +0200)]
Regenerated ldefs-boot.el

2 years agoHave 'cl-case' warn about suspicious cases
Philipp Stephani [Tue, 13 Sep 2022 15:12:57 +0000 (17:12 +0200)]
Have 'cl-case' warn about suspicious cases

* lisp/emacs-lisp/cl-macs.el (cl-case): Warn if the user passes a nil
key list (which would never match).  Warn about quoted symbols that
should probably be unquoted.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-warning): New unit
test (bug#51368).

2 years agoSignal an error if a fallback cl-case is misplaced
Philipp Stephani [Tue, 13 Sep 2022 15:11:53 +0000 (17:11 +0200)]
Signal an error if a fallback cl-case is misplaced

* lisp/emacs-lisp/cl-macs.el (cl-case): Warn if the user passes a nil
key list (which would never match).  Warn about quoted symbols that
should probably be unquoted.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-warning): New unit
test (bug#51368).

2 years agoMove imagep in image.c from the debugging section
Lars Ingebrigtsen [Tue, 13 Sep 2022 14:37:31 +0000 (16:37 +0200)]
Move imagep in image.c from the debugging section

* lisp/simple.el (imagep): Remove.
* src/image.c (Fimagep): Always define.

2 years agoFix help--analyze-key problem when not called from menu
Lars Ingebrigtsen [Tue, 13 Sep 2022 14:14:37 +0000 (16:14 +0200)]
Fix help--analyze-key problem when not called from menu

* lisp/help.el (help--analyze-key): Don't bug out when not called
from the menu.

2 years ago; * src/image.c (svg_load_image): Another minor cleanup. (Bug#51104)
Eli Zaretskii [Tue, 13 Sep 2022 14:12:40 +0000 (17:12 +0300)]
; * src/image.c (svg_load_image): Another minor cleanup.  (Bug#51104)

2 years agoAdd new commands 'image-crop' and 'image-elide'
Lars Ingebrigtsen [Tue, 13 Sep 2022 13:52:56 +0000 (15:52 +0200)]
Add new commands 'image-crop' and 'image-elide'

* doc/lispref/display.texi (Showing Images): Document it.

* lisp/image.el (image-map): Bind commands.

* lisp/image/image-crop.el: New file (bug#51331).

2 years agoAdd new function imagep
Lars Ingebrigtsen [Tue, 13 Sep 2022 13:49:18 +0000 (15:49 +0200)]
Add new function imagep

* lisp/simple.el (imagep): New function.

2 years ago; Add commentary to comp-tests.el
Eli Zaretskii [Tue, 13 Sep 2022 13:49:02 +0000 (16:49 +0300)]
; Add commentary to comp-tests.el

Sigh... why do people insist on removing useful comments and leave
their tricky code more obfuscated than it must be??
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a
comment explaining why the expressions are quoted.  (Bug#51104)

2 years agoFix whitespace-tests on macOS
Gerd Möllmann [Tue, 13 Sep 2022 13:37:56 +0000 (15:37 +0200)]
Fix whitespace-tests on macOS

* test/lisp/whitespace-tests.el (whitespace-tests--empty-bob):
(whitespace-tests--empty-eob): Use C-a/C-e instead of
<home>/<end> (bug#57763).

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 13 Sep 2022 13:39:26 +0000 (16:39 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years ago; * src/image.c (svg_load_image): Always free 'err' if non-NULL.
Eli Zaretskii [Tue, 13 Sep 2022 13:38:50 +0000 (16:38 +0300)]
; * src/image.c (svg_load_image): Always free 'err' if non-NULL.

2 years agocomp-tests.el: Enable compilation again
Stefan Monnier [Tue, 13 Sep 2022 13:36:21 +0000 (09:36 -0400)]
comp-tests.el: Enable compilation again

Rather than disable byte-compilation to circumvent bug#51104,
change the ELisp code so that `most-positive/negative-fixnum` does
not end up hardcoded in the `.elc` file.

* test/src/comp-tests.el (comp-tests-define-type-spec-test):
Don't quote the type expressions.
(comp-tests-type-spec-tests): Quote them here instead.

2 years agoFix last change in image.c
Eli Zaretskii [Tue, 13 Sep 2022 13:26:50 +0000 (16:26 +0300)]
Fix last change in image.c

* src/image.c (svg_load_image): Don't call Lisp to remove trailing
whitespace from librsvg error messages, do it in C instead; this
reduces consing and is much cleaner.  Don't display empty error
reason if librsvg happens to return an empty message text.
(syms_of_image): Don't DEFSYM string-trim-right.  (Bug#57755)

2 years agoPrefer defvar-keymap in several cases
Stefan Kangas [Tue, 13 Sep 2022 13:05:28 +0000 (15:05 +0200)]
Prefer defvar-keymap in several cases

* lisp/calc/calc-embed.el (calc-override-minor-modes-map):
* lisp/calc/calc-yank.el (calc-edit-mode-map):
* lisp/calc/calc.el (calc-trail-mode-map):
* lisp/cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode-map):
* lisp/cedet/semantic/util-modes.el (semantic-highlight-edits-mode-map)
(semantic-show-unmatched-syntax-mode-map)
(semantic-show-parser-state-mode-map)
(semantic-stickyfunc-mode-map, semantic-highlight-func-mode-map):
* lisp/cedet/srecode/srt-mode.el (srecode-template-mode-map):
* lisp/gnus/gnus-art.el (gnus-prev-page-map, gnus-next-page-map):
* lisp/gnus/gnus-search.el (gnus-search-minibuffer-map):
* lisp/gnus/score-mode.el (gnus-score-mode-map):
* lisp/gnus/smime.el (smime-mode-map):
* lisp/indent.el (edit-tab-stops-map):
* lisp/isearch.el (minibuffer-local-isearch-map):
* lisp/printing.el (pr-interface-map):
* lisp/progmodes/prog-mode.el (prog-mode-map):
* lisp/progmodes/subword.el (subword-mode-map):
* lisp/reveal.el (reveal-mode-map):
* lisp/strokes.el (strokes-mode-map):
* lisp/textmodes/flyspell.el (flyspell-mouse-map):
* lisp/textmodes/less-css-mode.el (less-css-mode-map):
* lisp/textmodes/remember.el (remember-mode-map)
(remember-notes-mode-map):
* lisp/wid-browse.el (widget-browse-mode-map):
* lisp/wid-edit.el (widget-key-sequence-map): Prefer defvar-keymap in
some easy-to-convert cases.

2 years agoEnable undo in eww buffers
Lars Ingebrigtsen [Tue, 13 Sep 2022 12:31:59 +0000 (14:31 +0200)]
Enable undo in eww buffers

* lisp/net/eww.el (eww-render): Enable undo after rendering.  This
allows using `undo' in text input boxes.
(eww-setup-buffer): Disable undo before rendering (bug#57750).

* lisp/net/shr.el (shr-image-fetched): Inhibit undo tracking.

2 years agoIndirect Buffers manual improvement
Lars Ingebrigtsen [Tue, 13 Sep 2022 12:07:40 +0000 (14:07 +0200)]
Indirect Buffers manual improvement

* doc/emacs/buffers.texi (Indirect Buffers): There's no point in
mentioning both clone-indirect-buffer and
clone-indirect-buffer-other-window here since they do the pretty
much the same (bug#57753).