Martin Rudalics [Mon, 25 Oct 2021 08:42:17 +0000 (10:42 +0200)]
Allow 'display-buffer' to set up body size of chosen window (Bug#17065)
* doc/lispref/windows.texi (Buffer Display Action Alists):
Describe new possible values for 'window-height', 'window-width'
and 'window-size' action alist entries.
* lisp/window.el (window--display-buffer): Handle new values for
'window-height', 'window-width' and 'window-size' ALIST entries.
(display-buffer): Update doc-string for new values of some
action alist entries.
* etc/NEWS: Mention new values of some action alist entries.
Stefan Kangas [Mon, 25 Oct 2021 05:51:02 +0000 (07:51 +0200)]
New function xdg-state-home
* lisp/xdg.el (xdg-state-home): New function. This returns
$XDG_STATE_HOME according to the XDG Base Directory Specification
version 0.8 (08th May 2021).
Stefan Kangas [Mon, 25 Oct 2021 03:47:56 +0000 (05:47 +0200)]
Double value of image-dired-show-all-from-dir-max-files
* lisp/image-dired.el (image-dired-show-all-from-dir-max-files):
Double the amount of files in directory before prompting. This could
be even higher, as the thumbnails are generated asynchronously and are
small by default.
Stefan Kangas [Mon, 25 Oct 2021 01:50:04 +0000 (03:50 +0200)]
image-dired: Add support for GraphicsMagick
* lisp/image-dired.el (image-dired-cmd-create-thumbnail-program)
(image-dired-cmd-create-thumbnail-options)
(image-dired-cmd-create-temp-image-program)
(image-dired-cmd-create-temp-image-options)
(image-dired-cmd-rotate-thumbnail-program)
(image-dired-cmd-rotate-thumbnail-options): Add support for the
GraphicsMagick command line tool ("gm convert", "gm mogrify").
Stefan Kangas [Mon, 25 Oct 2021 00:12:48 +0000 (02:12 +0200)]
Support new Thumbnail Managing Standard sizes in image-dired
* lisp/image-dired.el
(image-dired--thumbnail-managing-standard-sizes): New defconst.
(image-dired-thumbnail-storage)
(image-dired-thumb-name, image-dired-insert-thumbnail)
(image-dired-thumb-size, image-dired-create-thumb-1): Support larger
thumbnail sizes mandated by new version of the Thumbnail Managing
Standard (December 2020, Version 0.9.0).
Stefan Kangas [Sun, 24 Oct 2021 21:25:07 +0000 (23:25 +0200)]
Use SHA1 when creating thumbnail file name
* lisp/image-dired.el (image-dired-thumb-name): Improve docstring.
Use SHA1 for hashing when creating file name. SHA1 is slightly faster
than MD5, and has a few more bits.
* doc/lispref/display.texi (Progress): Document it.
* lisp/subr.el (with-delayed-message): New macro.
* src/eval.c (with_delayed_message_display)
(with_delayed_message_cancel): Helper functions.
(Ffuncall_with_delayed_message): New function (bug#19776).
Alan Mackenzie [Sun, 24 Oct 2021 19:59:18 +0000 (19:59 +0000)]
CC Mode: Fontify "found types" which are recognized after being first scanned
This aims to fix the scenario where on jit-lock's first scan of a type, it is
not recognized as such, and only later does this happen. The fontification of
such found types is now done by background scanning in short time slices
immediately after initialising the mode.
* lisp/progmodes/cc-engine.el (c-add-type-1): New function.
(c-add-type): Extract c-add-type-1 from it, and reformulate the mechanism for
protecting c-found-types from excessive partial identifiers.
* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Remove the
code which cleared c-found-types on fontification at BOB.
(c-find-types-background): New function, based on c-font-lock-declarations).
(c-type-finder-timer-func): New function.
(c-re-redisplay-timer): New variable.
(c-force-redisplay, c-fontify-new-found-type): New functions.
* lisp/progmodes/cc-mode.el (c-type-finder-timer, c-inhibit-type-finder): New
variables.
(c-leave-cc-mode-mode): Nullify c-post-command-hook, c-post-gc-hook, and
c-type-finder-timer when the last CC Mode buffer of a session is killed.
(c-type-finder-pos): New variable.
(c-basic-common-init): Initialize/Install c-post-command, c-c-type-finder-pos,
c-type-finder-timer, and c-post-gc-hook.
(c-new-id-start, c-new-id-end, c-new-id-is-type): New variables.
(c-update-new-id): New function.
(c-post-command): New post command hook function, used for checking moving
away from partially typed identifiers, and making them full identifiers.
(c-post-gc-hook): New hook to prevent CC Mode activity immediately following
GC, thus allowing keyboard/mouse input to be registered.
(c-before-change): Add code to clear c-found-types on a buffer change at BOB.
(c-after-change): Call c-update-new-id to keep track of partially typed
identifiers.
* doc/misc/cc-mode.texi (Found Types): New @section in the @Chapter Font
Locking.
* lisp/progmodes/cc-vars.el (c-type-finder-time-slot)
(c-type-finder-repeat-time, c-type-finder-chunk-size): New customizable
options.
Don't unhide first thread if entering without selecting article
* lisp/gnus/gnus-sum.el (gnus-summary-first-unread-subject)
(gnus-summary-first-unseen-subject)
(gnus-summary-first-unseen-or-unread-subject): Use it.
(gnus-summary--goto-and-possibly-unhide): New function -- don't
unhide the first thread unless necessary (bug#51344).
Stefan Kangas [Sun, 24 Oct 2021 16:36:09 +0000 (18:36 +0200)]
Improve documentation of image-dired thumbnails
* lisp/image-dired.el: Fix documentation on thumbnail file format to
correctly say that it can be either PNG or JPEG; not just JPEG. Also
fix inconsistent formatting in comments.
* lisp/image-dired.el (image-dired-thumbnail-storage): Improve
docstring.
Stefan Kangas [Sun, 24 Oct 2021 16:28:20 +0000 (18:28 +0200)]
Add support for pngquant to image-dired
* lisp/image-dired.el (image-dired-cmd-pngnq-program)
(image-dired-cmd-pngnq-options): Add support for pngquant.
Prefer, in this order: pngquant, pngnq-s9, pngnq-s for reasons of
speed and how actively maintained the projects seem to be.
Stefan Kangas [Sun, 24 Oct 2021 14:47:22 +0000 (16:47 +0200)]
Add new option help-link-key-to-documentation
* lisp/help.el (help-link-key-to-documentation): New user option.
(substitute-command-keys): Add a link from keys to the command they
are bound to, if the above new option is non-nil. (Bug#8951)
* etc/NEWS: Announce the new option.
Stefan Kangas [Sun, 24 Oct 2021 06:34:52 +0000 (08:34 +0200)]
Make dired-x-guess-file-name-at-point obsolete
* lisp/dired-x.el (dired-x-guess-file-name-at-point): Make
obsolete in favour of 'thing-at-point'.
(dired-x-read-filename-at-point): Use 'thing-at-point' instead of
above obsolete function.
Stefan Kangas [Sat, 23 Oct 2021 17:20:31 +0000 (19:20 +0200)]
Improve documentation of cl-reduce
* doc/misc/cl.texi (Mapping over Sequences): Change the
explanation of 'cl-reduce' so you don't need to have a major in
mathematics to understand it. (Bug#24014)
Stefan Kangas [Sat, 23 Oct 2021 16:42:14 +0000 (18:42 +0200)]
Improve documentation of apply-partially
* doc/lispref/functions.texi (Calling Functions): Improve
documentation of 'apply-partially' to be slightly more clear with
regards to function arity. (Bug#17623)
Stefan Kangas [Sat, 23 Oct 2021 04:49:09 +0000 (06:49 +0200)]
Partially remove exiftool dependency from image-dired.el
* lisp/image-dired.el (exif): Require.
(image-dired-cmd-read-exif-data-program)
(image-dired-cmd-read-exif-data-options)
(image-dired-get-exif-data): Make obsolete in favour of using
exif.el. This removes a dependency on external exiftool for some
operations.
(image-dired-get-exif-file-name)
(image-dired-thumbnail-set-image-description): Use exif.el
functions instead of exiftool.
* lisp/image/exif.el (exif-tag-alist): Add description and
copyright fields.
* test/lisp/image-dired-tests.el: New file.
Stefan Kangas [Sat, 23 Oct 2021 04:12:35 +0000 (06:12 +0200)]
Add new function exif-field
* test/lisp/image/exif-tests.el (exif-elem): Move function from here...
* lisp/image/exif.el (exif-field): ...to here, and rename.
(exif-orientation):
* test/lisp/image/exif-tests.el (test-exif-parse)
(test-exif-parse-short): Use above new function.
Stefan Kangas [Sat, 23 Oct 2021 03:25:37 +0000 (05:25 +0200)]
Add links to commentary reached with finder-list-keywords
* lisp/finder.el (finder-goto-xref): Move from here...
* lisp/emacs-lisp/package.el (package--finder-goto-xref): ...to
here. Make the old name into an obsolete function alias.
(package--finder-xref): New button type.
(package--describe-add-library-links): Factor out new function...
* lisp/finder.el (finder-commentary): ...from here.
(describe-package-1): Call above new function. This fixes an
issue where commentaries reached via 'finder-list-keywords' did
not have links. (Bug#10814)
Alan Mackenzie [Fri, 22 Oct 2021 19:55:01 +0000 (19:55 +0000)]
CC Mode: Fontify "found types" which are recognized after being first scanned
This aims to fix the scenario where on jit-lock's first scan of a type, it is
not recognized as such, and only later does this happen. The fontification of
such found types is now done by background scanning in short time slices
immediately after initialising the mode.
* lisp/progmodes/cc-engine.el (c-add-type-1): New function.
(c-add-type): Extract c-add-type-1 from it, and reformulate the mechanism for
protecting c-found-types from excessive partial identifiers.
* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Remove the
code which cleared c-found-types on fontification at BOB.
(c-find-types-background): New function, based on c-font-lock-declarations).
(c-types-finder-timer-func): New function.
(c-re-redisplay-timer): New variable.
(c-force-redisplay, c-fontify-new-found-type): New functions.
* lisp/progmodes/cc-mode.el (c-type-finder-timer): New variable.
(c-leave-cc-mode-mode): Nullify c-post-command-hook and c-type-finder-timer
when the last CC Mode buffer of a session is killed.
(c-type-finder-pos): New variable.
(c-basic-common-init): Initialize c-type-finder-pos and c-type-finder-timer.
(c-new-id-start, c-new-id-end, c-new-id-is-type): New variables.
(c-update-new-id): New function.
(c-post-command): New post command hook function, used for checking moving
away from partially typed identifiers, and making them full identifiers.
(c-before-change): Add code to clear c-found-types on a buffer change at BOB.
(c-after-change): Call c-update-new-id to keep track of partially typed
identifiers.
* doc/misc/cc-mode.texi (Found Types): New @section in the @Chapter Font
Locking.
* lisp/progmodes/cc-vars.el (c-type-finder-time-slot)
(c-type-finder-repeat-time, c-type-finder-chunk-size): New customizable
options.
Stephen Gildea [Fri, 22 Oct 2021 15:38:17 +0000 (08:38 -0700)]
time-stamp-tests: improvements to test macros
test/lisp/time-stamp-tests.el: Update macro declarations.
(formatz-generate-tests): Don't nconc onto a constant list.
Tests now run 12% faster in batch mode.
Eli Zaretskii [Fri, 22 Oct 2021 12:41:00 +0000 (15:41 +0300)]
Fix WebP support on MS-Windows
* src/image.c (WebPDecodeRGBA, WebPDecodeRGB, WebPFree): Use
correct names and argument lists in DEF_DLL_FN; fix typos.
(WebPGetFeaturesInternal): Load this instead of WebPGetFeatures,
which is a static inline function in webp/decode.h.
(WebPGetFeatures): Redirect to call WebPGetFeaturesInternal.
* lisp/term/w32-win.el (dynamic-library-alist): Fix the name of
the WebP symbol.
* configure.ac (HAVE_WEBP): Fix detection of libwebp on MinGW.
* nt/INSTALL.W64:
* nt/INSTALL: Update information about libwebp availability.
Stephen Gildea [Fri, 22 Oct 2021 03:10:53 +0000 (20:10 -0700)]
Update doc of Edebug specification for macros
doc/lispref/edebug.texi: Update documentation of Edebug specification:
- Do not document "0" as a recommended shortcut for non-instrumented
arguments; nobody knows about nor uses this, so don't encourage it.
- Add an example equivalent to (declare (debug (&rest sexp))).
Juri Linkov [Thu, 21 Oct 2021 17:22:15 +0000 (20:22 +0300)]
* test/lisp/dabbrev-tests.el: Use 'kbd' for readable keys.
(dabbrev-expand-test, dabbrev-completion-test)
(dabbrev-completion-test-with-argument):
Use 'kbd' to format keys for 'execute-kbd-macro'.
(dabbrev-expand-test): Fix docstring.
Glenn Morris [Thu, 21 Oct 2021 15:02:57 +0000 (08:02 -0700)]
Merge from origin/emacs-28
0545c70c16 (origin/emacs-28) ; * src/keyboard.c (readable_events): Ad... 805ed8d318 Fix todo-mode AOT test failures (bug#51308) 8f42ff31f6 Fix hi-lock AOT test failures (bug#51308) 8002fcd4b9 Fix socks test 4540130312 ; Fix typo 59df93e2dd * lisp/help.el (help--analyze-key): Add new arg BUFFER (bu... cb8b12b56d Improve docstrings and NEWS item of 'repeat-mode' 06fe499614 * lisp/tab-bar.el (tab-bar-menu-bar): New command (bug#512... 8358da9c4c Display a tab bar item as sunken when appropriate 29fdc65860 Fix tab bar item highlight when a mouse click is dropped 7236592668 Refer to mouse-highlight from make-pointer-invisible docst... cf4394a397 * etc/PROBLEMS: Add hex codepoint for NO-BREAK SPACE 2d647e88fa Describe how to debug fontconfig issues c916040921 Adapt Tramp tests 1bb14f93f1 Convert ANSI color definitions in themes to use faces (e.g... 8e7cd29712 Revert "Revert back to using ESC as viper-ESC-key again" 91d71b38a3 Fix inset rectangle corners when sides aren't drawn (bug#5... 5c1a575ef4 Don't use color escape sequences in vc-git-expanded-log-entry d7f595cc89 Code cleanup in tramp-tests.el 548a5db611 ; etc/NEWS fix wording