Stefan Kangas [Thu, 4 Nov 2021 01:05:29 +0000 (02:05 +0100)]
Make image-dired-display-image-mode inherit from image-mode
* lisp/image-dired.el (image-dired-display-image-mode):
Inherit from 'image-mode'. (Bug#10758)
(image-dired-display-image): Don't generate a temporary image, which
is no longer needed with the above change.
(image-dired-display-thumbnail-original-image)
(image-dired-dired-display-image)
(image-dired-mouse-display-image): Simplify.
(image-dired-temp-image-file)
(image-dired-cmd-create-temp-image-program)
(image-dired-cmd-create-temp-image-options)
(image-dired-display-window-width-correction)
(image-dired-display-window-height-correction)
(image-dired-display-window-width)
(image-dired-display-window-height)
(image-dired-display-current-image-full)
(image-dired-display-current-image-sized)
(image-dired-window-height-pixels): Make obsolete.
(image-dired-create-display-image-buffer): Make into obsolete
function alias for 'ignore'.
(image-dired-display-image-mode-map): Simplify by removing things
duplicated from `image-mode-map'. Disable some commands from
`image-mode-map' that doesn't make sense for Image-Dired.
(image-dired-display-image-mode-menu): Remove menu, as it no longer
contains anything useful.
(image-dired-minor-mode):
* doc/emacs/dired.texi (Image-Dired): Update documentation for the
above change.
Stefan Kangas [Wed, 3 Nov 2021 21:34:51 +0000 (22:34 +0100)]
image-dired: Add face for flagged files
* lisp/image-dired.el (image-dired-thumb-mark): New defface.
(image-dired-thumb-update-marks): Mark flagged file with above new defface.
(image-dired-dired-file-marked-p)
(image-dired-thumb-file-marked-p): Add optional argument to be
used by 'image-dired-*-flagged-p' functions below.
(image-dired-dired-file-flagged-p)
(image-dired-thumb-file-flagged-p): New defuns.
(image-dired-thumb-mark): Improve definition with color classes.
(image-dired-thumb-visible-marks): Doc fix.
Eli Zaretskii [Wed, 3 Nov 2021 18:50:34 +0000 (20:50 +0200)]
Fix encoding issues in gitmerge.el, make it work on MS-Windows
* admin/gitmerge.el (gitmerge-emacs-version, gitmerge-show-log)
(gitmerge-show-diff, gitmerge-show-files, gitmerge-missing)
(gitmerge-setup-log-buffer, gitmerge-resolve)
(gitmerge-commit-message, gitmerge-apply)
(gitmerge-resolve-unmerged, gitmerge-repo-clean)
(gitmerge-commit): Bind coding-system-for-read/write to the
appropriate vc-git values.
(gitmerge-apply) [windows-nt]: Pass long merge log messages via a
temporary file.
(gitmerge): Clarify the description of the "R" flag.
Eli Zaretskii [Wed, 3 Nov 2021 18:26:28 +0000 (20:26 +0200)]
Merge from origin/emacs-28
3e4eb54 ; * etc/PROBLEMS: Minor copyedits of the last change. (Bug#5... 35bc211 Document a macOS error message when opening Emacs 4df9998 Fix header-line and tab-line when mode-line-compact is set 81915a9 Add manual section about how to avoid regexp problems a16e66c Clarify build environment 6ab6b2f Clarify build directory structure 9d61620 * src/pdumper.c (dump_do_dump_relocation): Add sanity check.
Eli Zaretskii [Wed, 3 Nov 2021 14:13:32 +0000 (16:13 +0200)]
A better fix for bug#51583
* src/w32.c (w32_get_resource): Move from here...
* src/w32fns.c (w32_get_resource): ...to here.
(w32_applytheme): No longer a no-op for Cygwin w32 builds.
(globals_of_w32fns): Do attempt to load dwmapi.dll and uxtheme.dll
in the Cygwin w32 build.
Eli Zaretskii [Wed, 3 Nov 2021 14:02:15 +0000 (16:02 +0200)]
Fix the Cygwin w32 build broken by adding the dark theme support
* src/w32fns.c (w32_applytheme): Make a no-op for Cygwin w32
builds.
(globals_of_w32fns): Don't attempt to load dwmapi.dll and
uxtheme.dll in the Cygwin w32 build. (Bug#51583)
Stefan Kangas [Wed, 3 Nov 2021 06:14:21 +0000 (07:14 +0100)]
image-dired: Improve marking behavior
* lisp/image-dired.el (image-dired-thumb-mark): Use DarkOrange as
background to better match the 'dired-marked' face.
(image-dired-show-all-from-dir): Disable all marks when entering a
full directory.
(image-dired-unmark-all-marks): Add mode tag.
(image-dired-thumbnail-mode-map): Bind 'image-dired-unmark-all-marks'
to "U".
Stefan Kangas [Wed, 3 Nov 2021 06:02:13 +0000 (07:02 +0100)]
image-dired: Cleanup of four commands
* lisp/image-dired.el
(image-dired--on-file-in-dired-buffer): New macro.
(image-dired-mark-thumb-original-file)
(image-dired-unmark-thumb-original-file)
(image-dired-flag-thumb-original-file)
(image-dired-toggle-mark-thumb-original-file): Rewrite using
above new macro.
(image-dired-modify-mark-on-thumb-original-file): Make obsolete in
favor of above new macro.
Stefan Kangas [Wed, 3 Nov 2021 02:34:28 +0000 (03:34 +0100)]
image-dired: Support wrap-around in display-next-thumbnail-original
* lisp/image-dired.el (image-dired-forward-image): Support negative
prefix argument. Optionally wrap-around, which means to continue from
first image after reaching the last one and vice versa.
(image-dired-backward-image): Reimplement in terms of
'image-dired-forward-image'.
(image-dired-display-next-thumbnail-original)
(image-dired-display-previous-thumbnail-original): Wrap around; when
reaching the last image, continue from the first one. Add optional
prefix argument to move more than one image at a time.
Stefan Kangas [Wed, 3 Nov 2021 01:39:00 +0000 (02:39 +0100)]
image-dired: Move menu definitions to top level
* lisp/image-dired.el (image-dired-thumbnail-mode-map)
(image-dired-display-image-mode-map, image-dired-minor-mode-map):
Move menu definitions from here...
(image-dired-thumbnail-mode-menu)
(image-dired-display-image-mode-menu)
(image-dired-minor-mode-menu): ...to these new top level
definitions.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-cond):
Optimise clause-free `cond`, which can arise from earlier
transformations. This enables further optimisations.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test cases.
Stefan Kangas [Tue, 2 Nov 2021 19:14:13 +0000 (20:14 +0100)]
Use current face foreground for SVG icons in customize
* etc/images/down.svg:
* etc/images/left.svg:
* etc/images/right.svg:
* etc/images/up.svg: Don't define foreground; this means they will use
the foreground of the currently defined face instead. (Bug#51556)
Stefan Kangas [Tue, 2 Nov 2021 16:33:35 +0000 (17:33 +0100)]
Support inserting images in tabulated-list-mode columns
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-col):
Support using an image descriptor to insert an image in a column.
(tabulated-list-entries):
* doc/lispref/modes.texi (Tabulated List Mode): Update documentation
to reflect above change.
Make `C-h b' indentation more regular (and avoid continuation lines)
* lisp/help.el (help--describe-command): Don't do any indentation.
(describe-map): Store data about each section.
(describe-map--align-section): New function to do indentation on a
per-block basis.
(describe-map--fill-columns): Helper function.
* lisp/help.el (help--describe-translation): Make obsolete.
(help--describe-command): Take an optional parameter to output key
translations.
(describe-map): Make optional parameters optional.
Add buttons to definition in help--describe-command
* lisp/help-mode.el (help-make-xrefs): Don't add buttons to
keymaps, because they're pre-buttonized.
* lisp/help.el (help--describe-command): Make buttons out of the
definitions.
* doc/lispref/files.texi (File Attributes): Document it.
* lisp/files.el (file-has-changed-p): New function.
(file-has-changed-p--hash-table): Internal variable used by the
new function (bug#51523).
* lisp/emacs-lisp/shortdoc.el (file): Mention it.
* lisp/net/mailcap.el (mailcap-parse-mailcaps): Read mailcaps again
only when at least one of the mailcap files has changed. Fixes
bug#51523.
Michael Albinus [Sun, 31 Oct 2021 16:45:39 +0000 (17:45 +0100)]
Adapt emba control files
* test/infra/Dockerfile.emba: Do not generate debug info.
* test/infra/gitlab-ci.yml (variables, default): Revert timeout
back to three hours.
(.job-template): Comment test prints.
(test-all-inotify): Exclude emacs-module-tests.el.
Stefan Monnier [Sun, 31 Oct 2021 14:57:44 +0000 (10:57 -0400)]
eieio-core.el: Make slot-value work on defstructs
Adjust the values in EIEIO's index-tables so they are compatible with those
of defstructs.
* lisp/emacs-lisp/eieio-core.el (eieio--slot-name-index): Don't add the
`eieio--object-num-slots` offset.
(eieio-defclass-internal): Add the `eieio--object-num-slots` offset
here instead.
(eieio-oref): Allow its use on `cl-structure-object`.
* lisp/emacs-lisp/eieio.el (eieio-pcase-slot-index-from-index-table):
Don't need to add the `eieio--object-num-slots` offset.
* doc/misc/eieio.texi (Accessing Slots, Accessing Slots):
Mention the use on structs.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-defstruct-slot-value): New test.