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.
* lisp/align.el (align-rules-list): Change to work without `C-u'.
(align): Doc clarification.
(align-regexp): Ditto, and change default `C-u' regexp from
"\\(\\s-*\\)" to "\\(\\s-*\\)" so that it'll make things columnar
if the user just hits RET through all the defaults.
Make downcasing unibyte strings in Turkish less wrong
* src/casefiddle.c (ascii_casify_character): New function.
(do_casify_unibyte_string): Use it to make downcasing tr_TR.UTF-8
"I" less wrong.
(Fdowncase): Mention caveats.
(Fupcase):
(Fcapitalize):
(Fupcase_initials): Refer to details in `downcase'.
(syms_of_casefiddle): Define more symbols.
Michael Albinus [Tue, 19 Oct 2021 16:50:12 +0000 (18:50 +0200)]
Code cleanup in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Extend tests.
(tramp--test-out-of-band-p): New defun.
(tramp--test-windows-nt-and-out-of-band-p)
(tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl)
(tramp-test42-utf8-with-ls): Use it.
(tramp--test-windows-nt-or-smb-p): Use `tramp--test-windows-nt-p'.
Robert Pluim [Mon, 18 Oct 2021 09:51:10 +0000 (11:51 +0200)]
Handle VS-16 correctly for non-emoji codepoints
* admin/unidata/blocks.awk: Remove emoji overrides for codepoints with
Emoji_Presentation = No, they're no longer necessary.
* lisp/composite.el: Remove #xFE0F (VS-16) from the range handled by
`compose-gstring-for-variation-glyph' so it can be handled by
`font_range'.
* src/composite.c (syms_of_composite): New variable
`auto-composition-emoji-eligible-codepoints'.
* admin/unidata/emoji-zwj.awk: Generate value for
`auto-composition-emoji-eligible-codepoints'. Add
`composition-function-table' entries for 'codepoint + U+FE0F' for
them.
* src/font.c (codepoint_is_emoji_eligible): New function to check if
we should try to use the emoji font for a codepoint.
(font_range): Use it.
Tassilo Horn [Tue, 19 Oct 2021 05:05:18 +0000 (07:05 +0200)]
Adjust bug-reference-bug-regexp default values to match only at beg of word
Previously, the "bug 1" in "(debug 1)" has also been highlighted.
* lisp/progmodes/bug-reference.el (bug-reference-bug-regexp)
(bug-reference--setup-from-vc-alist,bug-reference-setup-from-mail-alist)
(bug-reference-setup-from-irc-alist): Adjust bug-reference-bug-regexp
default values to match only at the beginning of a word.
Michael Albinus [Mon, 18 Oct 2021 17:54:13 +0000 (19:54 +0200)]
Fix some Tramp problems
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-adb-handle-file-executable-p' and
`tramp-adb-handle-file-readable-p'.
(tramp-adb-handle-file-executable-p)
(tramp-adb-handle-file-readable-p): New defuns.
(tramp-adb-handle-file-writable-p): Simplify.
(tramp-adb-handle-make-process): Handle :filter being t.
(tramp-adb-find-test-command): Remove.
* lisp/net/tramp-sh.el (tramp-sh-handle-file-readable-p):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-readable-p):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Use `tramp-handle-file-readable-p'.
(tramp-gvfs-handle-file-executable-p): Do not check whether file
exists, this is done in `tramp-check-cached-permissions'.
(tramp-gvfs-handle-file-readable-p): Remove.
* lisp/net/tramp.el (tramp-error): Move binding of `inhibit-message' ...
(tramp-signal-hook-function): ... here.
(tramp-handle-access-file): Rewrite.
(tramp-handle-file-readable-p): New defun.
(tramp-handle-make-process): Setting :filter to t works since
Emacs 29.1 only.