1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-05 05:21:26 -08:00
Commit graph

38401 commits

Author SHA1 Message Date
Aurelien Aptel
9d6026d8ec * src/alloc.c: call only non-null finalizers 2016-10-05 10:01:36 +02:00
Eli Zaretskii
01669ad9a6 Avoid crashes when setting the cursor
* 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)
2016-10-04 22:12:08 +03:00
Philippe Vaucher
f2144eef19 Restore 'command-debug-status' functionality
* 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.
2016-10-04 17:34:51 +03:00
Philipp Stephani
74b4f13842 Document nil args of compare-buffer-substrings
* editfns.c (Fcompare_buffer_substrings): Document behavior when
the arguments are nil.
2016-10-03 12:10:41 +02:00
Eli Zaretskii
7cb120ebf3 Improve the doc string of 'format'
* 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 7123896626)
2016-09-23 17:11:54 +03:00
Martin Rudalics
16e62077bb Fix (next-frame nil t) crash (Bug#24281)
* src/frame.c (candidate_frame): Check minibuf argument before
comparing it to zero (Bug#24281).

This was backported from master
(cherry picked from commit dc491c3df3)
2016-09-23 17:05:29 +03:00
Noam Postavsky
3f539c0013 Fix debugging of string-match-p errors
* 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 7fb75680b3)
2016-09-23 17:03:43 +03:00
Eli Zaretskii
df4f812534 Fix 'vertical-motion' and 'posn-at-point' under 'visual-line-mode'
* 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 99848b37d2)
2016-09-23 16:59:17 +03:00
Eli Zaretskii
2b8c5f0bff Update commentary of STRING_CHAR and FETCH_MULTIBYTE_CHAR
* 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.
2016-09-23 10:52:07 +03:00
Noam Postavsky
ea0f750e5c Fix comments on window height macros
* 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.
2016-09-11 16:32:09 -04:00
Eli Zaretskii
88a5052579 Improve and clarify documentation of subprocesses
* 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.
2016-08-24 17:36:28 +03:00
Paul Eggert
73cbb813cf ; ChangeLog spelling fixes 2016-08-21 04:15:44 -07:00
Philipp Stephani
9b99772cf4 Some assorted documentation clarifications
* 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.
2016-08-20 18:25:05 +02:00
Eli Zaretskii
37d4723f73 Improve commentary in src/character.h
* 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.
2016-08-18 17:23:22 +03:00
Eli Zaretskii
7d639f3be6 * src/doc.c (Fsubstitute_command_keys): Another fix for smart quotes.
(Bug#24206)
2016-08-16 21:33:09 +03:00
Eli Zaretskii
4225b78674 Avoid segfaults due to quoting in 'substitute-command-keys'
* src/doc.c (Fsubstitute_command_keys): Correct character counts
when the input string is unibyte.  (Bug#24206)
2016-08-16 17:36:27 +03:00
Noam Postavsky
8d681476bd Document CATEGORY arg to modify-category-entry
* src/category.c (Fmodify_category_entry): Document CATEGORY argument.
2016-08-13 22:56:11 -04:00
Eli Zaretskii
d2db5dd835 Fix bug with handling the bidi cache
* src/xdisp.c (redisplay_window): Save and restore the state of
the bidi cache before reusing the iterator after calls to
try_window and try_window_reusing_current_matrix.
2016-08-11 18:11:26 +03:00
Paul Eggert
d841a03c5e ; Spelling fix 2016-08-03 14:59:28 -07:00
Alan Third
a6ae479216 Post AppDefined events from the main thread ONLY (bug#23934)
* src/nsterm.h: Make nextappdefined var not just GNUStep.
* src/nsterm.c (ns_send_appdefined, sendFromMainThread): Remove GNUStep
2016-08-03 17:19:12 +01:00
Eli Zaretskii
aa4271ab72 Fix doc string of 'minibuffer-message-timeout'
* src/keyboard.c (syms_of_keyboard) <minibuffer-message-timeout>:
Doc fix.  (Bug#24123)
2016-08-01 16:29:20 +03:00
Noam Postavsky
66f95e0dab Adjust match data before calling after-change-funs
It's important to adjust the match data in between calling
before-change-functions and after-change-functions, so that buffer
change hooks will always see match-data consistent with buffer content.
(Bug #23917)

* src/insdel.c (replace_range): Add new parameter ADJUST_MATCH_DATA, if
true call update_search_regs.  Update all callers (except
Freplace_match) to pass 0 for the new parameter.
* src/search.c (update_search_regs): New function, extracted from
Freplace_match.
(Freplace_match): Remove match data adjustment code, pass 1 for
ADJUST_MATCH_DATA to replace_range instead.
2016-07-22 23:55:23 -04:00
Paul Eggert
ff3fc21e24 Port to glibc 2.24 (pre-release) + ppc64
Backport from master (Bug#24033).
Inspired by a suggestion by Florian Weimer in:
https://sourceware.org/ml/libc-alpha/2016-07/msg00425.html
* src/emacs.c (main) [__PPC64__]:
Special case for __PPC64__, which needs ASLR disabled in
dumped Emacs too.
2016-07-21 13:29:17 +02:00
Robert Cochran
9356fe2392 Expand FIXME near definition of fboundp
This expansion of the FIXME is so that future developers are aware of
the potential problems of aliasing fboundp to symbol-function without
taking backwards compatibility into account.

* src/data.c (fboundp): Note potential backwards compatibility issues in
FIXME.

Copyright-paperwork-exempt: yes
2016-07-16 21:33:27 -04:00
Eli Zaretskii
59fa4c39f4 Avoid assertion violations in nhexl-mode
* src/bidi.c (bidi_resolve_neutral): Convert an assertion to real
code executed in all builds.  (Bug#24001)
2016-07-16 16:42:18 +03:00
Fredrik Bergroth
916abe91fd Use memmove instead of memcpy on overlapping regions
* src/editfns.c (Ftranspose_regions): Regions may overlap, so
use memmove instead of memcpy (bug#19213).

Copyright-paperwork-exempt: yes

This is a backport from trunk.
(cherry picked from commit 354f9f0fc6)
2016-07-14 20:33:48 -04:00
Noam Postavsky
9ba51edf62 Document buffer-swap-text+save-excursion interaction
* doc/lispref/buffers.texi (Swapping Text):
* src/buffer.c (Fbuffer_swap_text): Add warning about interaction of
`buffer-swap-text' and `save-excursion' (Bug #4655).
2016-07-14 20:01:39 -04:00
Stephen Berman
069fc05bd5 Improve documentation of search functions
Make the documentation of the search functions more accurate,
complete, and uniform; in particular, extend the description of
the effect when the 'count' parameter is a negative number to all
of these functions.

* src/search.c (Fsearch_backward, Fsearch_forward)
(Fre_search_backward, Fre_search_forward)
(Fposix_search_backward, Fposix_search_forward):
* lisp/isearch.el (word-search-backward, word-search-forward)
(word-search-backward-lax, word-search-forward-lax): Improve doc
strings as described above.

* doc/lispref/searching.texi (String Search, Regexp Search)
(POSIX Regexps): Use 'count' instead of 'repeat' as the name of
the fourth parameter of the *-search-{forward,backward} functions
and improve documentation as described above.
2016-07-12 22:11:22 +02:00
Eli Zaretskii
658daf93e2 Fix 'vertical-motion' in non-interactive sessions
* src/indent.c (Fvertical_motion): Don't return uninitialized
value in non-interactive session.  This fixes random errors in
batch mode, see
http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00609.html
and
http://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00500.html
for the details.
2016-07-10 22:06:57 +03:00
Andreas Schwab
686b520ff9 Fix memory leak in imagemagick-types
* src/image.c (Fimagemagick_types): Use AcquireExceptionInfo to
avoid memory leak.
2016-07-10 20:24:08 +02:00
Eli Zaretskii
03bcf116fb Un-confuse doc string of 'string-collate-equalp'
* src/fns.c (Fstring_collate_equalp): Remove confusing text from
doc string.  (Bug#23902)
2016-07-08 13:05:01 +03:00
Phillip Lord
8f9c1eda93 Fix missing undo-boundary on revert-buffer.
* lisp/simple.el (undo-auto--undoable-change-no-timer): New function.
* src/fileio.c (insert-buffer-contents): Call
  undo-auto--undoably-changed-buffers before changes.

Addresses Bug#23785.

Do not merge to master as c98bc98 also addresses the same bug.
2016-07-06 10:16:10 +01:00
Paul Eggert
a5dcc97bab Fix open-network-stream responsiveness
Problem reported by Christer Ekholm (Bug#23864).
Backport from master.
* src/process.c (wait_reading_process_output):
Fix typo introduced in 2015-07-06T02:19:13Z!eggert@cs.ucla.edu
when wait == INFINITY and got_output_end_time is invalid.
In this case the code should break, not continue.
2016-07-06 01:04:22 +02:00
Phillip Lord
d4c6774f40 Fix missing point information in undo
* src/undo.c (record_insert): Use record_point instead of
  prepare_record, and do so unconditionally.
  (prepare_record): Do not record first change.
  (record_point): Now conditional on state before the last command.
  (record_delete): Call record_point unconditionally.
  (record_property_change): Use prepare_record.
  (record_marker_adjustments): Use prepare_record.

Addresses Bug# 21722
2016-07-05 09:27:59 +01:00
Eli Zaretskii
3a9d6296b3 Avoid crashes when buffer modification hooks clobber match data
* src/search.c (Freplace_match): Error out if buffer modification
hooks triggered by buffer changes in replace_range, upcase-region,
and upcase-initials-region clobber the match data needed to be
adjusted for the replacement.  (Bug#23869)
2016-07-04 18:34:40 +03:00
Eli Zaretskii
21110afa2c Avoid assertion violations when rendering some fonts
* src/dispextern.h (FONT_TOO_HIGH): Don't consider a font "too
high" if its pixel_size value is zero.  This avoids assertion
violations at the end of x_produce_glyphs.
2016-06-29 19:14:58 +03:00
Noam Postavsky
272ddc6793 Fixup warning message regarding HOME a bit more
* src/w32.c (init_environment): The manual section title is "Windows
HOME" (Bug #11612).  Move newline so warning fits in 80 character lines.
2016-06-27 18:37:56 -04:00
Noam Postavsky
c150a6461b ; Fix typo in commit before last 2016-06-27 07:59:04 -04:00
Noam Postavsky
fd9fad062f Give more helpful warning about setting HOME
* src/w32.c (init_environment): Improve warning message that pops when
Emacs sets HOME according to existence of C:\.emacs (Bug #11612).

Co-authored-by: Eli Zaretskii <eliz@gnu.org>
2016-06-26 20:44:23 -04:00
Eli Zaretskii
4395aaacd4 Fix documentation of 'assoc-string' and 'compare-strings'
* src/minibuf.c (Fassoc_string): Clarify how CASE-FOLD affects the
string comparison.  (Bug#23833)
* src/fns.c (Fcompare_strings): Fix the description of how
IGNORE-CASE affects the comparison.

* doc/lispref/strings.texi (Text Comparison): Clarify how
CASE-FOLD affects the string comparison in 'assoc-string'.  Fix
the description of how IGNORE-CASE affects the comparison in
'compare-strings'.
2016-06-23 18:09:14 +03:00
Phillip Lord
829733104d ; Revert "Ensure undo-boundary after insert-file-contents."
This reverts commit 6cdd8f7153.

The original commit did not address the problem it was claiming to.
2016-06-22 09:42:49 +01:00
Phillip Lord
6cdd8f7153 Ensure undo-boundary after insert-file-contents.
* src/fileio.c: Record undoable change during insert-file-contents.

Addresses Bug #23785.
2016-06-21 21:34:08 +01:00
Eli Zaretskii
5f37572321 Fix removal of variables from process-environment
* src/callproc.c (add_env): Fix comparison of a variable with a
value against the same variable without a value.  (Bug#23779)
2016-06-20 17:19:25 +03:00
Noam Postavsky
b49cb0ab9c Fbackward_prefix_chars: stay within buffer bounds
The commit 1fd3172d "(Fbackward_prefix_chars): Set point properly while
scanning" (1998-03-18), moved the check against of the position against the
buffer beginning out the loop condition so that we might end up checking
the syntax of characters before the beginning of the buffer.  This can
cause segfaults or trigger a "Point before start of properties" error in
`update_interval' (called indirectly from `char_quoted').

* src/syntax.c (Fbackward_prefix_chars): Stop the loop when beginning of
buffer is reached (Bug #3552, Bug #17132, Bug #19379).
2016-06-16 23:18:00 -04:00
Paul Eggert
d765175ef1 Fix ifdef-vs-if typo with RANDR13_LIBRARY
* src/xfns.c (x_get_monitor_attributes_xrandr): Use #if, not #ifdef.
This ports to systems that predate xrandr 1.3. See Christian Lynbech in:
http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00198.html

(cherry picked from commit dce99f222f)
2016-06-16 13:31:08 -04:00
Glenn Morris
27dec5264f * src/alloc.c (ALIGN): Avoid error on DragonFly BSD. (Bug#23764) 2016-06-14 13:39:30 -04:00
Stephen Berman
20de6679b0 Doc fixes for grammar and typos (bug#23746)
* doc/emacs/files.texi (Customize Save):
* doc/emacs/frames.texi (Window Dividers):
* doc/emacs/misc.texi (Printing):
* doc/lispref/compile.texi (Compiler Errors):
* doc/lispref/keymaps.texi (Changing Key Bindings):
* doc/lispref/loading.texi (Named Features):
* doc/lispref/markers.texi (Marker Insertion Types):
* doc/lispref/modes.texi (Mode Hooks):
* doc/lispref/text.texi (Undo):
* src/floatfns.c (Fldexp):
* src/xfaces.c (syms_of_xfaces):
Minor doc fixes for grammar and typos (bug#23746).
2016-06-13 18:08:22 +02:00
Ken Brown
6921f4a596 Fix dbus crash on 32-bit Cygwin
* src/dbusbind.c (Fdbus__init_bus): Use make_save_pointer to store
connection address.  (Bug#23741)
(xd_lisp_dbus_to_dbus): Use XSAVE_POINTER to retrieve connection
address.
2016-06-11 08:31:27 -04:00
Phillip Lord
a813487f1a Fix undo boundary in recursive edit (Bug#23632)
* src/keyboard.c (recursive_edit_1): specbind
   undo-auto--undoably-changed-buffers.
 * lisp/simple.el (undo-auto--undoably-changed-buffers):
   fix docstring.
2016-06-08 22:45:00 +01:00
Glenn Morris
56fa055bbf * src/syntax.c (syms_of_syntax) <comment-end-can-be-escaped>: Doc fix. 2016-06-07 17:39:19 -04:00