1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 07:11:34 -08:00
No description
Find a file
Paul Eggert b01ac672be Revamp quitting and fix infloops
This fixes some infinite loops that cannot be quitted out of,
e.g., (defun foo () (nth most-positive-fixnum '#1=(1 . #1#)))
when byte-compiled and when run under X.  See:
http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00577.html
This also attempts to keep the performance improvements I recently
added, as much as possible under the constraint that the infloops
must be caught.  In some cases this fixes infloop bugs recently
introduced when I removed immediate_quit.
* src/alloc.c (Fmake_list):
Use rarely_quit, not maybe_quit, for speed in the usual case.
* src/bytecode.c (exec_byte_code):
* src/editfns.c (Fcompare_buffer_substrings):
* src/fns.c (Fnthcdr):
* src/syntax.c (scan_words, skip_chars, skip_syntaxes)
(Fbackward_prefix_chars):
Use rarely_quit so that users can C-g out of long loops.
* src/callproc.c (call_process_cleanup, call_process):
* src/fileio.c (read_non_regular, Finsert_file_contents):
* src/indent.c (compute_motion):
* src/syntax.c (scan_words, Fforward_comment):
Remove now-unnecessary maybe_quit calls.
* src/callproc.c (call_process):
* src/doc.c (get_doc_string, Fsnarf_documentation):
* src/fileio.c (Fcopy_file, read_non_regular, Finsert_file_contents):
* src/lread.c (safe_to_load_version):
* src/sysdep.c (system_process_attributes) [GNU_LINUX]:
Use emacs_read_quit instead of emacs_read in places where
C-g handling is safe.
* src/eval.c (maybe_quit): Move comment here from lisp.h.
* src/fileio.c (Fcopy_file, e_write):
Use emacs_write_quit instead of emacs_write_sig in places where
C-g handling is safe.
* src/filelock.c (create_lock_file): Use emacs_write, not
plain write, as emacs_write no longer has a problem.
(read_lock_data): Use emacs_read, not read, as emacs_read
no longer has a problem.
* src/fns.c (rarely_quit): Move to lisp.h and rename to
incr_rarely_quit.  All uses changed..
* src/fns.c (Fmemq, Fmemql, Fassq, Frassq, Fplist_put, Fplist_member):
* src/indent.c (compute_motion):
* src/syntax.c (find_defun_start, back_comment, forw_comment)
(Fforward_comment, scan_lists, scan_sexps_forward):
Use incr_rarely_quit so that users can C-g out of long loops.
* src/fns.c (Fnconc): Move incr_rarely_quit call to within
inner loop, so that it catches C-g there too.
* src/keyboard.c (tty_read_avail_input): Remove commented-out
and now-obsolete code dealing with interrupts.
* src/lisp.h (rarely_quit, incr_rarely_quit): New functions,
the latter moved here from fns.c and renamed from rarely_quit.
(emacs_read_quit, emacs_write_quit): New decls.
* src/search.c (find_newline, search_buffer, find_newline1):
Add maybe_quit to catch C-g.
* src/sysdep.c (get_child_status): Always invoke maybe_quit
if interruptible, so that the caller need not bother.
(emacs_nointr_read, emacs_read_quit, emacs_write_quit):
New functions.
(emacs_read): Rewrite in terms of emacs_nointr_read.
Do not handle C-g or signals; that is now for emacs_read_quit.
(emacs_full_write): Replace PROCESS_SIGNALS two-way arg
with INTERRUPTIBLE three-way arg.  All uses changed.
2017-02-01 15:23:19 -08:00
admin Remove immediate_quit. 2017-02-01 15:23:19 -08:00
build-aux Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
doc Allow C++ nested brace-list-entries to be better indented. 2017-02-01 20:20:09 +00:00
etc Fix typo in a NEWS entry for CSS mode 2017-01-31 20:10:16 +01:00
leim Update copyright year to 2017 2016-12-31 19:42:26 -08:00
lib Merge from gnulib 2017-01-10 07:49:55 -08:00
lib-src Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
lisp Allow C++ nested brace-list-entries to be better indented. 2017-02-01 20:20:09 +00:00
lwlib Remove @SET_MAKE@ from manually-maintained files 2017-01-07 18:15:37 -08:00
m4 Do not use Gnulib’s m4/wint_t.m4. 2017-01-01 02:35:36 -08:00
modules Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
msdos Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
nextstep Remove @SET_MAKE@ from manually-maintained files 2017-01-07 18:15:37 -08:00
nt Yet another fix for autogen.sh 2017-01-05 21:36:58 +02:00
oldXMenu Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
src Revamp quitting and fix infloops 2017-02-01 15:23:19 -08:00
test * test/lisp/vc/diff-mode-tests.el: Require diff-mode. 2017-02-01 01:20:46 +09:00
.dir-locals.el * .dir-locals.el (c-noise-macro-names): Remove NONVOLATILE. 2016-08-09 11:51:16 -07:00
.gitattributes Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
.gitignore Generate nt/gnulib.mk from lib/gnulib.mk 2017-01-03 17:46:40 +02:00
autogen.sh Restore behavior of ‘./autogen.sh autoconf git’ 2017-01-12 15:08:15 -08:00
BUGS Use C-h r in BUGS 2012-05-21 20:28:12 -07:00
ChangeLog.1 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
ChangeLog.2 Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
ChangeLog.3 Update copyright year to 2017 in master 2017-01-01 01:48:59 -08:00
config.bat Fix copyright years by hand 2017-01-01 04:01:41 +00:00
configure.ac Remove unused configure output variable 2017-01-08 10:19:48 -08:00
CONTRIBUTE Merge from origin/emacs-25 2016-10-10 07:35:32 -07:00
COPYING Restore files that I seem to have mistakenly deleted. 2010-12-03 14:45:09 +00:00
GNUmakefile Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
INSTALL Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
INSTALL.REPO Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
make-dist Generate nt/gnulib.mk from lib/gnulib.mk 2017-01-03 17:46:40 +02:00
Makefile.in Remove unused configure output variable 2017-01-08 10:19:48 -08:00
README Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Copyright (C) 2001-2017 Free Software Foundation, Inc.
See the end of the file for license conditions.


This directory tree holds version 26.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
<http://savannah.gnu.org/mail/?group=emacs>.  For the complete
list of GNU mailing lists, see <http://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 the GNU build tools autoconf and automake, which in turn use
GNU m4 and Perl.  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.
'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.

   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 <http://www.gnu.org/licenses/>.