1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-14 23:40:39 -08:00
Commit graph

159778 commits

Author SHA1 Message Date
Stefan Kangas
80c516bbc8 ; Fix typo in wallpaper--default-commands
* lisp/image/wallpaper.el (wallpaper--default-commands): Fix typo.
2022-09-14 18:13:06 +02:00
Stefan Kangas
0c9d32b59e ; * etc/NEWS: Fix typo. 2022-09-14 18:06:23 +02:00
Lars Ingebrigtsen
6a22f7e5b7 Regenerated ldefs-boot.el 2022-09-14 17:54:05 +02:00
Lars Ingebrigtsen
a5e1565815 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.
2022-09-14 17:53:41 +02:00
Lars Ingebrigtsen
15f42f193b Fix image-mode.el compilation
* lisp/image/image-crop.el (text-property-search): Require.
2022-09-14 16:04:52 +02:00
Lars Ingebrigtsen
576eba77d3 Make image cropping work in image-mode buffers
* lisp/image-mode.el (image-mode): Update the buffer text after
cropping (bug#57793).
2022-09-14 16:04:52 +02:00
Lars Ingebrigtsen
997284d2a5 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).
2022-09-14 16:04:52 +02:00
Mattias Engdegård
cba866599c 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.
2022-09-14 15:59:43 +02:00
Stefan Kangas
37fe0cd358 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.
2022-09-14 15:43:39 +02:00
Stefan Kangas
600bb2d45f ; * doc/emacs/files.texi (Image Mode): Improve indexing. 2022-09-14 15:42:38 +02:00
Lars Ingebrigtsen
4209a4d3ae 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).
2022-09-14 15:26:30 +02:00
Lars Ingebrigtsen
54803dad6d Fix textsec-suspicious foreground color
* lisp/international/textsec-check.el (textsec-suspicious): Set
the foreground, too (bug#57796).
2022-09-14 15:17:58 +02:00
Lars Ingebrigtsen
c2c4c89dbc 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.
2022-09-14 15:17:58 +02:00
Stefan Kangas
d3188196cc 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".
2022-09-14 15:01:58 +02:00
Stefan Kangas
37e1c896a0 ; * lisp/image/wallpaper.el: Minor doc fixes. 2022-09-14 15:01:37 +02:00
Stefan Kangas
4e207423eb 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.
2022-09-14 15:01:37 +02:00
Evan Klitzke
0f4839fb6e 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
2022-09-14 14:33:12 +02:00
Basil L. Contovounesios
6a5043e9f6 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).
2022-09-14 14:20:52 +03:00
Stefan Kangas
8c3b40254b 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>.
2022-09-14 12:57:09 +02:00
Stefan Kangas
41a3155319 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.
2022-09-14 11:19:00 +02:00
Stefan Kangas
bfafe4aacc 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.
2022-09-14 11:00:29 +02:00
Stefan Kangas
ac479598f1 * lisp/image/wallpaper.el (wallpaper-commands): Add xwallpaper. 2022-09-14 10:41:07 +02:00
Stefan Kangas
6f06353290 Support recent KDE Plasma in wallpaper.el
* lisp/image/wallpaper.el (wallpaper-commands): Support recent KDE
Plasma.
(wallpaper--check-command): New cl-defmethod.
2022-09-14 10:31:46 +02:00
Stefan Kangas
d537e4c102 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".
2022-09-14 10:31:46 +02:00
Stefan Kangas
7d315ce630 ; * etc/NEWS: Improve wording of 'xdg-state-home' entry. 2022-09-14 10:24:55 +02:00
Stefan Kangas
fd70791218 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.
2022-09-14 10:23:45 +02:00
Stefan Kangas
d0b2eee278 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.
2022-09-14 08:45:45 +02:00
Po Lu
b9ca1a8e4f 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.
2022-09-14 06:25:11 +00:00
Stefan Kangas
f0798ac13d Support wbg in wallpaper.el (Bug#57781)
* lisp/image/wallpaper.el (wallpaper-commands): Add "wbg".
(wallpaper--check-command): New cl-defmethod for "wbg".
2022-09-14 07:20:47 +02:00
Stefan Kangas
439a3cd29d ; 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.
2022-09-14 04:48:05 +02:00
Lars Ingebrigtsen
10e9ec6da4 Fix recently-added cl-macs tests
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-error)
(cl-case-warning): Fix warning matches.
2022-09-14 02:30:54 +02:00
Lars Ingebrigtsen
c4235eb26d 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.
2022-09-14 01:40:17 +02:00
Juri Linkov
fd1ee05977 Prefer defvar-keymap for repeat-map in outline.el
* lisp/outline.el (outline-navigation-repeat-map)
(outline-editing-repeat-map): Prefer defvar-keymap.
2022-09-13 21:17:55 +03:00
Paul Eggert
49419912f2 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.
2022-09-13 12:42:31 -05:00
Eli Zaretskii
9d4c135046 ; * etc/NEWS: Fix wording of 'image-crop' entry. 2022-09-13 20:00:30 +03:00
Lars Ingebrigtsen
0b6793b5e3 Fix wallpaper.el build warning
* lisp/image/wallpaper.el (require): Fix build warning.
2022-09-13 18:28:14 +02:00
Lars Ingebrigtsen
aed39a518d Revert "Fix help--analyze-key problem when not called from menu"
This reverts commit 7e374b9663.

This should not be needed -- perhaps it was triggered by
an ephemeral code change in my running Emacs.
2022-09-13 18:26:11 +02:00
Stefan Kangas
3713183a3d 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.
2022-09-13 18:25:21 +02:00
Stefan Kangas
535adb96f6 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".
2022-09-13 18:25:21 +02:00
Stefan Kangas
32b7aaa9f1 Add new library wallpaper.el
* lisp/image/wallpaper.el: New file.
2022-09-13 18:25:21 +02:00
Stefan Kangas
2984b752f1 ; image-dired: Delete unnecessary :group arg
* lisp/image/image-dired.el (image-dired-db-file): Delete unnecessary
:group arg.
2022-09-13 18:25:21 +02:00
Lars Ingebrigtsen
6e6a3efa2e Remove a nil cl-case case
* lisp/emacs-lisp/testcover.el (testcover-coverage-combine):
Remove the nil case, which will never match (bug#51368).
2022-09-13 18:24:14 +02:00
Lars Ingebrigtsen
ef0c2e9940 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).
2022-09-13 18:19:26 +02:00
Eli Zaretskii
35d597348c ; * etc/NEWS: More detail about 'image-crop' and 'image-elide'. 2022-09-13 18:58:21 +03:00
Lars Ingebrigtsen
857d7f3881 Regenerated ldefs-boot.el 2022-09-13 17:27:20 +02:00
Philipp Stephani
fffa53ff1a 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).
2022-09-13 17:12:57 +02:00
Philipp Stephani
6d8f5161ea 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).
2022-09-13 17:11:53 +02:00
Lars Ingebrigtsen
07ee1be052 Move imagep in image.c from the debugging section
* lisp/simple.el (imagep): Remove.
* src/image.c (Fimagep): Always define.
2022-09-13 16:37:31 +02:00
Lars Ingebrigtsen
7e374b9663 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.
2022-09-13 16:14:57 +02:00
Eli Zaretskii
48c562fb74 ; * src/image.c (svg_load_image): Another minor cleanup. (Bug#51104) 2022-09-13 17:12:40 +03:00