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
* lisp/faces.el (set-face-attribute): Mention new font weights in
doc string.
* src/font.c (struct table_entry): Allow more synonyms.
(weight_table): Expand to support separating medium and normal
weights. Also add heavy/ultra-heavy and some other variants.
(font_parse_fcname): Support more names.
* src/gtkutil.c (xg_weight_to_symbol): Support all the Pango weights.
(xg_style_to_symbol): Make into functions.
(xg_get_font): Adjust.
* src/w32font.c (w32_to_fc_weight): Use symbols.
* src/xfaces.c (syms_of_xfaces): Add the new symbols.
Juri Linkov [Wed, 20 Oct 2021 17:54:57 +0000 (20:54 +0300)]
* lisp/help.el (help--analyze-key): Add new arg BUFFER (bug#51173).
* lisp/help.el (describe-key): Use BUFFER as arg for help--analyze-key.
(describe-key-briefly): Change arg UNTRANSLATED deprecated in 27.1
to BUFFER.
* lisp/gnus/gnus-art.el (gnus-article-describe-key)
(gnus-article-describe-key-briefly): Call describe-key and
describe-key-briefly with first arg as a cons with raw keys,
and the BUFFER arg set to the current buffer.
Juri Linkov [Wed, 20 Oct 2021 16:50:29 +0000 (19:50 +0300)]
* lisp/tab-bar.el (tab-bar-menu-bar): New command (bug#51247).
(tab-bar-format): Rename option 'tab-bar-format-menu-global' to
'tab-bar-format-menu-bar'.
(tab-bar-format-menu-bar): Rename from 'tab-bar-format-menu-global'.
Po Lu [Wed, 20 Oct 2021 07:55:10 +0000 (15:55 +0800)]
Display a tab bar item as sunken when appropriate
When the mouse pointer is pressed on the tab bar, moved out of the tab
bar, and moved back in, it would be more appropriate to behave like
other programs by displaying the item as sunken.
* src/xdisp.c (note_tab_bar_highlight): Display item as sunken if the
mouse pointer returns to the tab bar down.
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Adapt tests.
(tramp--test-supports-set-file-modes-p): Renamed from
`tramp--test-supports-file-modes-p'. Adapt all callees.
(tramp-test35-exec-path): Use it.
Miha Rihtaršič [Tue, 19 Oct 2021 16:41:13 +0000 (18:41 +0200)]
Avoid excessive specbinding in all-completions
* src/minibuf.c (match_regexps):
(Ftry_completion):
(Fall_completions):
(Ftest_completion): Use fast_string_match_internal to match against
regexps in completion-regexp-list without having to bind
case-fold-search.
Further fixes for Turkish case changes in unibyte strings
* src/casefiddle.c (struct casing_context): Add new slot to keep
track of what the previous operation was.
(case_character_impl): Set it.
(do_casify_unibyte_string): Use it to handle Turkish correctly.