1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
Commit Graph

1223 Commits

Author SHA1 Message Date
Yuuki Harano
c31d3dacf7 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-11-13 16:25:48 +09:00
Philipp Stephani
a60053f836 Use posix_spawn if possible.
posix_spawn is less error-prone than vfork + execve, and can make
better use of system-specific enhancements like 'clone' on Linux.  Use
it if we don't need to configure a pseudoterminal.

* configure.ac (HAVE_SPAWN_H, HAVE_POSIX_SPAWN)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP)
(HAVE_POSIX_SPAWNATTR_SETFLAGS, HAVE_DECL_POSIX_SPAWN_SETSID): New
configuration variables.
* src/callproc.c (USABLE_POSIX_SPAWN): New configuration macro.
(emacs_posix_spawn_init_actions)
(emacs_posix_spawn_init_attributes, emacs_posix_spawn_init): New
helper functions.
(emacs_spawn): Use posix_spawn if possible.
2021-11-11 22:00:03 +01:00
Yuuki Harano
4dd1f56f29 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk 2021-11-11 00:39:53 +09:00
Po Lu
b21f1cabd8 Revert "Add support for event processing via XInput 2"
This reverts commit 346cfc8124.
2021-11-10 14:04:24 +08:00
oldosfan
346cfc8124 Add support for event processing via XInput 2
* configure.ac: Add an option to use XInput 2 if available
* src/Makefile.in (XINPUT_LIBS, XINPUT_CFLAGS): New variables
(EMACS_CFLAGS): Add Xinput CFLAGS
(LIBES): Add XInput libs
* src/xmenu.c (popup_activated_flag): Expose flag if XInput 2 is
available
* src/xfns.c (x_window): Set XInput 2 event mask
* src/xterm.c (x_detect_focus_change): Handle XInput 2 GenericEvents
(handle_one_xevent): Handle XInput 2 events
(x_term_init): Ask the server for XInput 2 support and set xkb_desc if
available
(x_delete_terminal): Free XKB kb desc if it exists, and free XI2
devices if they exist
(x_free_xi_devices, x_init_master_valuators): New functions
(x_get_scroll_valuator_delta): New function
(init_xterm): Don't tell GTK to only use Core Input when built with
XInput 2 support
* src/xterm.h (struct x_display_info): Add fields for XKB and XI2
support
* src/gtkutil.c (xg_event_is_for_menubar): Handle XIDeviceEvents
(xg_is_menu_window): New function
(xg_event_is_for_scrollbar): Handle XIDeviceEvents
2021-11-10 13:27:01 +08:00
Ken Brown
c86a3029ec Merge from origin/emacs-28
6ba4e3b78c Drop support for native compilation on 32-bit Cygwin
7e15ee5bc9 ; * doc/emacs/help.texi (Help Mode): Improve indexing.
2021-10-31 19:36:04 -04:00
Ken Brown
6ba4e3b78c Drop support for native compilation on 32-bit Cygwin
* configure.ac (cygwin32-native-compilation): New option.
[i686-pc-cygwin]: Don't allow native compilation unless that
option is specified.  (Bug#50666)
2021-10-31 19:30:25 -04:00
Eli Zaretskii
2bffa0189d 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.
2021-10-22 15:41:00 +03:00
Stefan Kangas
bc2a5c1127 Add WebP image format support (Bug#51296)
* configure.ac (--with-webp): New option.
(HAVE_WEBP): New variable.
(emacs_config_features): Add webp.
* src/image.c (enum webp_keyword_index) [HAVE_WEBP]: New enum.
(webp_format) [HAVE_WEBP]: New variable.
(webp_image_p, init_webp_functions, webp_load) [HAVE_WEBP]: New
functions for WebP support.
(image_types) [HAVE_WEBP]: Define WebP format.
(syms_of_image) <Qwebp> [HAVE_WEBP]: New DEFSYM.  Add image type Qwebp.
* src/Makefile.in (LIBIMAGE): Add WEBP_LIBS.

* lisp/files.el (auto-mode-alist):
* lisp/image-file.el (image-file-name-extensions):
* lisp/image.el (image-type-header-regexps)
(image-type-file-name-regexps, image-type-auto-detectable): Add WebP
support.
* lisp/term/w32-win.el (dynamic-library-alist): Add the libwebp DLL.

* INSTALL:
* admin/CPP-DEFINES:
* doc/lispref/display.texi (Image Formats, Other Image Types):
* nt/INSTALL: Document WebP support.

* test/lisp/image-tests.el (image-find-image)
(image-type-from-file-name): Expand tests.
* test/src/image-tests.el (image-tests--files): Add WebP.
(image-tests-image-size/webp, image-tests-image-mask-p/webp)
(image-tests-image-metadata/webp): New tests.
* test/data/image/black.webp: New file.
2021-10-22 10:59:01 +02:00
Paul Eggert
33525102e7 Pacify GCC -Wanalyzer-possible-null-dereference
This fixes the only remaining GCC diagnostics when emacs-28 is
configured with --enable-gcc-warnings.  It does so by adding
ATTRIBUTE_RETURNS_NONNULL so that GCC knows certain functions
return nonnull.  It also arranges for three of those functions to
always return nonnull; I thought these functions already were
doing so, but apparently not, and it is conceivable (though I
haven’t checked this) that changing these functions to always
return nonnull even on non-GNU platforms may fix unlikely
portability bugs elsewhere in Emacs.  I used GCC 11.2.1 20210728
(Red Hat 11.2.1-1) on x86-64 when checking the diagnostics.
* configure.ac: Invoke gl_EEMALLOC before gl_INIT, in case
the regex code doesn't invoke gl_EEMALLOC; needed for src/alloc.c’s
use of MALLOC_0_IS_NONNULL.
* src/alloc.c (xmalloc, xzalloc, xrealloc): Don’t worry about the
special case where SIZE == 0, since lmalloc and lrealloc now
return null only on allocation failure.
(lmalloc, lrealloc): Return null only on allocation failure,
instead of having special cases that treat malloc (0) and
realloc (X, 0) as successes even when they return null.
* src/lisp.h: Add ATTRIBUTE_RETURNS_NONNULL to a few functions
that always return nonnull pointers, so that gcc -fanalyzer
does not issue diagnostics like “alloc.c: In function
‘allocate_vector_block’: alloc.c:2985:15: warning: dereference of
possibly-NULL ‘block’ [CWE-690] [-Wanalyzer-possible-null-dereference]”
as per <https://cwe.mitre.org/data/definitions/690.html>.
2021-10-13 11:47:20 -07:00
Glenn Morris
1b11fcae92 Merge from origin/emacs-28
1ccd3eb721 (origin/emacs-28) ; Fix typo in etc/NEWS
0f28ee94ac * NEWS: Mention rcirc connects to #emacs by default
aacafbe267 Refactor mh-utils-tests macro 'with-mh-test-env'
ead5c5cc51 Avoid using variable before it has been initialized
b2c50d7cf3 Clarify docstring of blink-matching-paren
d2a34cabcf ; Very minor touch-up to a recent change
36a7ce4393 ; * doc/emacs/trouble.texi (After a Crash): Fix typo.
1cd1b2835b * doc/misc/gnus.texi (Loose Threads): Use regexp-opt in ex...
9f041cdfac Bump project.el version
ad2287e659 Retain compatibility with older project.el projects
d86b2e59c7 native-comp-available-p is the definitive test
1b383ac424 Minor fix of a recently installed documentation change
4d76765b6c Fix md5 issue in recent Gnulib merge
18308b739a Tweak recent 'configure' fix

# Conflicts:
#	etc/NEWS
2021-10-06 07:50:33 -07:00
Paul Eggert
18308b739a Tweak recent 'configure' fix
* configure.ac (gt_TYPE_WINT_T): Omit obsolete and
now-overridden definition.
2021-10-05 09:09:22 -07:00
Glenn Morris
2dc88a27a4 Merge from origin/emacs-28
63abe976ce (origin/emacs-28) Document minibuffer-default-prompt-forma...
b5afbedc90 Backward compatibility option for 'nobreak-char-display'
ea1b728a06 ; * lisp/dired.el: Fix typo.
984eafeb98 Unbreak the build after Gnulib update
5946370cd1 Check, whether an FUSE mount has been broken in Tramp
90575a6c0c Disable 'nobreak-char-display' in Eldoc buffers
570e2c9a17 Fix small error in comint-send-input
fd7bb31412 Update documentation of search-whitespace-regexp
1f4ced47a1 Fix cc-compat.el syntax error
b431f54c1b Mention `seq-uniq' in `delete-dups' documentation
0a7bab689c ; Minor stylistic fixes found by checkdoc
e2861e2d08 ; * etc/NEWS: Fix typo.
1a65d49931 Port recent Gnulib changes to MS-Windows
68a256c892 Update from Gnulib
63cb65dcce * Fix mh tests for native comp builds (bug#50975)
e606cc6f40 * Fix `batch-native-compile' not to spawn a subprocess
894dfe70da Fix native-compilation build from tarball on Cygwin
2ce5e08058 Remove U+FE0F from script-representative-chars

# Conflicts:
#	etc/NEWS
2021-10-05 07:50:22 -07:00
Eli Zaretskii
984eafeb98 Unbreak the build after Gnulib update
* lib/gnulib.mk.in (GNULIBHEADERS_OVERRIDE_WINT_T): Rename from
GNULIB_OVERRIDES_WINT_T.
* configure.ac (GNULIBHEADERS_OVERRIDE_WINT_T): Define.
(Bug#50985)
2021-10-05 15:55:18 +03:00
Eli Zaretskii
44c13eefe8 Update emacs-module sources for Emacs 29
* configure.ac (module_env_snippet_29): New.

* src/module-env-28.h: Remove the comment with instructions for
the next release.
* src/module-env-29.h: New file.
2021-09-30 20:26:00 +03:00
Eli Zaretskii
3478e64c88 Bump Emacs version to 29.0.50
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp:
* src/msdos.c (internal_terminal_init):
* etc/refcards/ru-refcard.tex:
* etc/NEWS: Bump Emacs version to 29.0.50.
* etc/NEWS.28: New file.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Update the reference version of Emacs.
2021-09-30 20:11:43 +03:00
Eli Zaretskii
2750d97543 Cut the emacs-28 release branch
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 28.0.60.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Update the last released version of Emacs.
2021-09-30 20:05:09 +03:00
Dan Ports
5444f607a6 Use the newest gcc installed by Macports
* configure.ac: There may be more than one gcc version installed
in Macports (bug#50649).  Use the newest.

Copyright-paperwork-exempt: yes
2021-09-18 16:04:38 +02:00
Alan Third
443d37ff21 Fix libgccjit detection on macOS
* configure.ac: Combine the Homebrew and MacPorts detection so they
will not create nonsense flags if both are installed.
2021-09-14 10:08:11 +01:00
Stefan Kangas
0cabf8bc36 ; Fix typos 2021-09-03 13:05:32 +02:00
Lars Ingebrigtsen
31226b0341 Only look for the port command on MacOS
* configure.ac: Only look for the port command on MacOS (bug#50259).
2021-08-30 01:20:30 +02:00
Clément Pit-Claudel
9117a76b53 Change --with-nativecomp to --with-native-compilation in messages
* configure.ac:
* test/infra/Dockerfile.emba:
* test/infra/gitlab-ci.yml: Fix mentions of --with-nativecomp
(bug#50255).
2021-08-29 21:32:01 +02:00
Alan Third
5eab7c3f70 * configure.ac: Make homebrew check for libgccjit match macports. 2021-08-21 13:12:56 +01:00
Yuuki Harano
299cfb413f * configure.ac: Add a notice to --with-pgtk 2021-08-15 17:15:54 +09:00
Yuuki Harano
c76d5ff243 * configure.ac: Remove imagemagick special support code for pgtk
When emacs did not support imagemagick 7 and I had imagemagick both 6 and 7,
I wanted to use imagemagick 6.
The code is not needed any more.
2021-08-15 17:07:56 +09:00
Grégoire Jadi
23973a5898 Fix freeze on OpenBSD when reading the SECONDARY selection
* configure.ac (NSIG_MINIMUM): OpenBSD doesn't have a broken SIGIO
any more (bug#29170).  Backport fix from the current OpenBSD port
tree.
2021-08-09 14:25:36 +02:00
Lars Ingebrigtsen
8ce7a697ca Allow building on MacOS with MacPorts and libgccjit
* configure.ac: Check for the "port" command (MacPorts).
Add the required lib/include directories for nativecomp.

* src/Makefile.in (LIBGCCJIT_CFLAGS, LIBGCCJIT_LIBS): Split into
two parts to allow including -L/-I for MacPorts.
(LIBES): Adjust.
(EMACS_CFLAGS): Ditto.
2021-08-07 11:56:44 +02:00
Alan Third
a4d2c88cde Simplify macOS drawing code
Convert EmacsSurface into a CALayer subclass so we can use the
built-in relationships.  Also simplify the macOS versioning code.
This will result in more warnings on older versions of macOS but makes
reading the code easier.

* configure.ac: Add QuartzCore framework.
* src/nsterm.h (NS_DRAW_TO_BUFFER): Remove define and all references.
(EmacsSurface, EmacsLayer): Rename EmacsSurface to EmacsLayer and
modify the definition to fit the new function.
* src/nsterm.m (ns_update_begin):
(ns_update_end):
(ns_focus):
(ns_unfocus): Use the new overridden lockFocus and unlockFocus and
simplify the frame management.
([EmacsView dealloc]):
([EmacsView viewDidResize:]):Don't explicitly release surfaces.
([EmacsView initFrameFromEmacs:]): Move the layer code to after the
NSWindow has been created as creating the layer now relies on some of
it's properties.
([EmacsView makeBackingLayer]): New function.
([EmacsView lockFocus]):
([EmacsView focusOnDrawingBuffer]): Rename to lockFocus.
([EmacsView unlockFocus]):
([EmacsView unfocusDrawingBuffer]): Rename to unlockFocus.
([EmacsView windowDidChangeBackingProperties]): Don't explicitly
release surfaces but reset EmacsLayer properties.
([EmacsView layout]):
([EmacsView viewWillDraw]): Rename to layout.
([EmacsView wantsUpdateLayer]): Remove function and change all callers
to [EmacsView wantsLayer].
(EmacsSurface, EmacsLayer): Rename to EmacsLayer.
([EmacsSurface getSize]):
([EmacsSurface initWithSize:ColorSpace:Scale:]): Remove methods.
([EmacsSurface initWithColorSpace:]):
([EmacsLayer checkDimensions]):
([EmacsLayer releaseSurfaces]):
([EmacsLayer display]): New functions.
* src/nsterm.m ([EmacsLayer dealloc]): Use releaseSurfaces.
([EmacsSurface getContext]): Automatically detect frame property
changes and clear the cache if required.  Use built-in CALayer
properties where available.
([EmacsLayer copyContentsTo:]): Use [CALayer contents] as source.
2021-07-31 11:13:05 +01:00
Yuuki Harano
492a0ae592 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-07-04 22:37:03 +09:00
Alan Third
1b88404acc Fix NS self contained eln location (bug#49271)
* Makefile.in:
* configure.ac: Change eln file install location to
Contents/Frameworks.
* src/comp.c (hash_native_abi): Replace dots with underscores in the
eln install location as the macOS code-signing tool won't sign the
files if the parent directories have dots.
2021-07-01 20:41:58 +01:00
Alan Third
995ab9d0a9 Fix NS native comp search path (bug#49270)
* configure.ac (NS_SELF_CONTAINED): We need to make lispdirrel the
same as lispdir when building a self contained app bundle as they're
both relative paths.
2021-07-01 20:41:57 +01:00
Alan Third
ecf7e8b20e Fix NS self-contained build configuration
* configure.ac: When rebuilding epaths.h for NS check that we're
actually doing an NS build first.
2021-06-26 12:48:15 +01:00
Alan Third
5dd2d50f3d Fix NS native compilation builds
* Makefile.in (ns_applibexecdir):
(ns_applibdir):
(ns_appdir): New variables.
(.PHONY): Include new rule.
(epaths-force-ns-self-contained): Remove the app bundle directory from
all paths.
* configure.ac (NS_SELF_CONTAINED): Set the default site-lisp
directory instead of hard-coding it in the ObjC code, and use the new
epaths generating make rule.
* src/callproc.c (init_callproc_1):
(init_callproc): Remove all the NS specific code as the special cases
are now handled by decode_env_path.
* src/emacs.c (load_pdump):
(decode_env_path): Use ns_relocate to find the correct directory after
relocation.
* src/lread.c (load_path_default): Remove all the NS specific code as
the special cases are now handled by decode_env_path.
* src/nsterm.h: Update function definitions.
* src/nsterm.m (ns_etc_directory):
(ns_exec_path):
(ns_load_path): Remove functions that are no longer needed.
(ns_relocate): New function to calculate paths within the NS app
bundle.
* nextstep/Makefile.in (ns_applibexecdir): New variable, and update
anything relying on the libexec location.
2021-06-26 10:34:59 +01:00
Peter Oliver
57ec4aadc6 Advertise support for Startup Notification when built with GTK
* etc/emacsclient.desktop, etc/emacsclient.desktop: Specify
StartupNotify=true.
* configure.ac (USE_STARTUP_NOTIFICATION): New variable, yes iff
HAVE_GTK.
* Makefile.in (install-etc): Remove StartupNotify=true from
etc/*.desktop unless USE_STARTUP_NOTIFICATION (bug#48783).
2021-06-22 15:17:28 +02:00
Yuuki Harano
7d5e94bada Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-06-13 17:34:06 +09:00
Eli Zaretskii
3272cfa8d4 ; Fix last change. 2021-06-03 10:49:09 +03:00
Eli Zaretskii
ed19ffc346 * configure.ac: Clarify "smoke test" error message. (Bug#48804) 2021-06-03 10:46:54 +03:00
Eli Zaretskii
6a152f898d * configure.ac: Improve error messages about libgccjit. 2021-06-03 09:55:00 +03:00
Yuuki Harano
67ae4b6271 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-05-29 18:00:13 +09:00
Eli Zaretskii
b2eed2ae56 Clean up the fix for unexec build on GNU/Linux
* src/conf_post.h [HYBRID_MALLOC || DARWIN_OS && HAVE_UNEXEC]:
Include <stdlib.h> here, before redirecting 'malloc' and friends
to their hybrid_* and unexec_* equivalents.  #undef malloc and
friends before redefining.  Provide prototypes for the
replacements.  Suggested by Paul Eggert <eggert@cs.ucla.edu>.
* src/gmalloc.c [HYBRID_MALLOC]: Remove declarations of 'malloc'
and friends, as they are now redundant: we include <stdlib.h> in
conf_post.h before redefining 'malloc' etc., and that provides
prototypes from system headers.

* configure.ac (HYBRID_MALLOC): Remove kludge to avoid replacement
of 'free' by Gnulib.  (Bug#36649)
2021-05-20 11:26:00 +03:00
Eli Zaretskii
5e1a8d5654 Fix the unexec build on GNU/Linux
The unexec build on GNU/Linux must use HYBRID_MALLOC (gmalloc.c) and
sheap.c.  This was inadvertently disabled because a configure-time
test for 'sbrk' was moved as side effect of an unrelated change.

* configure.ac: Test for 'sbrk' before using the result in the
decision about SYSTEM_MALLOC and HYBRID_MALLOC.
(HYBRID_MALLOC): Prevent Gnulib from redirecting 'free' to its
replacement 'rpl_free'.

* lib/Makefile.in (not_emacs_OBJECTS): Add mallooc/%.o and free.o.
2021-05-19 17:42:50 +03:00
Yuuki Harano
66a36f1e5a Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-04-27 21:12:21 +09:00
Andrea Corallo
289000eee7 Merge branch 'feature/native-comp' into into trunk 2021-04-25 20:06:22 +02:00
Yuuki Harano
b302a551ab Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-04-25 15:30:05 +09:00
Eli Zaretskii
9904aaebf7 ; * configure.ac (LD_SWITCH_SYSTEM_TEMACS) [mingw32]: Fix last change. 2021-04-22 22:11:08 +03:00
Eli Zaretskii
61828e55a8 Fix MS-Windows link switches for unexec
* configure.ac (LD_SWITCH_SYSTEM_TEMACS) [mingw32]: Disable ASLR
when linking for unexec.  Reported by Nikolay Kudryavtsev
<nikolay.kudryavtsev@gmail.com>.
2021-04-22 20:23:23 +03:00
Yuuki Harano
de46c7796e Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-04-18 15:30:29 +09:00
Andrea Corallo
686259e65a * configure.ac: Revert prev commit and fix native-comp NetBSD build. 2021-04-14 23:58:54 +02:00
Andrea Corallo
bfaa6df492 * configure.ac: Fix native-comp FreeBSD build. 2021-04-14 20:03:17 +02:00
Andrea Corallo
b064ddd3f6 Merge remote-tracking branch 'savannah/master' into native-comp 2021-04-13 12:06:23 +02:00