4
4
Fork
You've already forked emacs
0
GNU Emacs, the extensible, customizable, self-documenting real-time display editor, with the canvas patch set. See: https://lists.gnu.org/archive/html/bug-gnu-emacs/2026-01/msg01995.html
  • Emacs Lisp 73%
  • C 21.3%
  • M4 1%
  • Objective-C 0.9%
  • C++ 0.6%
  • Other 2.2%
Find a file
Divya Ranjan 751e7c1a03
New image type canvas
Co-Authored-By: Daniel Mendler <mail@daniel-mendler.de>
See bug#80281.
Canvas changes:
* doc/lispref/display.texi (Images): Add Canvas Images to menu.
(Canvas Images): New node documenting canvas image objects, the
`:data-width', `:data-height', `:data' and `:file' properties, and
`canvas-refresh'.
* doc/lispref/elisp.texi (Top): Reference new Canvas Images node.
* doc/lispref/internals.texi (Writing Dynamic Modules): Add Module
Canvas API to menu.
(Module Canvas API): New node documenting `canvas_data' module function.
* etc/NEWS: Announce the addition.
* src/dispextern.h (struct image): Add `refresh' field.
(redraw_image_glyphs, canvas_data): New prototypes.
* src/emacs-module.c (module_canvas_data): New function.
(initialize_environment): Register `canvas_data' module function.
* src/image.c (struct canvas): New struct for canvas.
(canvas_prepare_for_display, canvas_free_unused): New forward
declarations.
(prepare_image_for_display): Call `canvas_prepare_for_display' when
the canvas refresh counter has changed.
(filter_image_spec): Exclude `:data' from the image cache key for
canvas images, so mutating the data vector in place does not create
a new cache entry.
(Fclear_image_cache): Call `canvas_free_unused'.
(image_set_transform): Use CAIRO_FILTER_GOOD instead of
CAIRO_FILTER_BEST for canvas images, for performance.
(canvas_image_p, canvas_free_unused, canvas_apply_data, canvas_get)
(canvas_load, canvas_prepare_for_display, canvas_data): New
functions implementing canvas creation, resizing, and reloading of
`:data' or `:file' content.
(Fcanvas_refresh): New defun `canvas-refresh', with an optional
RELOAD-DATA argument to reread `:data' or `:file'.
(initialize_image_type, syms_of_image): Register the `canvas' image
type and `canvas-refresh'.
* src/module-env-32.h (canvas_data): New prototype.
* src/nsimage.m (ns_image_reset): New function to recreate an NS pixmap
to update the canvas.
* src/nsterm.h: Add prototype for `ns_image_reset'.
* src/xdisp.c (redraw_image_glyphs_window)
(redraw_image_glyphs_window_tree, redraw_image_glyphs): New
functions to redraw only the glyphs referencing a given canvas image
spec, falling back to a full frame redraw if the frame is garbaged.
* test/src/emacs-module-resources/mod-test.c (mod-test-canvas-read)
(mod-test-canvas-write, mod-test-canvas-invalid): New helper functions.
* test/src/emacs-module-tests.el (test-canvas-gen-file)
(mod-test-canvas/valid) (mod-test-canvas/invalid, mod-test-canvas/vector)
(mod-test-canvas/vector-reload, mod-test-canvas/unibyte)
(mod-test-canvas/file, mod-test-canvas/gc-stress): New tests.
2026年07月09日 05:31:32 +00:00
admin Merge from origin/emacs-31 2026年07月07日 16:01:01 +01:00
build-aux Update from Gnulib by running admin/merge-gnulib 2026年05月26日 21:57:20 -07:00
cross ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
doc New image type canvas 2026年07月09日 05:31:32 +00:00
etc New image type canvas 2026年07月09日 05:31:32 +00:00
exec Bump Emacs version to 31.0.90 2026年06月05日 10:42:43 +01:00
java ; * java/org/gnu/emacs/EmacsFillPolygon.java: Remove deprecation directive. 2026年07月03日 14:01:35 +08:00
leim ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
lib Also copy lib/mini-gmp-gnulib.c from Gnulib 2026年05月26日 22:21:08 -07:00
lib-src Ignore SO_RCVTIMEO errors in emacsclient 2026年05月31日 12:48:42 -07:00
lisp Merge from origin/emacs-31 2026年07月07日 16:01:01 +01:00
lwlib ARRAYELTS → countof 2026年05月26日 21:57:20 -07:00
m4 ; * m4/texinfo.m4 (gl_SET_MAKEINFO): Fix introductory comment. 2026年05月31日 14:22:33 +02:00
modules ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
msdos Bump Emacs version to 31.0.90 2026年06月05日 10:42:43 +01:00
nextstep Disable one-time-code AutoFill heuristics in Emacs.app 2026年06月11日 12:17:22 +01:00
nt Bump Emacs version to 31.0.90 2026年06月05日 10:42:43 +01:00
oldXMenu ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
src New image type canvas 2026年07月09日 05:31:32 +00:00
test New image type canvas 2026年07月09日 05:31:32 +00:00
.clang-format ; Configure ObjC for clang-format 2023年10月06日 16:52:19 +02:00
.clangd Tweak .clangd to work with gcc-compiled Emacs (bug#78367) 2025年05月11日 11:14:32 +01:00
.dir-locals.el Don't load diff-mode so eagerly (bug#81222) 2026年06月13日 13:22:49 -04:00
.gitattributes Merge branch 'main' into icalendar 2026年02月08日 16:05:31 -05:00
.gitignore ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
.gitlab-ci.yml ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
.mailmap ; * .mailmap: Add email alias 2026年01月18日 21:59:38 +01:00
autogen.sh ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
BUGS * BUGS: Minor copy edit. 2024年09月21日 13:29:36 +02:00
ChangeLog.1 ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
ChangeLog.2 ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
ChangeLog.3 ; Update exported ChangeLog files and etc/AUTHORS 2026年05月07日 20:08:43 +01:00
ChangeLog.4 ; Spelling fixes. 2026年04月29日 22:45:51 -07:00
ChangeLog.5 Mark ChangeLog entry as tiny change 2026年06月24日 11:35:54 +02:00
ChangeLog.android ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
config.bat Fix the MSDOS build 2026年05月28日 12:59:55 +08:00
configure.ac Update to Android 17 2026年07月02日 20:08:35 +08:00
CONTRIBUTE ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
COPYING Merge from Gnulib 2017年10月01日 18:31:10 -07:00
GNUmakefile ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
INSTALL ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
INSTALL.REPO ; Add 2026 to copyright years. 2026年01月01日 12:54:34 +00:00
make-dist ; Avoid rebuilding Emacs Lisp Intro when building release tarball 2026年06月05日 14:42:58 +03:00
Makefile.in Merge from origin/emacs-31 2026年06月11日 16:12:15 +01:00
README Bump Emacs version to 31.0.90 2026年06月05日 10:42:43 +01:00

Copyright (C) 2001-2026 Free Software Foundation, Inc.
See the end of the file for license conditions.
This directory tree holds version 32.0.50 of GNU Emacs, the extensible,
customizable, self-documenting real-time display editor.
The file INSTALL in this directory says how to build and install GNU
Emacs on various systems, once you have unpacked or checked out the
entire Emacs file tree.
See the file etc/NEWS for information on new features and other
user-visible changes in recent versions of Emacs.
The file etc/PROBLEMS contains information on many common problems that
occur in building, installing and running Emacs.
The file CONTRIBUTE contains information on contributing to Emacs as a
developer.
You may encounter bugs in this release. If you do, please report
them; your bug reports are valuable contributions to the FSF, since
they allow us to notice and fix problems on machines we don't have, or
in code we don't use often. Please send bug reports to the mailing
list bug-gnu-emacs@gnu.org. If possible, use M-x report-emacs-bug.
See the "Bugs" section of the Emacs manual for more information on how
to report bugs. (The file 'BUGS' in this directory explains how you
can find and read that section using the Info files that come with
Emacs.) For a list of mailing lists related to Emacs, see
<https://savannah.gnu.org/mail/?group=emacs>. For the complete
list of GNU mailing lists, see <https://lists.gnu.org/>.
The 'etc' subdirectory contains several other files, named in capital
letters, which you might consider looking at when installing GNU
Emacs.
The file 'configure' is a shell script to acclimate Emacs to the
oddities of your processor and operating system. It creates the file
'Makefile' (a script for the 'make' program), which automates the
process of building and installing Emacs. See INSTALL for more
detailed information.
The file 'configure.ac' is the input used by the autoconf program to
construct the 'configure' script.
The shell script 'autogen.sh' generates 'configure' and other files by
running Autoconf (which in turn uses GNU m4), and configures files in
the .git subdirectory if you are using Git. If you want to use it,
you will need to install recent versions of these build tools. This
should be needed only if you edit files like 'configure.ac' that
specify Emacs's autobuild procedure.
The file 'Makefile.in' is a template used by 'configure' to create
'Makefile'.
The file 'make-dist' is a shell script to build a distribution tar
file from the current Emacs tree, containing only those files
appropriate for distribution. If you make extensive changes to Emacs,
this script will help you distribute your version to others.
There are several subdirectories:
'src' holds the C code for Emacs (the Emacs Lisp interpreter and
 its primitives, the redisplay code, and some basic editing
 functions).
'lisp' holds the Emacs Lisp code for Emacs (most everything else).
'leim' holds the original source files for the generated files
 in lisp/leim. These form the library of Emacs input methods,
 required to type international characters that can't be
 directly produced by your keyboard.
'lib' holds source code for libraries used by Emacs and its utilities
'lib-src' holds the source code for some utility programs for use by or
 with Emacs, like movemail and etags.
'lwlib' holds the sources of the Lucid Widget Library used on X.
'oldXMenu' source files from X11R2 XMenu library, used in non-toolkit builds.
'etc' holds miscellaneous architecture-independent data files Emacs
 uses, like the tutorial text and tool bar images.
 The contents of the 'lisp', 'leim', 'info', and 'doc'
 subdirectories are architecture-independent too.
'info' holds the Info documentation tree for Emacs.
'doc/emacs' holds the source code for the Emacs Manual. If you modify the
 manual sources, you will need the 'makeinfo' program to produce
 an updated manual. 'makeinfo' is part of the GNU Texinfo
 package; you need a suitably recent version of Texinfo.
'doc/lispref' holds the source code for the Emacs Lisp reference manual.
'doc/lispintro' holds the source code for the Introduction to Programming
 in Emacs Lisp manual.
'msdos' holds configuration files for compiling Emacs under MS-DOS.
'nextstep' holds instructions and some other files for compiling the
 Nextstep port of Emacs, for GNUstep and macOS Cocoa.
'nt' holds code and documentation for building Emacs on MS-Windows.
'test' holds tests for various aspects of Emacs's functionality.
'modules' holds the modhelp.py helper script.
'admin' holds files used by Emacs developers, and Unicode data files.
'build-aux' holds auxiliary files used during the build.
'm4' holds Autoconf macros used for generating the configure script.
'java'	 holds the Java code for the Emacs port to Android.
'cross'	 holds Makefiles and an additional copy of gnulib used to build
	 Emacs for Android devices.
'exec'	 holds the source code to several helper executables used to run
	 user-installed programs on Android.
 Building Emacs on non-Posix platforms requires tools that aren't part
of the standard distribution of the OS. The platform-specific README
files and installation instructions should list the required tools.

NOTE ON COPYRIGHT YEARS
In copyright notices where the copyright holder is the Free Software
Foundation, then where a range of years appears, this is an inclusive
range that applies to every year in the range. For example: 2005-2008
represents the years 2005, 2006, 2007, and 2008.

This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.