<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src/filelock.c, branch scratch/build-test</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Revamp quitting and fix infloops</title>
<updated>2017-02-01T23:23:19+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2017-02-01T23:18:44+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=b01ac672be1277833964d2d53f6dd26560c70343'/>
<id>b01ac672be1277833964d2d53f6dd26560c70343</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace QUIT with maybe_quit</title>
<updated>2017-01-26T05:25:37+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2017-01-26T05:13:19+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=b3a3ed526d2c490c9c5605707f0cd7bff3c88693'/>
<id>b3a3ed526d2c490c9c5605707f0cd7bff3c88693</id>
<content type='text'>
There’s no longer need to have QUIT stand for a slug of C statements.
Use the more-obvious function-call syntax instead.
Also, use true and false when setting immediate_quit.
These changes should not affect the generated machine code.
* src/lisp.h (QUIT): Remove.  All uses replaced by maybe_quit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There’s no longer need to have QUIT stand for a slug of C statements.
Use the more-obvious function-call syntax instead.
Also, use true and false when setting immediate_quit.
These changes should not affect the generated machine code.
* src/lisp.h (QUIT): Remove.  All uses replaced by maybe_quit.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge from origin/emacs-25</title>
<updated>2017-01-01T09:10:47+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2017-01-01T09:10:47+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=bcf244ef9be0fe61f4b9a48d3412b2c8a9f1edb9'/>
<id>bcf244ef9be0fe61f4b9a48d3412b2c8a9f1edb9</id>
<content type='text'>
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year to 2017</title>
<updated>2017-01-01T03:42:26+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2017-01-01T03:14:01+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5badc81c1cdfbb261ad3e6d1b753defb15712f26'/>
<id>5badc81c1cdfbb261ad3e6d1b753defb15712f26</id>
<content type='text'>
Run admin/update-copyright.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Run admin/update-copyright.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge from origin/emacs-25</title>
<updated>2016-10-23T09:43:17+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2016-10-23T09:43:17+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=6129cd03e20a0aaee46ceb742a9ed1ae2904eab3'/>
<id>6129cd03e20a0aaee46ceb742a9ed1ae2904eab3</id>
<content type='text'>
b73f466 * lisp/cus-start.el (exec-path): Handle nil elements.  (Bug#2...
55ebb70 Catch the imenu-unavailable error in sh-mode completion table
993acb5 ; Minor fix for last change in characters.el
30c4bb5 More char-width fixes
4eb4463 Fix char-width-table values for some Emoji
528997d Keep point when switching from and to *terminal* buffer
2130005 * INSTALL: Use correct Emacs release number 25.
10835b1 Avoid crashes due to objects read with the #n=object form
4de671d Improve doc string of 'completion-at-point-functions'
ceb46f0 Fix crash in evaluating functions
d8374c4 * src/filelock.c (current_lock_owner): Update comment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
b73f466 * lisp/cus-start.el (exec-path): Handle nil elements.  (Bug#2...
55ebb70 Catch the imenu-unavailable error in sh-mode completion table
993acb5 ; Minor fix for last change in characters.el
30c4bb5 More char-width fixes
4eb4463 Fix char-width-table values for some Emoji
528997d Keep point when switching from and to *terminal* buffer
2130005 * INSTALL: Use correct Emacs release number 25.
10835b1 Avoid crashes due to objects read with the #n=object form
4de671d Improve doc string of 'completion-at-point-functions'
ceb46f0 Fix crash in evaluating functions
d8374c4 * src/filelock.c (current_lock_owner): Update comment.
</pre>
</div>
</content>
</entry>
<entry>
<title>* src/filelock.c (current_lock_owner): Update comment.</title>
<updated>2016-10-13T00:48:34+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2016-10-13T00:48:04+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=d8374c4e95d6b2a0e839b3b49b12225222e8c721'/>
<id>d8374c4e95d6b2a0e839b3b49b12225222e8c721</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Work around Samba bug with ':' in symlink contents</title>
<updated>2016-10-12T16:19:44+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2016-10-12T16:01:03+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=40c426a150c5d885d8a2509358831c9bb1e1c6ad'/>
<id>40c426a150c5d885d8a2509358831c9bb1e1c6ad</id>
<content type='text'>
* src/filelock.c (current_lock_owner): When reading the contents
of a lock, treat the UTF-8 for U+F022 as if it were ':' (Bug#24656).
Backport from master.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/filelock.c (current_lock_owner): When reading the contents
of a lock, treat the UTF-8 for U+F022 as if it were ':' (Bug#24656).
Backport from master.
</pre>
</div>
</content>
</entry>
<entry>
<title>Work around Samba bug with ':' in symlink contents</title>
<updated>2016-10-11T20:07:19+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2016-10-11T20:06:42+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=1dd54e3eef7543720eff161457677a35fae2435c'/>
<id>1dd54e3eef7543720eff161457677a35fae2435c</id>
<content type='text'>
* src/filelock.c (current_lock_owner): When reading the contents
of a lock, treat the UTF-8 for U+F022 as if it were ':' (Bug#24656).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/filelock.c (current_lock_owner): When reading the contents
of a lock, treat the UTF-8 for U+F022 as if it were ':' (Bug#24656).
</pre>
</div>
</content>
</entry>
<entry>
<title>Limit &lt;config.h&gt;’s includes</title>
<updated>2016-09-30T19:38:52+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2016-09-30T19:14:04+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=f4eb8900295d75c4afec256f75aea22494376fde'/>
<id>f4eb8900295d75c4afec256f75aea22494376fde</id>
<content type='text'>
This follows up on recent problems with the fact that config.h
includes stdlib.h etc.; some files need to include stdlib.h later.
config.h generally should limit itself to includes that are
universally safe; outside of MS-Windows, only stdbool.h makes
the cut among the files currently included.  So, move the
other includes to just the files that need them (Bug#24506).
* configure.ac (config_opsysfile): Remove, as this generic hook
is no longer needed.
* lib-src/etags.c, src/unexmacosx.c, src/w32.c, src/w32notify.c:
* src/w32proc.c (_GNU_SOURCE):
Remove, as it’s OK for config.h to do this now.
* src/conf_post.h: Include &lt;ms-w32.h&gt;, instead of the generic
config_opsysfile, for simplicity as this old way of configuring is
now done only for the MS-Windows port.  Do not include &lt;ms-w32.h&gt;
if DEFER_MS_W32_H, for the benefit of the few files that want its
effects later.  Do not include &lt;alloca.h&gt;, &lt;string.h&gt;, or
&lt;stdlib.h&gt;.  Other files modified to include these headers as
needed, or to not include headers that are no longer needed.
* src/lisp.h: Include &lt;alloca.h&gt; and &lt;string.h&gt; here, since
some of the inline functions need them.
* src/regex.c: Include &lt;alloca.h&gt; if not emacs.  (If emacs,
we can rely on SAFE_ALLOCA.)  There is no longer any need to
worry about HAVE_ALLOCA_H.
* src/unexmacosx.c: Rely on config.h not including stdlib.h.
* src/w32.c, src/w32notify.c, src/w32proc.c (DEFER_MS_W32_H):
Define before including &lt;config.h&gt; first, and include &lt;ms-w32.h&gt;
after the troublesome headers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This follows up on recent problems with the fact that config.h
includes stdlib.h etc.; some files need to include stdlib.h later.
config.h generally should limit itself to includes that are
universally safe; outside of MS-Windows, only stdbool.h makes
the cut among the files currently included.  So, move the
other includes to just the files that need them (Bug#24506).
* configure.ac (config_opsysfile): Remove, as this generic hook
is no longer needed.
* lib-src/etags.c, src/unexmacosx.c, src/w32.c, src/w32notify.c:
* src/w32proc.c (_GNU_SOURCE):
Remove, as it’s OK for config.h to do this now.
* src/conf_post.h: Include &lt;ms-w32.h&gt;, instead of the generic
config_opsysfile, for simplicity as this old way of configuring is
now done only for the MS-Windows port.  Do not include &lt;ms-w32.h&gt;
if DEFER_MS_W32_H, for the benefit of the few files that want its
effects later.  Do not include &lt;alloca.h&gt;, &lt;string.h&gt;, or
&lt;stdlib.h&gt;.  Other files modified to include these headers as
needed, or to not include headers that are no longer needed.
* src/lisp.h: Include &lt;alloca.h&gt; and &lt;string.h&gt; here, since
some of the inline functions need them.
* src/regex.c: Include &lt;alloca.h&gt; if not emacs.  (If emacs,
we can rely on SAFE_ALLOCA.)  There is no longer any need to
worry about HAVE_ALLOCA_H.
* src/unexmacosx.c: Rely on config.h not including stdlib.h.
* src/w32.c, src/w32notify.c, src/w32proc.c (DEFER_MS_W32_H):
Define before including &lt;config.h&gt; first, and include &lt;ms-w32.h&gt;
after the troublesome headers.
</pre>
</div>
</content>
</entry>
<entry>
<title>Check actual contents before promting about changed file</title>
<updated>2016-09-02T15:44:13+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2016-09-02T15:44:13+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5a4bffb6617a274ca19bc7f5c1b1ceb6345651ab'/>
<id>5a4bffb6617a274ca19bc7f5c1b1ceb6345651ab</id>
<content type='text'>
* lisp/userlock.el (userlock--check-content-unchanged)
(userlock--ask-user-about-supersession-threat): New functions.
* src/filelock.c (lock_file): Use them to avoid spurious prompting.
* doc/lispref/buffers.texi (Modification Time): Update doc of
ask-user-about-supersession-threat.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/userlock.el (userlock--check-content-unchanged)
(userlock--ask-user-about-supersession-threat): New functions.
* src/filelock.c (lock_file): Use them to avoid spurious prompting.
* doc/lispref/buffers.texi (Modification Time): Update doc of
ask-user-about-supersession-threat.
</pre>
</div>
</content>
</entry>
</feed>
