Michael Albinus [Fri, 24 Dec 2021 10:32:34 +0000 (11:32 +0100)]
Add tag :tramp-asynchronous-processes to tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp--test--deftest-direct-async-process)
(tramp-test30-make-process, tramp-test31-interrupt-process)
(tramp-test34-explicit-shell-file-name)
(tramp-test44-asynchronous-requests):
Add :tramp-asynchronous-processes tag.
(tramp--test-asynchronous-processes-p): New defun.
(tramp-test32-shell-command, tramp-test33-environment-variables):
Use it.
(tramp--test-expensive-test-p): Rename from
`tramp--test-expensive-test'. Make it a defun. Adapt all callees.
Changes:
- structure the result of mm-dissect-buffer of application/pkcs7-mime
like a multipart mail so there is no loosing of information of
verification and decryption results which can now be displayed by
gnus-mime-display-security
- adjust gnus-mime-display-part to handle application/pkcs7-mime like
multipart/encrypted or multipart/signed
- add dummy entries to mm-verify-function-alist and
mm-decrypt-function-alist so gnus-mime-display-security correctly
displays "S/MIME" and not "unknown protocol"
- don't just check for multipart/signed in
gnus-insert-mime-security-button but also for the pkcs7-mime mimetypes
to print "Encrypted" or "Signed" accordingly in the security button
- adjust mm-possibly-verify-or-decrypt to check for smime-type to ask
wether to verify or decrypt the part and not to always ask to decrypt
- adjust mm-view-pkcs7-decrypt and verify to call mm-sec-status so
success information can be displayed by gnus-mime-display-security
- adjust gnus-mime-security-verify-or-decrypt to handle pkcs7-mime
right with the done changes
Po Lu [Fri, 24 Dec 2021 06:22:21 +0000 (14:22 +0800)]
Grab the server when warping the client pointer
* src/xfns.c (Fx_set_mouse_absolute_pixel_position):
* src/xterm.c (x_make_frame_invisible): Avoid race conditions
where the client pointer is destroyed between when it is
obtained and when XIWarpPointer is called.
Po Lu [Fri, 24 Dec 2021 03:10:09 +0000 (11:10 +0800)]
Fix menu grabs on XI2 Motif builds
* src/xmenu.c (x_activate_menubar) [USE_MOTIF]: Clear XI grab.
* src/xterm.c (xi_grab_or_ungrab_device) [USE_MOTIF]: Always
ungrab if a popup is active.
Revert back to using monospaced fonts in the mode line
* lisp/faces.el (mode-line-active, mode-line-inactive): Revert
back to using monospaced fonts on the mode line (for now). The
main remaining usability problem is clicking on the very small "-"
characters in "U:--".
Stefan Kangas [Wed, 22 Dec 2021 21:15:57 +0000 (22:15 +0100)]
Make substitute-command-keys test less brittle
* test/lisp/help-tests.el (help-tests--test-keymap): New keymap
variable.
(help-tests-substitute-command-keys/keymaps): Make test less
brittle by using above new keymap.
Alan Third [Fri, 26 Nov 2021 12:54:07 +0000 (12:54 +0000)]
Add native HEIC support on macOS (bug#51381)
* lisp/image.el (image-type-header-regexps):
(image-type-file-name-regexps):
(image-type-auto-detectable): Add auto-detect code for heic.
* src/image.c (syms_of_image): Add heic as an image type under NS.
* src/nsimage.m (ns_can_use_native_image_api): Add heic to list of
possible image types in the native image support lookup.
Alan Third [Thu, 26 Aug 2021 18:25:48 +0000 (19:25 +0100)]
Allow resizing undecorated frames on macOS (bug#28512, bug#31795)
* src/nsterm.m (FRAME_DECORATED_FLAGS, FRAME_UNDECORATED_FLAGS):
Remove unused defines.
* src/nsterm.m ([EmacsWindow initWithEmacsFrame:fullscreen:screen:]):
Since this is now the only place these defines are used just put them
inline and add NSWindowStyleMaskResizable for undecorated frames on
Cocoa.
Alan Third [Wed, 25 Aug 2021 18:50:27 +0000 (19:50 +0100)]
Make NS toolbar item ID more unique (bug#50160)
* src/nsmenu.m
([EmacsToolbar addDisplayItemWithImage:idx:tag:labelText:helpText:enabled:]):
Add the label to the identifier to avoid collisions between toolbar
items that use the same image.
Alan Third [Sun, 22 Aug 2021 20:50:09 +0000 (21:50 +0100)]
Make NS toolbar use NSString instead of C strings
* src/nsfns.m ([NSString stringWithLispString:]): Ensure that the lisp
object is actually a string.
* src/nsmenu.m (update_frame_tool_bar): Convert to NSString instead of
C strings.
([EmacsToolbar addDisplayItemWithImage:idx:tag:labelText:helpText:enabled:]):
No need to convert to NSString here anymore.
Alan Third [Sat, 21 Aug 2021 18:39:39 +0000 (19:39 +0100)]
Fix macfont backend color handling
* src/macfont.m (get_cgcolor): Replace use of ns_lookup_indexed_color.
(CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND):
(CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND):
(CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Fix call to get_cgcolor
and fix all callers.
Alan Third [Sun, 15 Aug 2021 09:46:43 +0000 (10:46 +0100)]
Further cleanup of NS color code
* src/dispextern.h (FACE_COLOR_TO_PIXEL): Remove define and fix all
callers.
* src/nsterm.h (struct nsfont_info): Remove color_table.
* src/nsterm.m ([NSColor colorWithUnsignedLong:]): Always assume the
input contains the correct alpha value.
(ns_lookup_indexed_color):
(ns_index_color):
(ns_color_index_to_rgba): Remove functions and fix all callers.
(ns_query_color): No longer set pixel to the lookup table index,
always just set it to the ARGB integer value.
(ns_defined_color): Ignore makeindex as we no longer set pixel to the
lookup table index.
(ns_initialize_display_info):
(ns_redisplay_interface): Remove lookup table.
(ns_term_init): Fix the alpha setting.
Alan Third [Sat, 14 Aug 2021 15:11:30 +0000 (16:11 +0100)]
Simplify NS color handling
* src/image.c (RGB_TO_ULONG):
(ARGB_TO_ULONG):
(RED_FROM_ULONG):
(RED16_FROM_ULONG):
(GREEN16_FROM_ULONG):
(BLUE16_FROM_ULONG): Define these here for NS too.
* src/nsfns.m (ns_set_foreground_color):
(ns_set_background_color): Use new EmacsColor methods.
* src/nsterm.h (struct ns_color_table): Replace this struct with a
built-in Objective C type.
(RGB_TO_ULONG):
(ARGB_TO_ULONG):
(ALPHA_FROM_ULONG):
(RED_FROM_ULONG):
(GREEN_FROM_ULONG):
(BLUE_FROM_ULONG):
(RED16_FROM_ULONG):
(GREEN16_FROM_ULONG):
(BLUE16_FROM_ULONG): These are no longer needed in the NS specific code.
(struct ns_display_info): Use an NSMutableArray instead of a custom struct.
* src/nsterm.m ([NSColor colorWithUnsignedLong:hasAlpha:]):
([NSColor unsignedLong]): New methods.
(ns_lookup_indexed_color):
(ns_index_color): Use the NSMutableArray lookup table.
(ns_term_init):
(ns_color_index_to_rgba):
(ns_query_color): Use the new EmacsColor methods.
(ns_initialize_display_info):
(ns_delete_display): Initialize and release the NSMutableArray lookup table.
Jonas Bernoulli [Wed, 22 Dec 2021 19:03:00 +0000 (20:03 +0100)]
Help outline-minor-mode avoid some false matches
* lisp/international/emoji.el (emoji--generate-file): Help
'outline-minor-mode' avoid false matches by quoting certain
characters when they appear at bol in a multi-line string.
Jonas Bernoulli [Wed, 22 Dec 2021 19:02:00 +0000 (20:02 +0100)]
Hide transient prefix/suffix commands from execute-extended-command
* lisp/international/emoji.el (emoji--define-transient): Hide
transient prefix/suffix commands from 'execute-extended-command'
by declaring that they should only be listed in the non-existent
'not-a-mode' mode.
Use unibyte strings in ntlm auth requests and responses
* lisp/net/ntlm.el (ntlm-build-auth-request)
(ntlm-build-auth-response): Make sure to use unibyte strings for bytes
greater than 127, or base64 encoding will fail.
This should fix failures in ntlm-tests.
* lisp/novice.el (disabled-command-function): Use a prompt for
`read-event' instead of messaging it, so that people using
Emacspeak get the prompt read to them.
Po Lu [Wed, 22 Dec 2021 03:13:23 +0000 (11:13 +0800)]
Use XI2 calls to warp the client pointer
* src/xfns.c (Fx_set_mouse_absolute_pixel_position):
* src/xterm.c (frame_set_mouse_pixel_position): Replace
calls to XWarpPointer with calls to XIWarpPointer with
the client pointer explictly specified. This avoids the
odd situation where the client pointer of the root window
is not the client pointer of the frame.
Allow for next-completion to wrap around the completion buffer
* lisp/simple.el (completion-wrap-movement): Add new option.
(previous-completion): Update docstring.
(next-completion): Respect completion-wrap-movement.
(switch-to-completions): Handle backwards completion by jumping to the
end of the buffer.
* lisp/minibuffer.el: (minibuffer-local-completion-map): Bind
minibuffer-complete to backtab
(completion--in-region-1): Handle backtab to scroll backwards
After deleting the dedicated window, such as a window with *Completions*
buffer, select the previously selected window, like most of other 'cond'
branches do in this function (bug#52491).
Don't produce multibyte strings by accident in sasl-scram-rfc
* lisp/net/sasl-scram-rfc.el (sasl-scram--client-final-message):
The XOR of two unibyte strings should be a unibyte string.
This code previously worked by accident because of an overly tolerant
base64 encoder (bug#52670), but now causes a test failure.
Remove the `mode-line-percent-position' min width hack
* lisp/bindings.el (mode-line-position): Remove hack to get
min-width to work on the `mode-line-percent-position' bit.
* src/xdisp.c (display_string): Respect min-width in the non-Lisp
string case (bug#52332).
Speed up find_field when called from outside a field
* src/editfns.c (find_field): Speed up the field functions when
called from outside a field (bug#52593). (In some cursory tests,
this makes the called-from-outside-a-field case about 3x faster.)
Stefan Monnier [Mon, 20 Dec 2021 16:04:37 +0000 (11:04 -0500)]
Fix bug#28557
* test/lisp/emacs-lisp/cconv-tests.el: Remove `:expected-result :failed`
from the bug#28557 tests.
(cconv-tests-cl-function-:documentation): Account for the presence of
the arglist (aka "usage") in the docstring.
Stefan Monnier [Tue, 21 Dec 2021 01:45:39 +0000 (20:45 -0500)]
eieio-tests.el: Silence last warnings
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-tests--dummy):
New class.
(eieio-test-22-init-forms-dont-match-runnable): Tweak to silence warning.
Paul Eggert [Mon, 20 Dec 2021 23:03:33 +0000 (15:03 -0800)]
Put AM_V_GEN etc. first
With the recent changes to src/verbose.mk.in, it’s more important
to be consistent about putting AM_V_GEN and similar macros at the
start of a rule’s recipe, since ‘make’ now outputs the diagnostic
before it executes the recipe rather than the shell outputting it.
Most of the uses were already this way, but there were a few
outliers. Problem reported by Pip Cet.
* Makefile.in (${srcdir}/info/dir):
* admin/unidata/Makefile.in (${unidir}/charprop.el, ${unifiles})
(${unidir}/emoji-labels.el):
* lib/Makefile.in (libgnu.a, libegnu.a):
* lisp/Makefile.in (TAGS):
* src/Makefile.in (lisp.mk, Emacs):
* test/Makefile.in (%.log, $(test_module)):
Put AM_V_GEN and similar macros first.
Silence byte-compiler warnings from absent optional features
* test/src/inotify-tests.el (inotify-rm-watch):
* test/src/lcms-tests.el (lcms-xyz->jch):
* test/src/sqlite-tests.el (sqlite-open):
Add declarations to prevent byte-compilation warnings when features
are absent.
This predicate can be used for discriminating between lexically and
dynamically bound variables during macro-expansion (only).
It is restricted to internal use for the time being.
* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
Use macroexpand--all-toplevel.
* lisp/emacs-lisp/macroexp.el (macroexp-dynamic-variable-p): New.
(macroexp--expand-all): Maintain macroexp--dynvars.
(macroexpand-all): Rebind macroexp--dynvars.
(macroexpand--all-toplevel): New.
(internal-macroexpand-for-load): Use macroexpand--all-toplevel.
* src/eval.c (eval_sub): Transfer defvar declarations from
Vinternal_interpreter_environment into macroexp--dynvars during
lazy macro-expansion.
* src/lread.c (readevalloop): Rebind macroexp--dynvars around
read-and-evaluate operations.
(syms_of_lread): Define macroexp--dynvars.
* test/lisp/emacs-lisp/macroexp-resources/vk.el: New file.
* test/lisp/emacs-lisp/macroexp-tests.el (macroexp-tests--run-emacs)
(macroexp-tests--eval-in-subprocess)
(macroexp-tests--byte-compile-in-subprocess)
(macroexp--tests-dynamic-variable-p): Add tests.
Treat base64 string encode/decode as pure functions
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns):
Mark base64-decode-string, base64-encode-string and
base64url-encode-string as pure and side-effect-free.
Stefan Kangas [Mon, 20 Dec 2021 14:54:56 +0000 (15:54 +0100)]
Silence byte-compiler using with-no-warnings in tests
We could silence the specific warnings by adding support for them to
with-suppressed-warnings, but it is almost not worth the complexity
for warnings that only show up in one file. In any case, it is not
urgent, so leave behind FIXMEs for now.
Stefan Kangas [Mon, 20 Dec 2021 14:25:23 +0000 (15:25 +0100)]
Silence undefined function warnings in eieio-tests.el
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Silence
byte-compiler with some function definitions. These are overridden by
class definitions further down.
* lisp/international/emoji.el (emoji--score): Don't take the bit
after the colon into consideration, like in "kiss: person, person,
light skin tone, medium-light skin tone".