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%
|
Divya Ranjan
751e7c1a03
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. |
||
|---|---|---|
| admin | Merge from origin/emacs-31 | |
| build-aux | Update from Gnulib by running admin/merge-gnulib | |
| cross | ; Add 2026 to copyright years. | |
| doc | New image type canvas | |
| etc | New image type canvas | |
| exec | Bump Emacs version to 31.0.90 | |
| java | ; * java/org/gnu/emacs/EmacsFillPolygon.java: Remove deprecation directive. | |
| leim | ; Add 2026 to copyright years. | |
| lib | Also copy lib/mini-gmp-gnulib.c from Gnulib | |
| lib-src | Ignore SO_RCVTIMEO errors in emacsclient | |
| lisp | Merge from origin/emacs-31 | |
| lwlib | ARRAYELTS → countof | |
| m4 | ; * m4/texinfo.m4 (gl_SET_MAKEINFO): Fix introductory comment. | |
| modules | ; Add 2026 to copyright years. | |
| msdos | Bump Emacs version to 31.0.90 | |
| nextstep | Disable one-time-code AutoFill heuristics in Emacs.app | |
| nt | Bump Emacs version to 31.0.90 | |
| oldXMenu | ; Add 2026 to copyright years. | |
| src | New image type canvas | |
| test | New image type canvas | |
| .clang-format | ; Configure ObjC for clang-format | |
| .clangd | Tweak .clangd to work with gcc-compiled Emacs (bug#78367) | |
| .dir-locals.el |
Don't load diff-mode so eagerly (bug#81222)
|
|
| .gitattributes | Merge branch 'main' into icalendar | |
| .gitignore | ; Add 2026 to copyright years. | |
| .gitlab-ci.yml | ; Add 2026 to copyright years. | |
| .mailmap | ; * .mailmap: Add email alias | |
| autogen.sh | ; Add 2026 to copyright years. | |
| BUGS | * BUGS: Minor copy edit. | |
| ChangeLog.1 | ; Add 2026 to copyright years. | |
| ChangeLog.2 | ; Add 2026 to copyright years. | |
| ChangeLog.3 | ; Update exported ChangeLog files and etc/AUTHORS | |
| ChangeLog.4 | ; Spelling fixes. | |
| ChangeLog.5 | Mark ChangeLog entry as tiny change | |
| ChangeLog.android | ; Add 2026 to copyright years. | |
| config.bat | Fix the MSDOS build | |
| configure.ac | Update to Android 17 | |
| CONTRIBUTE | ; Add 2026 to copyright years. | |
| COPYING | Merge from Gnulib | |
| GNUmakefile | ; Add 2026 to copyright years. | |
| INSTALL | ; Add 2026 to copyright years. | |
| INSTALL.REPO | ; Add 2026 to copyright years. | |
| make-dist | ; Avoid rebuilding Emacs Lisp Intro when building release tarball | |
| Makefile.in | Merge from origin/emacs-31 | |
| README | Bump Emacs version to 31.0.90 | |
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/>.