]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoRespect changes in eshell-hist-match-partial
Stefan Kangas [Thu, 23 Dec 2021 19:10:16 +0000 (20:10 +0100)]
Respect changes in eshell-hist-match-partial

* lisp/eshell/em-hist.el (eshell-hist--update-keymap): New function.
(eshell-hist-match-partial): Add :set property with above new
function.
(eshell-hist-mode-map): Update for eshell-hist-match-partial using
eshell-hist--update-keymap.

3 years ago* etc/PROBLEMS: Add a problem when PGTK started in systemd unit file
Yuuki Harano [Fri, 24 Dec 2021 14:21:50 +0000 (23:21 +0900)]
* etc/PROBLEMS: Add a problem when PGTK started in systemd unit file

3 years agoAdd tag :tramp-asynchronous-processes to tramp-tests.el
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.

3 years agoverify signed content in smime encrypted and signed message
Sebastian Fieber [Fri, 24 Dec 2021 09:43:52 +0000 (10:43 +0100)]
verify signed content in smime encrypted and signed message

* lisp/gnus/gnus-art.el (gnus-mime-display-part): Parse pkcs7
parts (bug#40397).
(gnus-mime-security-verify-or-decrypt):
(gnus-insert-mime-security-button): Handle these parts.

* lisp/gnus/mm-decode.el (mm-verify-function-alist): Add pkcs7
functions.
(mm-decrypt-function-alist): Handle them.
(mm-possibly-verify-or-decrypt): Ditto.

* lisp/gnus/mm-view.el (mm-view-pkcs7-decrypt): Handle pkcs7.

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

3 years agoSimplify whitespace stripping in shr-expand-url
Lars Ingebrigtsen [Fri, 24 Dec 2021 09:23:35 +0000 (10:23 +0100)]
Simplify whitespace stripping in shr-expand-url

* lisp/net/shr.el (shr-expand-url): Simplify whitespace stripping.

3 years agoFix text decoration display on stretch glyphs with no box on NS
Po Lu [Fri, 24 Dec 2021 07:48:27 +0000 (15:48 +0800)]
Fix text decoration display on stretch glyphs with no box on NS

* src/nsterm.m (ns_dumpglyphs_stretch): Draw decorations if
there is no box.

3 years agoMake precision scrolling work on margins and fringes
Po Lu [Fri, 24 Dec 2021 07:35:15 +0000 (15:35 +0800)]
Make precision scrolling work on margins and fringes

* lisp/pixel-scroll.el (pixel-scroll-precision-mode-map): Add
missing key definitions.

3 years agoRemove useless functions from PGTK port that were breaking emacsbug
Po Lu [Fri, 24 Dec 2021 07:24:35 +0000 (15:24 +0800)]
Remove useless functions from PGTK port that were breaking emacsbug

* src/pgtkfns.c (Fx_server_vendor, Fx_server_version): Remove
useless functions that returned invalid values.
(syms_of_pgtkfns): Stop defining removed subrs.

3 years agoGrab the server when warping the client pointer
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.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 24 Dec 2021 05:30:41 +0000 (06:30 +0100)]
Merge from origin/emacs-28

04be23f19f Improve Xref documentation
edb1d491d9 * lisp/net/shr.el (shr-expand-url): Also strip trailing wh...

3 years agoAcquire draw lock when updating menubar on Haiku
Po Lu [Fri, 24 Dec 2021 03:21:21 +0000 (03:21 +0000)]
Acquire draw lock when updating menubar on Haiku

* src/haikumenu.c (digest_menu_items): Acquire draw lock.

3 years agoFix menu grabs on XI2 Motif builds
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.

3 years agoFix some more incorrect valuator clearing
Po Lu [Fri, 24 Dec 2021 01:55:15 +0000 (09:55 +0800)]
Fix some more incorrect valuator clearing

* src/xterm.c (handle_one_xevent): Improve detection of stray
ungrab events.

3 years agoImprove Xref documentation
Dmitry Gutov [Fri, 24 Dec 2021 01:24:52 +0000 (03:24 +0200)]
Improve Xref documentation

* lisp/progmodes/xref.el (xref-item): Add docstring for 'summary'.
Fix typo in the header Commentary.

3 years agoDrop scrollbar motion events when valuators are found
Po Lu [Fri, 24 Dec 2021 01:20:44 +0000 (09:20 +0800)]
Drop scrollbar motion events when valuators are found

* src/xterm.c (handle_one_xevent): Drop XI_Motion if it's on
top of a scroll bar and a valuator is found.

3 years ago* lisp/net/shr.el (shr-expand-url): Also strip trailing
Andreas Schwab [Thu, 23 Dec 2021 18:06:13 +0000 (19:06 +0100)]
* lisp/net/shr.el (shr-expand-url): Also strip trailing
whitespace.

3 years ago* doc/misc/Makefile.in (need_emacsver): Add missing members.
Glenn Morris [Thu, 23 Dec 2021 16:34:16 +0000 (08:34 -0800)]
* doc/misc/Makefile.in (need_emacsver): Add missing members.

3 years agoMake precision scrolling also work on various bars
Po Lu [Thu, 23 Dec 2021 13:35:46 +0000 (21:35 +0800)]
Make precision scrolling also work on various bars

* lisp/pixel-scroll.el (pixel-scroll-precision-mode-map):
Define keys for various kinds of bars.

3 years agoFix precision scrolling down for multi-line display strings
Po Lu [Thu, 23 Dec 2021 13:26:59 +0000 (21:26 +0800)]
Fix precision scrolling down for multi-line display strings

* lisp/pixel-scroll.el
(pixel-scroll-precision-scroll-down-page): Make sure Y delta
is appropriate before deciding on next-pos.

3 years agoSet start to desired start when pixel scrolling to end of buffer
Po Lu [Thu, 23 Dec 2021 11:00:30 +0000 (19:00 +0800)]
Set start to desired start when pixel scrolling to end of buffer

* lisp/pixel-scroll.el
(pixel-scroll-precision-scroll-down-page): Set start to desired
start when point cannot be moved further down.

3 years agoAllow window-text-pixel-size to measure pixels around a position
Po Lu [Thu, 23 Dec 2021 01:12:02 +0000 (09:12 +0800)]
Allow window-text-pixel-size to measure pixels around a position

* doc/lispref/display.texi (Size of Displayed Text): Announce
new meaning of `from'.
* etc/NEWS: Announce changes.

* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-up-page):
Use new feature.

* src/xdisp.c (window_text_pixel_size): Understand a special
format of `from' that specifies the amount of pixels above or
below a position.

(Fwindow_text_pixel_size): Update doc string.

3 years agoRevert back to using monospaced fonts in the mode line
Lars Ingebrigtsen [Thu, 23 Dec 2021 10:43:47 +0000 (11:43 +0100)]
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:--".

3 years ago; Fix documentation of a recently-installed change
Eli Zaretskii [Thu, 23 Dec 2021 07:55:48 +0000 (09:55 +0200)]
; Fix documentation of a recently-installed change

* lisp/gnus/message.el (message-server-alist)
(message-update-smtp-method-header): Doc string fixes.

* doc/misc/message.texi (Sending Variables): Fix wording and
markup.

* etc/NEWS: Fix the wording of the 'message-server-alist' entry.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 23 Dec 2021 05:31:26 +0000 (06:31 +0100)]
Merge from origin/emacs-28

29fffbdd87 Revert field-related thingatpt changes
9bcb732686 * lisp/window.el (quit-restore-window): Select previously ...
b7d31d6192 Revert "Remove Motif support"

# Conflicts:
# etc/NEWS

3 years agoFix wrong-type-argument
Philip Kaludercic [Wed, 22 Dec 2021 23:38:28 +0000 (00:38 +0100)]
Fix wrong-type-argument

* message.el (message-update-smtp-method-header): Only Use address
part of mail-extract-address-component.

3 years agoAllow automatic X-Message-SMTP-Method header insertion
Philip Kaludercic [Sun, 19 Dec 2021 21:53:59 +0000 (22:53 +0100)]
Allow automatic X-Message-SMTP-Method header insertion

* message.el (message-server-alist): Add user option
(message-update-smtp-method-header): Add function
(message-send): Call message-update-smtp-method-header
* doc/misc/message.texi (Sending Variables): Document
message-server-alist
* etc/NEWS: Add news entry

3 years agoFix compile time error in a pcase test
Stefan Kangas [Wed, 22 Dec 2021 21:40:51 +0000 (22:40 +0100)]
Fix compile time error in a pcase test

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-cl-type): Fix test.

3 years agoUse defvar-keymap in minibuffer.el
Stefan Kangas [Wed, 22 Dec 2021 21:26:46 +0000 (22:26 +0100)]
Use defvar-keymap in minibuffer.el

* lisp/minibuffer.el (completion-in-region-mode-map)
(minibuffer-local-completion-map)
(minibuffer-local-must-match-map)
(minibuffer-local-filename-completion-map)
(minibuffer-local-ns-map, minibuffer-inactive-mode-map): Use
defvar-keymap.

3 years agoMake substitute-command-keys test less brittle
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.

3 years agoAdd native HEIC support on macOS (bug#51381)
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.

3 years agoAllow resizing undecorated frames on macOS (bug#28512, bug#31795)
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.

3 years agoMake NS toolbar item ID more unique (bug#50160)
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.

3 years agoMake NS toolbar use NSString instead of C strings
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.

3 years agoFix macfont backend color handling
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.

3 years agoFurther cleanup of NS color code
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.

thing

3 years agoSimplify NS color handling
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.

3 years agoHelp outline-minor-mode avoid some false matches
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.

3 years agoHide transient prefix/suffix commands from execute-extended-command
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.

3 years agoFix some Tramp tests
Michael Albinus [Wed, 22 Dec 2021 17:13:18 +0000 (18:13 +0100)]
Fix some Tramp tests

* test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p)
(tramp-test14-delete-directory, tramp-test29-start-file-process)
(tramp-test30-make-process): Adapt tests.

3 years agoUse unibyte strings in ntlm auth requests and responses
Mattias Engdegård [Wed, 22 Dec 2021 15:32:04 +0000 (16:32 +0100)]
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.

3 years ago; * etc/NEWS: Fix a recently-added entry.
Eli Zaretskii [Wed, 22 Dec 2021 14:24:56 +0000 (16:24 +0200)]
; * etc/NEWS: Fix a recently-added entry.

3 years agoAdjust test after recent help.el change
Lars Ingebrigtsen [Wed, 22 Dec 2021 14:19:41 +0000 (15:19 +0100)]
Adjust test after recent help.el change

3 years ago* src/pgtkterm.c (scroll_event): Fix scroll delta scale.
Po Lu [Wed, 22 Dec 2021 13:36:00 +0000 (21:36 +0800)]
* src/pgtkterm.c (scroll_event): Fix scroll delta scale.

3 years ago* src/pgtkterm.c (scroll_event): Fix sign of delta_y.
Po Lu [Wed, 22 Dec 2021 13:32:14 +0000 (21:32 +0800)]
* src/pgtkterm.c (scroll_event): Fix sign of delta_y.

3 years agoDisable by default and add NEWS entry to the new completion behavior
Po Lu [Wed, 22 Dec 2021 10:37:31 +0000 (18:37 +0800)]
Disable by default and add NEWS entry to the new completion behavior

* etc/NEWS: Announce 'completion-auto-select'.
* lisp/simple.el (completion-auto-select): Default to nil.

3 years agoRevert field-related thingatpt changes
Lars Ingebrigtsen [Wed, 22 Dec 2021 12:56:47 +0000 (13:56 +0100)]
Revert field-related thingatpt changes

This reverts 7db376e560448e61485ba054def8c82b21f33d6a, which led to
severe performance regressions when being run in large buffers with no
fields (bug#52593)

3 years agoSimplify disabled-command-function prompting
Lars Ingebrigtsen [Wed, 22 Dec 2021 12:34:15 +0000 (13:34 +0100)]
Simplify disabled-command-function prompting

* 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.

3 years agoUse pop-to-buffer-same-window in `M-x term'
Lars Ingebrigtsen [Wed, 22 Dec 2021 12:00:55 +0000 (13:00 +0100)]
Use pop-to-buffer-same-window in `M-x term'

* lisp/term.el (term): Allow `display-buffer*' customization to
take effect (bug#52688).

3 years agoFix horizontal scrolling on PGTK
Po Lu [Wed, 22 Dec 2021 09:29:27 +0000 (17:29 +0800)]
Fix horizontal scrolling on PGTK

* src/pgtkterm.c (scroll_event): Fix for when
`mwheel-coalesce-scroll-events' is nil.

3 years agoUse XI2 calls to warp the client pointer
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.

3 years agoFix GTK crash when clicking on xwidgets on XI2
Po Lu [Wed, 22 Dec 2021 01:24:05 +0000 (09:24 +0800)]
Fix GTK crash when clicking on xwidgets on XI2

* src/xterm.c (handle_one_xevent): Drop button events destined
for an xwidget.

3 years agoUpdate from gnulib
Paul Eggert [Tue, 21 Dec 2021 23:36:16 +0000 (15:36 -0800)]
Update from gnulib

3 years agoDelete completion window on quitting
Philip Kaludercic [Thu, 9 Dec 2021 16:36:14 +0000 (17:36 +0100)]
Delete completion window on quitting

* lisp/simple.el (completion-list-mode-map): Rebind
delete-completion-window over keyboard-quit.

3 years agoAllow for next-completion to wrap around the completion buffer
Philip Kaludercic [Thu, 9 Dec 2021 16:26:14 +0000 (17:26 +0100)]
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

3 years agoAllow for the completion buffer to be automatically selected
Philip Kaludercic [Thu, 9 Dec 2021 16:34:54 +0000 (17:34 +0100)]
Allow for the completion buffer to be automatically selected

* lisp/simple.el (completion-auto-select): Add new option.
(completion-setup-function): Respect completion-auto-select.

3 years ago* lisp/window.el (quit-restore-window): Select previously selected window.
Juri Linkov [Tue, 21 Dec 2021 19:11:30 +0000 (21:11 +0200)]
* lisp/window.el (quit-restore-window): Select previously selected window.

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).

3 years agoRevert "Remove Motif support"
Robert Pluim [Tue, 21 Dec 2021 17:39:39 +0000 (18:39 +0100)]
Revert "Remove Motif support"

This reverts commit db237850abc240e2c3e765e9cc7e15ee5681dcaf.

3 years ago; * src/xdisp.c (display_string): Fix a typo in a comment.
Eli Zaretskii [Tue, 21 Dec 2021 17:18:33 +0000 (19:18 +0200)]
; * src/xdisp.c (display_string): Fix a typo in a comment.

3 years agoDeclare functions to silence byte-compiler
Stefan Kangas [Tue, 21 Dec 2021 17:04:33 +0000 (18:04 +0100)]
Declare functions to silence byte-compiler

* lisp/auth-source.el (gnutls-symmetric-decrypt, gnutls-ciphers):
* lisp/net/dbus.el (libxml-parse-xml-region):
* lisp/simple.el (thread-name):
* lisp/thread.el (thread-name, thread-signal, thread--blocker)
(current-thread, thread-live-p, all-threads):
* test/lisp/emacs-lisp/multisession-tests.el (sqlite-close):
* test/lisp/net/gnutls-tests.el (gnutls-symmetric-decrypt)
(gnutls-symmetric-encrypt, gnutls-hash-mac, gnutls-hash-digest)
(gnutls-ciphers, gnutls-digests, gnutls-macs):
* test/lisp/net/network-stream-tests.el (gnutls-peer-status):
* test/lisp/net/shr-tests.el (libxml-parse-html-region):
* test/src/decompress-tests.el (zlib-decompress-region):
* test/src/process-tests.el (thread-last-error, thread-join)
(make-thread):
* test/src/xml-tests.el (libxml-parse-xml-region): Declare
functions to silence byte-compiler in --without-all builds.

3 years agoFix some tests in --without-all builds
Stefan Kangas [Tue, 21 Dec 2021 17:01:23 +0000 (18:01 +0100)]
Fix some tests in --without-all builds

* test/lisp/image-tests.el (image-type/from-filename):
* test/src/image-tests.el (image-tests-init-image-library):
* test/src/thread-tests.el (threads-test-bug33073): Fix tests in
--without-all builds.

3 years agoSilence additional byte-compiler warning in test
Stefan Kangas [Tue, 21 Dec 2021 14:56:33 +0000 (15:56 +0100)]
Silence additional byte-compiler warning in test

* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el:
Silence byte-compiler.

3 years agoAdd `permission-denied' error to Tramp
Michael Albinus [Tue, 21 Dec 2021 14:15:16 +0000 (15:15 +0100)]
Add `permission-denied' error to Tramp

* lisp/net/tramp-compat.el (tramp-permission-denied): New defconst.
(tramp-compat-permission-denied): New defsubst.

* lisp/net/tramp.el (tramp-handle-access-file):
* lisp/net/tramp-archive.el (tramp-archive-handle-copy-file): Use it.

3 years agoFix xg_event_is_scrollbar for grab-related events on XI2
Po Lu [Tue, 21 Dec 2021 11:25:26 +0000 (19:25 +0800)]
Fix xg_event_is_scrollbar for grab-related events on XI2

* src/gtkutil.c (xg_event_is_for_scrollbar): Don't return true
if event coordinates are outside the frame on XInput 2.

3 years ago; Fix spelling; be consistent with "key binding" (Bug#52674)
Stefan Kangas [Tue, 21 Dec 2021 10:19:04 +0000 (11:19 +0100)]
; Fix spelling; be consistent with "key binding" (Bug#52674)

3 years agoDon't produce multibyte strings by accident in sasl-scram-rfc
Mattias Engdegård [Tue, 21 Dec 2021 09:51:58 +0000 (10:51 +0100)]
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.

3 years ago; * src/xterm.c (handle_one_xevent): Fix typo in last change.
Po Lu [Tue, 21 Dec 2021 07:02:37 +0000 (15:02 +0800)]
; * src/xterm.c (handle_one_xevent): Fix typo in last change.

3 years agoIgnore XI_TouchBegin events on the GTK tool bar
Po Lu [Tue, 21 Dec 2021 06:58:44 +0000 (14:58 +0800)]
Ignore XI_TouchBegin events on the GTK tool bar

* src/xterm.c (handle_one_xevent): Ignore TouchBegin events
that target the tool bar.

3 years agoFix gnus subject matching when subject is empty
Andrew G Cohen [Tue, 21 Dec 2021 05:47:44 +0000 (13:47 +0800)]
Fix gnus subject matching when subject is empty

* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Don't try
to limit to a matching subject when the simplified subject is empty.

3 years agoRevert "Speed up find_field when called from outside a field"
Lars Ingebrigtsen [Tue, 21 Dec 2021 04:25:50 +0000 (05:25 +0100)]
Revert "Speed up find_field when called from outside a field"

This reverts commit 4d8af56c76ee20bc8e1ebdeef5c4100cea005974.

This leads to lisp-mode-tests failures

3 years agoRemove the `mode-line-percent-position' min width hack
Lars Ingebrigtsen [Mon, 20 Dec 2021 12:37:15 +0000 (13:37 +0100)]
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).

3 years agoAllow @ characters in heredoc in shell-script-mode
Lars Ingebrigtsen [Mon, 20 Dec 2021 09:45:51 +0000 (10:45 +0100)]
Allow @ characters in heredoc in shell-script-mode

* lisp/progmodes/sh-script.el (defconst): Also allow @ in heredoc
(bug#52496).

3 years agoUse the new `permission-denied' error to catch multisession errors
Lars Ingebrigtsen [Mon, 20 Dec 2021 09:29:50 +0000 (10:29 +0100)]
Use the new `permission-denied' error to catch multisession errors

* lisp/emacs-lisp/multisession.el (multisession--read-file-value):
Use the new `permission-denied' error to catch file errors on Windows.

3 years agoSpeed up find_field when called from outside a field
Lars Ingebrigtsen [Mon, 20 Dec 2021 09:26:25 +0000 (10:26 +0100)]
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.)

3 years agoFix bug#28557
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.

* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric):
Handle non-constant `:documentation`.

* lisp/emacs-lisp/generator.el (iter-lambda):
* lisp/emacs-lisp/cconv.el (cconv--convert-funcbody):
Use `macroexp-parse-body`.

3 years agoDon't drop touch events we're not interested in on GTK3
Po Lu [Tue, 21 Dec 2021 02:01:37 +0000 (10:01 +0800)]
Don't drop touch events we're not interested in on GTK3

* src/xterm.c (handle_one_xevent): Allow GTK to handle
unwanted TouchBegin events.

3 years agoFix touch event menu bar detection
Po Lu [Tue, 21 Dec 2021 01:58:14 +0000 (09:58 +0800)]
Fix touch event menu bar detection

* src/xterm.c (handle_one_event): Don't drop menu bar touch
events.

3 years agoFix xg_event_is_for_menubar for XI2 events
Po Lu [Tue, 21 Dec 2021 01:52:05 +0000 (09:52 +0800)]
Fix xg_event_is_for_menubar for XI2 events

* src/gtkutil.c (xg_event_is_for_menubar): Use correct fields
for XI2 events.
* src/xterm.c (handle_one_event): Drop TouchBegin events we
know about.

3 years agoeieio-tests.el: Silence last warnings
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.

3 years ago* src/xterm.c (handle_one_xevent): Set user time on touch events.
Po Lu [Tue, 21 Dec 2021 01:43:23 +0000 (09:43 +0800)]
* src/xterm.c (handle_one_xevent): Set user time on touch events.

3 years agoIgnore all emulated button events (i.e. those from touchscreens)
Po Lu [Tue, 21 Dec 2021 01:41:40 +0000 (09:41 +0800)]
Ignore all emulated button events (i.e. those from touchscreens)

* src/xterm.c (handle_one_xevent): Ignore all XIPointerEmulated
events if the display supports XI 2.2 or later.

3 years agoPut AM_V_GEN etc. first
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.

3 years ago; Minor license statement fixes
Stefan Kangas [Mon, 20 Dec 2021 21:27:54 +0000 (22:27 +0100)]
; Minor license statement fixes

3 years agoMake some variable aliases obsolete
Stefan Kangas [Mon, 20 Dec 2021 21:12:25 +0000 (22:12 +0100)]
Make some variable aliases obsolete

* lisp/progmodes/make-mode.el (makefile-query-one-target-method):
* lisp/skeleton.el (skeleton-transformation, skeleton-filter):
* lisp/textmodes/artist.el (artist-text-renderer):
* lisp/textmodes/bibtex.el (bibtex-autokey-name-case-convert):
(bibtex-autokey-titleword-case-convert):
* lisp/textmodes/ispell.el (ispell-format-word):
* lisp/textmodes/sgml-mode.el (sgml-transformation):
* lisp/vc/add-log.el (change-log-time-zone-rule): Make variable
aliases obsolete.

3 years agoPrefer $(info) to @echo
Paul Eggert [Mon, 20 Dec 2021 20:14:07 +0000 (12:14 -0800)]
Prefer $(info) to @echo

Have GNU Make output some diagnostics directly, instead of forking
and execing a shell to do it.
* GNUmakefile (help):
* doc/lispref/two-volume.make (vol2.pdf, elisp2med-init)
(elisp2-init):
* doc/misc/Makefile.in (echo-info, echo-sources):
* lib-src/Makefile.in (archlibdir, install, check):
* src/verbose.mk.in (AM_V_AR, AM_V_CC, AM_V_CXX, AM_V_CCLD)
(AM_V_CXXLD, AM_V_ELC, AM_V_ELN, AM_V_GEN, AM_V_GLOBALS)
(AM_V_RC):
* test/Makefile.in (subdirs, subdir-targets):
Prefer $(info) to @echo.
* GNUmakefile (MAKECMDGOALS, configure, Makefile):
Prefer $(warning) to @echo >&2.
* src/verbose.mk.in (AM_V_ELN): Output target, like the others.

3 years agoFix sloppy base64 acceptance of some multibyte characters
Mattias Engdegård [Mon, 20 Dec 2021 17:17:23 +0000 (18:17 +0100)]
Fix sloppy base64 acceptance of some multibyte characters

The base64 encoding functions incorrectly accepted some multibyte
characters; stop doing that (bug#52670).

* src/fns.c (base64_encode_1): Reject all multibyte characters.
* test/src/fns-tests.el (fns-tests-base64-encode-string)
(fns-test-base64url-encode-region)
(fns-test-base64url-encode-string): Add tests.
* doc/lispref/text.texi (Base 64): Rephrase outdated manual text.
* etc/NEWS: Add a notice.

3 years agoFix build in a separate directory (bug#52669)
Sam Steingold [Mon, 20 Dec 2021 18:22:42 +0000 (13:22 -0500)]
Fix build in a separate directory (bug#52669)

* src/lisp.h: Include <globals.h> instead of "globals.h"

3 years agoUse defvar-keymap in wdired.el
Stefan Kangas [Mon, 20 Dec 2021 17:51:09 +0000 (18:51 +0100)]
Use defvar-keymap in wdired.el

* lisp/wdired.el (wdired-mode-map, wdired-perm-mode-map): Use
defvar-keymap.

3 years agoUse declare-function instead of defun in eieio-tests.el
Stefan Kangas [Mon, 20 Dec 2021 17:34:42 +0000 (18:34 +0100)]
Use declare-function instead of defun in eieio-tests.el

* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Prefer
declare-function to defun.

3 years ago; * lisp/emacs-lisp/cl-macs.el (cl--self-tco): fix bootstrapping
Mattias Engdegård [Mon, 20 Dec 2021 16:29:17 +0000 (17:29 +0100)]
; * lisp/emacs-lisp/cl-macs.el (cl--self-tco): fix bootstrapping

3 years agoSilence byte-compiler warnings from absent optional features
Mattias Engdegård [Mon, 20 Dec 2021 16:13:09 +0000 (17:13 +0100)]
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.

3 years agoBody of dynamic let-bindings is not in tail position
Mattias Engdegård [Mon, 20 Dec 2021 10:59:22 +0000 (11:59 +0100)]
Body of dynamic let-bindings is not in tail position

This fixes a known bug in `named-let`.

* lisp/emacs-lisp/cl-macs.el (cl--self-tco): Prevent TCO from inside
dynamic variable bindings.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): Add test.

3 years agoAdd `macroexp--dynamic-variable-p`
Mattias Engdegård [Sat, 11 Dec 2021 20:39:19 +0000 (21:39 +0100)]
Add `macroexp--dynamic-variable-p`

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.

3 years agoTreat base64 string encode/decode as pure functions
Mattias Engdegård [Sun, 19 Dec 2021 11:38:17 +0000 (12:38 +0100)]
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.

3 years agoSilence byte-compiler using with-no-warnings in tests
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.

* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-37-obsolete-name-in-constructor, class-c)
(eieio-test-01-mix-alloc-initarg, slotattr-class-base):
* test/lisp/progmodes/elisp-mode-tests.el
(xref-elisp-generic-co-located-default): Silence byte-compiler.

3 years agoSilence undefined function warnings in eieio-tests.el
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.

3 years agoPrefer skip-unless in one eieio test
Stefan Kangas [Mon, 20 Dec 2021 12:57:19 +0000 (13:57 +0100)]
Prefer skip-unless in one eieio test

* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-01-mix-alloc-initarg): Use skip-unless to correctly mark
the test as skipped.

3 years agoSilence byte-compiler in cconv-tests.el
Stefan Kangas [Mon, 20 Dec 2021 12:51:06 +0000 (13:51 +0100)]
Silence byte-compiler in cconv-tests.el

* test/lisp/emacs-lisp/cconv-tests.el
(cconv-tests-iter-lambda-:documentation)
(cconv-tests-cl-function-:documentation): Silence byte-compiler.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Mon, 20 Dec 2021 05:30:32 +0000 (06:30 +0100)]
Merge from origin/emacs-28

16ed9fad2c ; * doc/lispref/frames.texi (Child Frames): Improve wording.
f11b996a3c Clarify description of two mouse dragging parameters (Bug#...

3 years ago* lisp/progmodes/sh-script.el (sh-mode-map): Use defvar-keymap.
Stefan Kangas [Sun, 19 Dec 2021 20:29:35 +0000 (21:29 +0100)]
* lisp/progmodes/sh-script.el (sh-mode-map): Use defvar-keymap.

3 years ago; * lisp/progmodes/sh-script.el (sh-mode-menu): Fix typos.
Stefan Kangas [Sun, 19 Dec 2021 20:12:23 +0000 (21:12 +0100)]
; * lisp/progmodes/sh-script.el (sh-mode-menu): Fix typos.