1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-10 01:34:36 -08:00
Commit graph

38296 commits

Author SHA1 Message Date
Paul Eggert
ed909c049e ; Spelling fixes 2016-03-18 08:55:26 -07:00
Paul Eggert
6da3a6dc9e Port to strict C99 offsetof
* src/bidi.c (bidi_copy_it):
* src/lisp.h (CHAR_TABLE_EXTRA_SLOTS):
Use only a single identifier as the second argument of offsetof.
Found by using clang -pedantic.
2016-03-18 08:43:32 -07:00
Paul Eggert
de7601f149 Port to GTK with strict C11 compiler
* src/gtkutil.c (xg_create_frame_widgets, xg_toggle_notify_cb):
Cast from function type to void * where the C standard requires this.
This works around a problem in the prototypes for
g_signal_handler_find and g_signal_handlers_block_by_func, which
use gpointer instead of GCallback.  Found by using gcc -pedantic.
2016-03-18 08:43:32 -07:00
Paul Eggert
658aa2dae8 Port to GTK with strict C99 compiler
* src/emacsgtkfixed.c: Use workaround for GNOME bug 683906 only
in glib 2.35.6 and earlier, since the bug is fixed in 2.35.7.
* src/emacsgtkfixed.c (EmacsFixedPrivate):
* src/emacsgtkfixed.h (EmacsFixedClass):
Remove duplicate typedef, which strict C99 does not allow (Bug#23003).
2016-03-17 23:45:23 -07:00
Anders Lindgren
1df7173eb2 Avoid screen artifacts with new OS X visible bell after scrolling
* src/nsterm.m (EmacsBell): Save NSView when displaying the
visible bell and set `needsDisplay' when removed.
(hide_bell): Trace.
(ns_copy_bits): Trace.
2016-03-17 21:07:04 +01:00
Eli Zaretskii
d6d164f611 Avoid segfaults due to frame image cache being absent
* src/image.c (cache_image): If the frame doesn't have an image
cache, create it.  (Bug#23028)
2016-03-16 19:04:16 +02:00
Eli Zaretskii
6b6916e872 ; * src/xdisp.c (with_echo_area_buffer): Fix typos in comments. 2016-03-16 18:52:36 +02:00
Paul Eggert
7950e1dd3f Port to clang 3.7.0 on x86-64
* configure.ac: Use AS_IF so that gl_WARN_ADD’s prerequisites are
not done conditionally.  This helps clang, which needs
-Wunknown-warning-option later when configured with warnings.
* src/editfns.c (invalid_time): Now _Noreturn, since clang isn’t
smart enough to figure this out on its own if warnings are enabled.
(lisp_time_struct): Redo for clarity, and to pacify clang.
* src/xfns.c (x_real_pos_and_offsets) [USE_XCB]: Don’t use
uninitialized locals.  This avoids undefined behavior and pacifies
clang.
2016-03-15 13:49:58 -07:00
Eli Zaretskii
38b276d162 Fix startup of "emacs -nw" on systems that CANNOT_DUMP
* src/xdisp.c (syms_of_xdisp) <resize-mini-windows>: Initialize to
nil.

* lisp/loadup.el <resize-mini-windows>: Set to 'grow-only' after
loading window.el.  (Bug#22975)
2016-03-15 19:46:26 +02:00
Stefan Monnier
e6776f8362 * src/keyboard.c (echo_keystrokes_p): Don't test cursor_in_echo_area
(read_key_sequence): Test it here, as before.
(bug#22825).
2016-03-14 20:52:34 -04:00
Eli Zaretskii
48196164aa Avoid crashes at startup on systems that CANNOT_DUMP
* src/xdisp.c (syms_of_xdisp) <redisplay--inhibit-bidi>: New
boolean variable.
(init_iterator, reseat_to_string)
(Fcurrent_bidi_paragraph_direction)
(Fbidi_find_overridden_directionality): Use
redisplay--inhibit-bidi instead of purify-flag, to determine when
it's safe to reorder bidirectional text.

* lisp/loadup.el (redisplay--inhibit-bidi): Set to t at the
beginning of the file.  Reset to nil when charprop.el is
successfully loaded, or when we are going to dump, whichever
happens last.  (Bug#22975)
2016-03-12 11:51:03 +02:00
Ken Raeburn
8b8a6ad3e3 Don't use XRANDR 1.3 extensions if the server doesn't support them.
* src/xterm.h (struct x_display_info): Add fields to save XRANDR
version number.
* src/xfns.c (x_get_monitor_attributes): Save the version numbers
after querying the X server.
(x_get_monitor_attributes_xrandr): Don't use XRRGetOutputPrimary or
XRRGetScreenResourcesCurrent if the server doesn't support at least
RANDR version 1.3.  Conditionalize the code blocks on compiling
against library version 1.3 or better, rather than feature tests for
each function.
* configure.ac: Stop testing for those two functions.
2016-03-10 14:28:54 -05:00
Paul Eggert
7352c6c695 Rework C source files to avoid ^(
Work around Bug#22884 by rewording comments and strings to avoid ‘(’
at the start of a line unless it starts a function.  This change
is a short-term hack; in the longer run we plan to fix cc-mode’s
performance for C files that have ‘(’ at the start of a line in a
comment or string.
2016-03-10 07:59:19 -08:00
Andreas Schwab
711ca362e7 Properly handle lambda as read function (bug 22961)
* src/lread.c (readchar): Be more strict about checking for
string in cons for read_vector.
(unreadchar): Likewise.
2016-03-09 19:45:40 +01:00
Eli Zaretskii
cc057e4313 Speed up redisplay of binary files with long series of nulls
* src/bidi.c (bidi_resolve_weak): Avoid entering a loop searching
for a character needed for resolving the type of a series of BN
and ET characters, as required by rule W5 of UAX#9, if the results
of the resolution are known in advance, because we are at level
zero, and the previous strong character was L.
(bidi_resolve_neutral): Partially resurrect the optimization for a
long series of control characters in an otherwise strictly L2R
text.
(bidi_level_of_next_char): Don't enter the loop that searches for
a paragraph separator if the current character is already at base
embedding level.  (Bug#22739)
2016-03-06 18:14:46 +02:00
Paul Eggert
c45a1ca3c4 doc string file descriptor exhaustion fix
* src/doc.c (get_doc_string): Move newly-added check to a better
location (Bug#22814).
2016-03-04 16:30:43 -08:00
Michael Albinus
265141b332 Fix Bug#22814
* src/doc.c (get_doc_string): Raise an error in case too many
files are open.  (Bug#22814)
2016-03-04 12:57:43 +00:00
Eli Zaretskii
ab30bf5e87 ; * src/w32proc.c: Update the commentary to sys_select. 2016-03-01 20:18:10 +02:00
Eli Zaretskii
14810299f2 Fix reordering of bidi text in an isolate inside an override
* src/bidi.c (bidi_resolve_explicit): Override the orig_type value
of FSI with either LRI or RLI, as determined by the first strong
directional character in the isolate.  This prevents failure to
isolate when the FSI...PDI text is inside a directional override.
(Bug#22786)
2016-03-01 18:41:04 +02:00
Anders Lindgren
bbe8a899ac Made the new OS X visible bell more visible.
* src/nsterm.m: (EmacsBell:init:) Scaled up the visible bell
  "caution" image five times, as the image in its original size
  was hard to see.
2016-02-29 21:54:15 +01:00
Andreas Schwab
9e078e592f Fix char signedness issue in bidi code
* src/dispextern.h (struct bidi_t): Change type of resolved_level
and isolate_level to signed char.  (Bug#22830)
2016-02-27 16:59:50 +01:00
Eli Zaretskii
d2dd614716 Remove unneeded workaround in xftfont.c
* src/xftfont.c (xftfont_open): Remove "dirty workaround" for
XftTextExtents8 behavior, as it is no longer needed.  Suggested by
Fangwen Yu <yynyygy@gmail.com>.  (Bug#22383)
2016-02-25 21:59:57 +02:00
Eli Zaretskii
06a872b71d Fix redisplay on a TTY after 'make-frame'
* src/xdisp.c (clear_garbaged_frames): Don't clear/redraw a
garbaged TTY frame if it is not the selected frame.  (Bug#22794)
2016-02-25 19:57:47 +02:00
Chris Feng
8be32cf45c Fix an assertion
* src/dispnew.c (clear_glyph_matrix_rows): Test matrix->nrows == 0 (which
implies start == 0) separately.
2016-02-25 09:34:55 +08:00
Stefan Monnier
5244db2915 * src/keyboard.c: Don't inadvertently set immediate_echo (bug#22581)
* src/keyboard.c (read_key_sequence): Don't inadvertently set
immediate_echo when we don't want any echo-keystrokes.
(echo_keystrokes_p): Move earlier.
2016-02-24 15:50:54 -05:00
Chris Feng
cab3f0a222 Allocate glyph matrices for the initial frame
* src/frame.c (make_initial_frame): Allocate glyph matrices (Bug#22787).

* src/dispnew.c (clear_glyph_matrix_rows): matrix->nrows can be 0.

Copyright-paperwork-exempt: yes
2016-02-24 08:58:02 +01:00
Eli Zaretskii
00a4720318 Further improve doc string of 'disable-point-adjustment'
* src/keyboard.c (syms_of_keyboard): <disable-point-adjustment>
<global-disable-point-adjustment>: Clarify doc strings.  (Bug#22771)
2016-02-23 19:35:21 +02:00
Eli Zaretskii
6bd9d697fd Fix documentation of 'global-disable-point-adjustment'
* src/keyboard.c (syms_of_keyboard) <disable-point-adjustment>
<global-disable-point-adjustment>: Doc fixes.  (Bug#22771)
2016-02-22 19:30:01 +02:00
Eli Zaretskii
ea0b604412 Fix memory reservation on MS-Windows
* src/w32heap.c (mmap_alloc): Reserve memory in 64KB granular
units.  This avoids leaving gaps in reserved memory regions that
no one can use, since memory reservation must produce 64KB-aligned
addresses.  (Bug#22526)
2016-02-20 18:59:14 +02:00
Eli Zaretskii
1e996cfbd0 Fix "[:upper:]" for non-ASCII characters
* src/regex.c (re_match_2_internal): Support [:upper:] and
[:lower:] for non-ASCII characters.  (Bug#18150)
2016-02-20 13:03:20 +02:00
Eli Zaretskii
289d5c6e97 Fix decoding DOS EOL in a unibyte buffer
* src/coding.c (decode_eol): Loop over bytes, not characters.
(Bug#5251)
2016-02-17 17:48:30 +02:00
Paul Eggert
15a946479c Fix x-load-color-file pointer signedness
* src/xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
For sscanf and int *, use %d, not %u.
Problem found on Ubuntu 15.10 x32, which lacks X support.
2016-02-16 23:25:59 -08:00
Eli Zaretskii
44b16f60fd Avoid crashes in semi-malformed 'condition-case'
* src/eval.c (internal_lisp_condition_case): Treat a handler
'(nil)' as if it were '(nil nil)'.  (Bug#22675)
2016-02-15 16:03:54 +02:00
Eli Zaretskii
d9ea795035 Fix regression with 'recent-keys' and keyboard macros
* src/keyboard.c (record_char): Don't record in 'recent_keys'
events that come from executing keyboard macros.  (Bug#22674)
2016-02-15 14:03:57 +02:00
Paul Eggert
cf79616133 ; Spelling fixes 2016-02-14 19:45:12 -08:00
Paul Eggert
f3aaca3552 Port USE_STACK_LISP_OBJECTS fix to Clang
* src/lisp.h (USE_STACK_LISP_OBJECTS): Default to false for Clang.
Recent versions of Clang claim to be GCC 4.2.1 but do not have
the GCC bug.
2016-02-14 11:43:04 -08:00
Paul Eggert
1834ac7d24 Port to x86 GCC 4.3.1 and earlier
This tries to port to x86 FreeBSD 9, where Emacs dumps core (Bug#22065).
* src/lisp.h (USE_STACK_LISP_OBJECTS): Default to false
for GCC 4.3.1 and earlier.
2016-02-14 11:23:52 -08:00
Eli Zaretskii
84829495b5 Fix point movement under 'scroll-conservatively'
* src/xdisp.c (redisplay_window): Correct a typo in computing the
effective number of text lines in a window.  (Bug#22637)
2016-02-14 21:20:48 +02:00
Eli Zaretskii
8badf953da Make 'mmap_realloc' on MS-Windows more reliable
* src/w32heap.c (mmap_alloc): If reserving memory succeeds, but
committing fails, return NULL.  Don't call GetLastError twice for
the same API error.
(mmap_realloc): Zero out MEMORY_BASIC_INFORMATION structures
before calling VirtualQuery, to avoid using garbled values if the
call fails.  If committing more pages from the same block fails,
fall back on mmap_alloc + CopyMemory.  Enhance debugging printouts
if the call to VirtualAlloc to commit more pages fails.
(Bug#22526)
2016-02-14 19:46:29 +02:00
Eli Zaretskii
47896c8446 ; Improve commentary in insdel.c
* src/insdel.c (gap_left, gap_right, make_gap_larger)
(make_gap_smaller): Improve commentary.
2016-02-13 17:48:38 +02:00
Paul Eggert
1c98f98991 Suppress GNUstep hardening
Fedora 23 normally hardens GNUstep applications, which causes
‘./configure --with-ns’ to break Emacs’s funky way of undumping.
Fix this by eliding the hardening options (Bug#22518).
* src/Makefile.in (LIBS_GNUSTEP): Omit options like
‘-specs=/usr/lib/rpm/redhat/redhat-hardened-ld’.
(GNU_OBJC_CFLAGS): Omit options like
‘-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1’.
2016-02-12 16:24:04 -08:00
Eli Zaretskii
d82f24ba85 Fix redisplay after a large insertion
* src/xdisp.c (redisplay_internal): Don't accept the results of
"optimization 3" if the cursor ends up in a partially visible
glyph row.  (Bug22637)
2016-02-12 21:38:44 +02:00
Lars Ingebrigtsen
f5d6b9bb5b Revert "Support integer image rotation and respect EXIF rotations"
This reverts commit 0f60049605.

This change does not work on Fedora.
2016-02-11 14:05:48 +11:00
Alan Third
eb4a18c7db Set locale when run from OS X GUI
* src/emacs.c (main): Call ns_init_locale.
* src/nsterm.m (ns_init_locale): Get locale from OS and set LANG.
* src/nsterm.h: Include ns_init_locale.
2016-02-10 18:36:04 -08:00
Eli Zaretskii
4ef153b55a Improve doc strings of 'forward/backward-word-strictly'
* lisp/simple.el (backward-word): Refer to 'backward-word-strictly'
in the doc string.  Suggested by Glenn Morris <rgm@gnu.org>.
* lisp/subr.el (forward-word-strictly, backward-word-strictly):
Mention 'subword-mode' in the doc strings.

* src/syntax.c (Fforward_word): Refer to 'forward-word-strictly'
in the doc string.  (Bug#22560)
2016-02-10 20:30:12 +02:00
Dima Kogan
0f60049605 Support integer image rotation and respect EXIF rotations
* src/image.c (imagemagick_load_image): Allow integer rotations in
addition to floating point rotations (bug#22591).
* src/image.c (imagemagick_load_image): Images that have an
orientation given in EXIF and have no explicit :rotation tag are now
pre-rotated.  All information such as width/height is reported for the
rotated image.
2016-02-10 15:45:46 +11:00
Paul Eggert
0a289d38b5 Suppress ACL ops if configured with --disable-acl
Without this patch, some ACL operations were suppressed, but not all.
* src/fileio.c [!USE_ACL]: Do not include sys/acl.h.
(Ffile_acl, Fset_file_acl) [!USE_ACL]: Return nil in this case.
2016-02-09 15:02:59 -08:00
Paul Eggert
145a11e1a3 Minor alignas cleanup
* src/lisp.h (alignas): Remove now-redundant #ifdef that was left
over from the old way of doing things, before Bug#20862 was fixed.
2016-02-09 14:17:01 -08:00
Paul Eggert
f65ef80fed Add lmalloc commentary and tweak laligned
* src/alloc.c (laligned): Help compiler in a tiny way by putting
the more-commonly-failing disjunct first.
2016-02-09 14:17:01 -08:00
Paul Eggert
b1079c0f86 Increase success rate of fallback lmalloc
* src/alloc.c (lmalloc, lrealloc): Reallocate with (typically)
larger and larger sizes, to increase the probability that
the allocator will return a Lisp-aligned pointer.
2016-02-08 20:25:23 -08:00