1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-05 11:21:04 -08:00
Commit graph

153085 commits

Author SHA1 Message Date
Alan Third
0f427befe8 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.
2021-12-22 20:48:19 +00:00
Jonas Bernoulli
5b0121b708 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.
2021-12-22 20:03:00 +01:00
Jonas Bernoulli
7be73593b4 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.
2021-12-22 20:02:00 +01:00
Michael Albinus
8d0efd87e1 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.
2021-12-22 18:13:18 +01:00
Mattias Engdegård
ccba86be78 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.
2021-12-22 16:34:26 +01:00
Eli Zaretskii
ca5c527ade ; * etc/NEWS: Fix a recently-added entry. 2021-12-22 16:24:56 +02:00
Lars Ingebrigtsen
b7faac0fef Adjust test after recent help.el change 2021-12-22 15:19:41 +01:00
Po Lu
3dbe7caed7 * src/pgtkterm.c (scroll_event): Fix scroll delta scale. 2021-12-22 21:36:18 +08:00
Po Lu
551fe22557 * src/pgtkterm.c (scroll_event): Fix sign of delta_y. 2021-12-22 21:33:00 +08:00
Po Lu
4154a85d81 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.
2021-12-22 21:33:00 +08:00
Lars Ingebrigtsen
70266929c3 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.
2021-12-22 13:34:15 +01:00
Lars Ingebrigtsen
dbd0eef0c7 Use pop-to-buffer-same-window in `M-x term'
* lisp/term.el (term): Allow `display-buffer*' customization to
take effect (bug#52688).
2021-12-22 13:00:55 +01:00
Po Lu
141bf182da Fix horizontal scrolling on PGTK
* src/pgtkterm.c (scroll_event): Fix for when
`mwheel-coalesce-scroll-events' is nil.
2021-12-22 17:29:27 +08:00
Po Lu
f703232b7f 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.
2021-12-22 11:13:23 +08:00
Po Lu
026804b606 Fix GTK crash when clicking on xwidgets on XI2
* src/xterm.c (handle_one_xevent): Drop button events destined
for an xwidget.
2021-12-22 09:24:05 +08:00
Paul Eggert
4b7e73432c Update from gnulib 2021-12-21 15:37:30 -08:00
Philip Kaludercic
f1668ef23c Delete completion window on quitting
* lisp/simple.el (completion-list-mode-map): Rebind
delete-completion-window over keyboard-quit.
2021-12-21 22:31:18 +01:00
Philip Kaludercic
15693c8116 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
2021-12-21 22:31:18 +01:00
Philip Kaludercic
f6967d2f66 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.
2021-12-21 22:31:18 +01:00
Eli Zaretskii
678b29711b ; * src/xdisp.c (display_string): Fix a typo in a comment. 2021-12-21 19:18:33 +02:00
Stefan Kangas
11c2ffddc9 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.
2021-12-21 18:04:33 +01:00
Stefan Kangas
32a764e106 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.
2021-12-21 18:02:05 +01:00
Stefan Kangas
1a923e5ac6 Silence additional byte-compiler warning in test
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el:
Silence byte-compiler.
2021-12-21 15:56:33 +01:00
Michael Albinus
73e862237d 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.
2021-12-21 15:15:16 +01:00
Po Lu
264589cdf7 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.
2021-12-21 19:26:40 +08:00
Stefan Kangas
cf6dc1838a ; Fix spelling; be consistent with "key binding" (Bug#52674) 2021-12-21 11:19:04 +01:00
Mattias Engdegård
e56dd354c7 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.
2021-12-21 10:59:06 +01:00
Po Lu
c0e9785c7c ; * src/xterm.c (handle_one_xevent): Fix typo in last change. 2021-12-21 15:02:37 +08:00
Po Lu
e703735383 Ignore XI_TouchBegin events on the GTK tool bar
* src/xterm.c (handle_one_xevent): Ignore TouchBegin events
that target the tool bar.
2021-12-21 15:00:08 +08:00
Andrew G Cohen
6d4c367f3f 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.
2021-12-21 13:47:44 +08:00
Lars Ingebrigtsen
cf2597da0d Revert "Speed up find_field when called from outside a field"
This reverts commit 4d8af56c76.

This leads to lisp-mode-tests failures
2021-12-21 05:25:50 +01:00
Lars Ingebrigtsen
18ce031f9b 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).
2021-12-21 05:23:11 +01:00
Lars Ingebrigtsen
c963672736 Allow @ characters in heredoc in shell-script-mode
* lisp/progmodes/sh-script.el (defconst): Also allow @ in heredoc
(bug#52496).
2021-12-21 05:23:11 +01:00
Lars Ingebrigtsen
6def36f216 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.
2021-12-21 05:23:11 +01:00
Lars Ingebrigtsen
4d8af56c76 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.)
2021-12-21 05:23:11 +01:00
Stefan Monnier
0c4fc7032a 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`.
2021-12-20 22:00:57 -05:00
Po Lu
43356423a2 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.
2021-12-21 10:01:37 +08:00
Po Lu
513fe2d6ff Fix touch event menu bar detection
* src/xterm.c (handle_one_event): Don't drop menu bar touch
events.
2021-12-21 09:58:14 +08:00
Po Lu
a5509a2a5e 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.
2021-12-21 09:53:10 +08:00
Stefan Monnier
bfcff46199 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.
2021-12-20 20:45:39 -05:00
Po Lu
4234995d42 * src/xterm.c (handle_one_xevent): Set user time on touch events. 2021-12-21 09:43:23 +08:00
Po Lu
2bcd299431 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.
2021-12-21 09:41:40 +08:00
Paul Eggert
aa1fdb3f6f 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.
2021-12-20 15:05:08 -08:00
Stefan Kangas
5f57b41aa6 ; Minor license statement fixes 2021-12-20 22:31:31 +01:00
Stefan Kangas
c167009400 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.
2021-12-20 22:16:24 +01:00
Paul Eggert
eaa44ca40e 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.
2021-12-20 12:24:04 -08:00
Mattias Engdegård
a34650acff 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.
2021-12-20 20:22:09 +01:00
Sam Steingold
27be90154d Fix build in a separate directory (bug#52669)
* src/lisp.h: Include <globals.h> instead of "globals.h"
2021-12-20 13:25:46 -05:00
Stefan Kangas
6e050a4da7 Use defvar-keymap in wdired.el
* lisp/wdired.el (wdired-mode-map, wdired-perm-mode-map): Use
defvar-keymap.
2021-12-20 18:52:31 +01:00
Stefan Kangas
89eb23589f Use declare-function instead of defun in eieio-tests.el
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Prefer
declare-function to defun.
2021-12-20 18:34:42 +01:00