| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/w32.c (w32_init_file_name_codepage): New function, resets
file_name_codepage and w32_ansi_code_page to undo the values
recorded during dumping.
(codepage_for_filenames): Fix an embarrassing typo. Ignore the
cached value of file-name encoding if it is nil, i.e. not
initialized yet. Actually cache the last used file-name encoding
to avoid calling APIs when not necessary.
* src/w32.h (w32_init_file_name_codepage): Add prototype.
* src/w32term.c (syms_of_w32term): Set the value of
w32_unicode_filenames according to the OS version. This avoids
resetting it during startup, which then causes temacs to run with
the incorrect value.
* src/emacs.c (main): Call w32_init_file_name_codepage early
during the startup.
* src/fileio.c (Fexpand_file_name) [WINDOWSNT]: Update 'newdir'
after converting $HOME to a UTF-8 string, so that 'newdirlim' is
consistent with it. (Bug#25038)
* lisp/international/mule-cmds.el (set-locale-environment): Set
'default-file-name-coding-system' to the ANSI codepage even in
non-interactive sessions.
* lisp/files.el (directory-abbrev-alist, abbreviated-home-dir):
Doc fix.
(abbreviate-file-name): Decode 'abbreviated-home-dir' if it is a
unibyte string.
* doc/lispref/files.texi (Directory Names): Index
'directory-abbrev-alist'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/lispref/os.texi (Time Calculations): Mention the meaning of
'nil' or a scalar number as the time-value argument. Add a
cross-reference to 'float-time' for computing a time difference as
a scalar number of seconds.
* src/editfns.c (Fformat_time_string, Ftime_less_p)
(Ftime_subtract, Ftime_add, Fdecode_time, Fcurrent_time_string)
(Fcurrent_time_zone): Mention in the doc strings the meaning of
nil argument and the fact that a time value can be a scalar number
of seconds since the epoch.
(Ftime_subtract): Mention 'float-time'.
|
|
|
|
|
|
| |
* src/sysdep.c (init_random): Try /dev/urandom before GnuTLS.
(cherry picked from commit a37eba849eddc41375ad73974f6fcb1258aa8eba)
|
|
|
|
|
|
|
|
| |
Apple changed the spelling of its operating system again, to "macOS",
effective with macOS 10.12 Sierra (2016-09-20). Change Emacs
documentation and comments to match this. Stick with older OS
spellings ("OS X", "Mac OS X") when talking about older releases where
the older names are more correct.
|
|
|
|
|
|
|
| |
Emacs C code assumes C99 features, but has long used traditional
comments /* like this */ instead of C99-style comments // like this.
Stick with traditional comments for now, partly for style, partly as
it may be safer with compilers that are not fully in C99 mode.
|
| |
|
|
|
|
|
| |
* src/search.c (boyer_moore): Mark workarounds for ralloc.c
relocation of buffer text with "#ifdef REL_ALLOC".
|
|
|
|
|
|
|
|
| |
* src/search.c (looking_at_1, fast_looking_at, search_buffer): Prevent
relocation of buffer contents during calls to re_search_2. This ensures
the pointers into buffer text won't be invalidated by
r_alloc_sbrk (called from malloc with configurations where
REL_ALLOC=yes).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fix was not complete, and completing it was proving too complicated.
- Revert "* src/regex.c (re_search_2): Make new code safe for
-Wjump-misses-init."
This reverts commit c2a17924a57483d14692c8913edbe8ad24b5ffbb.
- Revert "Port to GCC 6.2.1 + --enable-gcc-warnings"
This reverts commit f6134bbda259c115c06d4a9a3ab5c39340a15949.
- Revert "Fix handling of allocation in regex matching"
This reverts commit ad66b3fadb7ae22a4cbb82bb1507c39ceadf3897.
- Revert "Fix handling of buffer relocation in regex.c functions"
This reverts commit ee04aedc723b035eedaf975422d4eb242894121b.
|
|
|
|
|
| |
* src/search.c (boyer_moore): Update pointers to buffer text
after call to set_search_regs. (Bug#24358)
|
|
|
|
|
|
| |
* src/search.c (Freplace_match): Move the call to BYTE_POS_ADDR
after the call to xpalloc, to avoid the danger of buffer text
relocation after its address was taken. (Bug#24358)
|
|
|
|
|
|
|
|
|
|
|
| |
Bleeding-edge glibc sets emacs_cv_var_doug_lea_malloc to 'no'.
Do not merge to master.
* configure.ac: Check for valloc decl when compiling gmalloc.c.
* src/gmalloc.c (emacs_abort) [emacs]: Adjust decl to match
what is in lisp.h. Remove duplicate decl.
(aligned_alloc): #undef before defining.
(aligned_alloc, memalign) [!MSDOS]: Declare.
(valloc) [HAVE_DECL_VALLOC]: Remove duplicate decl.
|
|
|
|
|
| |
* src/search.c (search_buffer): Updated the base pointer to buffer
text after the call to re_search_2. (Bug#24358)
|
|
|
|
|
| |
* src/xml.c (parse_region) [REL_ALLOC]: Freeze the ralloc arena
while libxml2 reads the current buffer's text. (Bug#24764)
|
|
|
|
|
| |
* src/gmalloc.c [WINDOWSNT]: Remove MS-Windows only inclusion of
w32heap.h, as the MS-Windows build no longer uses gmalloc.c.
|
|
|
|
|
| |
* src/xml.c (parse_region): Add assertion to ensure buffer text is
not relocated while libxml2 is reading it. (Bug#24764)
|
| |
|
| |
|
|
|
|
|
|
|
| |
* src/regex.c (ENSURE_FAIL_STACK, re_search_2):
Redo recent regex changes to avoid complaints from GCC 6.2.1 when
Emacs is configured with --enable-gcc-warnings. Also, work around
GCC bug 78081, which was uncovered by this new code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`re_match_2_internal' uses pointers to the lisp objects that it
searches. Since it may call malloc when growing the "fail stack", these
pointers may be invalidated while searching, resulting in memory
curruption (Bug #24358).
To fix this, we check the pointer that the lisp object (as specified by
re_match_object) points to before and after growing the stack, and
update existing pointers accordingly.
* src/regex.c (STR_BASE_PTR): New macro.
(ENSURE_FAIL_STACK, re_search_2): Use it to convert pointers into
offsets before possible malloc call, and back into pointers again
afterwards.
(POS_AS_IN_BUFFER): Add explanatory comment about punning trick.
* src/search.c (search_buffer): Instead of storing search location as
pointers, store them as pointers and recompute the corresponding address
for each call to `re_search_2'.
(string_match_1, fast_string_match_internal, fast_looking_at):
* src/dired.c (directory_files_internal): Set `re_match_object' to Qnil
after calling `re_search' or `re_match_2'.
* src/regex.h (re_match_object): Mention new usage in commentary.
|
| |
|
|
|
|
|
|
|
| |
* src/editfns.c (format_time_string, Fcurrent_time_zone): Pass a
pointer to time_t value to emacs_localtime_rz and gmtime_r,
instead of relying on struct timespec's tv_sec member to be of
compatible type.
|
|
|
|
|
|
| |
* src/lread.c (read1): Use Fcons for 'placeholder', not AUTO_CONS,
because elements of the list in 'read_objects' cannot be allocated
off the stack. (Bug#24640)
|
|
|
|
|
|
|
| |
See Bug#24673
* src/eval.c (funcall_lambda): Fix crash for bogus functions such
as (closure).
|
| |
|
|
|
|
|
|
|
|
|
| |
Backport from master.
* src/conf_post.h (GNUC_PREREQ): New macro.
* src/keyboard.c: Use it to work around GCC bug 54561.
* src/process.c (would_block): New function.
(server_accept_connection, wait_reading_process_output, send_process):
Use it.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* src/alloc.c (last_marked): Now EXTERNALLY_VISIBLE.
|
|
|
|
|
|
|
|
|
|
| |
* etc/emacs-buffer.gdb <$qnil>: New variable.
(ybuffer-list, yset-buffer): Use $qnil for comparing against
'nil', as direct comparison with Qnil doesn't work in a build with
'--enable-check-lisp-object-type'.
* src/.gdbinit: Adapt commands of the temporary breakpoint in
init_sys_modes to a build with '--enable-check-lisp-object-type'.
|
|
|
|
|
|
| |
* src/alloc.c <last_marked>: No longer 'static', to avoid having
it optimized out in optimized builds, which then makes debugging
GC problems harder.
|
|
|
|
|
|
|
|
|
| |
* src/font.c (syms_of_font) <inhibit-compacting-font-caches>: New
boolean variable.
* src/alloc.c (compact_font_caches): Use it to bypass the call to
compact_font_cache_entry. (Bug#24634) (Bug#24565)
* etc/NEWS: Mention the new variable.
|
|
|
|
|
|
|
|
|
|
| |
* src/fontset.c (syms_of_fontset) <use-default-font-for-symbols>:
New boolean variable.
(face_for_char): Use it to fall back to pre-Emacs 25.1 behavior
when selecting fonts for displaying symbol and punctuation
characters. (Bug#24644)
* etc/NEWS: Mention the new variable.
|
|
|
|
|
|
|
|
|
| |
* src/xdisp.c (forward_to_next_line_start): Don't call
'get_next_display_element' after finding the end of line. This
avoids setting the row's end position to the wrong value when the
next screen line begins with invisible text; that wrong value
caused set_cursor_from_row position the cursor in the wrong screen
line, and eventually triggered bug#24109.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* nt/inc/ms-w32.h (_WIN32_WINNT) [!MINGW_W64]: Undefine before
defining to avoid redefinition warnings.
* nt/inc/sys/stat.h (_SYS_STAT_H, _INC_STAT_H): Define, to avoid
inclusion of sys/stat.h from the system headers, which could then
lead to compilation errors due to redefinition of 'struct stat'
etc. This is needed because latest versions of MinGW runtime
include sys/stat.h from wchar.h.
* src/image.c (__MINGW_MAJOR_VERSION) [WINDOWSNT]: Temporarily
redefine to 4 to avoid conflict between 2 definitions of
MemoryBarrier. (Bug#24613)
Do not merge to master!
|
| |
|
|
|
|
|
|
| |
* src/xdisp.c (display_and_set_cursor): Don't index glyphs of a
glyph row if hpos is out of valid bounds. This avoids crashes in
some rare cases. (Bug#24614)
|
|
|
|
|
|
|
|
|
|
|
| |
* src/callint.c (Fcall_interactively): Bind command-debug-status
to nil. This restores functionality inadvertently removed in
Emacs 25.1. (Bug#24555)
* lisp/subr.el (command-debug-status): Declare obsolete.
* doc/lispref/debugging.texi (Internals of Debugger): Document
that 'command-debug-status' is obsolete.
|
|
|
|
|
| |
* editfns.c (Fcompare_buffer_substrings): Document behavior when
the arguments are nil.
|
|
|
|
|
|
|
|
| |
* src/editfns.c (Fformat): Fix ambiguity in the doc string's usage
of a literal period. (Bug#24407)
This was backported from master
(cherry picked from commit 7123896626b06c26c4e37839ab41e41980c8f433)
|
|
|
|
|
|
|
|
| |
* src/frame.c (candidate_frame): Check minibuf argument before
comparing it to zero (Bug#24281).
This was backported from master
(cherry picked from commit dc491c3df305a73908fe8de20b7c428a5b38c846)
|
|
|
|
|
|
|
|
|
| |
* src/eval.c (call_debugger): Bind inhibit-changing-match-data to nil so
that debugger code that needs to do regexp match won't break
(Bug #23949, Bug #24166, Bug#16294).
This was backported from master
(cherry picked from commit 7fb75680b38fe0805c2ff7e9cca3bec8121ba984)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/xdisp.c (move_it_in_display_line_to): Don't assume we can
wrap on a whitespace character if it's followed by another
whitespace character. When returning under WORD_WRAP for a screen
line that is continued, restore to wrap point when atpos/atx
position would be displayed on the next screen line due to
line-wrap. (Bug#23570)
This is backported from master
(cherry picked from commit 99848b37d2c3e14c0af45fc6da437a806aa58a80)
|
|
|
|
|
|
|
| |
* src/character.h (STRING_CHAR):
* src/buffer.h (FETCH_MULTIBYTE_CHAR): Update commentary: these
two macros no longer do any character unification, so the caveats
in those comments are no longer pertinent.
|
|
|
|
|
|
| |
* src/window.h (WINDOW_MODE_LINE_HEIGHT, WINDOW_HEADER_LINE_HEIGHT): Fix
confusing claim that "height is in pixels and in lines"; in fact it's in
pixels.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/lispref/processes.texi (Subprocess Creation, Shell Arguments):
Mention 'make-process' rather than 'start-process'. Update wrt
standard destinations of standard output/error streams and due to
different formats of arguments accepted by 'make-process'.
(Processes): Mention process objects that represent connections.
(Synchronous Processes): Minor clarifications.
(Asynchronous Processes): Describe 'make-process' and
'make-pipe-process' before 'start-process'. Update and expand the
documentation.
(Deleting Processes, Process Information, Input to Processes)
(Signals to Processes, Query Before Exit, Network): Update and
expand the documentation, especially wrt process objects that
represent connections.
(Output from Processes): Mention the possibility of separating
stderr via 'make-process'.
(Filter Functions): Mention that stderr by default arrives at the
filter function together with stdout. (Bug#24287)
* src/process.c (Fprocess_id, Fprocess_command)
(Fprocess_contact, Fprocess_type, Fstop_process): Doc fixes for
process objects that represent connections.
|
| |
|
|
|
|
|
|
|
|
|
| |
* src/fileio.c (Fwrite_region): Clarify that END is ignored if
START is nil.
* src/editfns.c (Fbuffer_size): Add short discussion about
narrowing.
* src/callproc.c (Fcall_process_region): Discuss behavior when
START and END are not buffer positions.
|
|
|
|
|
|
| |
* src/character.h (BYTES_BY_CHAR_HEAD, MULTIBYTE_LENGTH)
(MULTIBYTE_LENGTH_NO_CHECK, STRING_CHAR_AND_LENGTH): Remove stale
info from commentary and improve it.
|
|
|
|
| |
(Bug#24206)
|