1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-29 08:31:35 -08:00
Commit graph

32093 commits

Author SHA1 Message Date
Martin Rudalics
c7b08b0d14 Rewrite and delabelize vertical border check. (Bug#5357) (Bug#9618)
* window.c (coordinates_in_window): Rewrite and delabelize
vertical border check.  (Bug#5357) (Bug#9618)
2011-10-15 12:12:00 +02:00
Stefan Monnier
6b02f655f1 * src/xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
errors in XSetWindowBorder.

Fixes: debbugs:9310
2011-10-14 13:44:39 -04:00
Dmitry Antipov
81d40c9208 Use xfree, not free, to avoid crash with --enable-checking=xmallocoverrun. 2011-10-13 07:55:46 -07:00
Eli Zaretskii
d4172c3be9 Fix the change with paragraph_dir initialization.
src/bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
 some callers set that themselves.
 src/xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
 itb.paragraph_dir to NEUTRAL_DIR.  Fixes an occasional incorrect
 cursor motion with <left> and <right> arrow keys.
2011-10-13 13:17:32 +02:00
Eli Zaretskii
b00eea75d3 Fix bugs #9738 & 9739 with a display string that ends in 2 newlines.
src/xdisp.c (find_row_edges): Handle the case where ROW comes from a
 display string and the previous row comes from the same string and
 is empty.
2011-10-12 22:07:59 +02:00
Stefan Monnier
8fe012c4e6 * doc.c (get_doc_string): Encode file name.
Fixes: debbugs:9735
2011-10-12 15:08:04 -04:00
Eli Zaretskii
79beb1785a Remove incorrect comments about U+2028 LS character.
See http://www.unicode.org/mail-arch/unicode-ml/y2011-m10/0048.html
for more details.

 src/bidi.c (bidi_level_of_next_char):
 src/xdisp.c (get_visually_first_element): Remove old incorrect
 comments regarding the Unicode Line Separator character.
2011-10-12 17:12:52 +02:00
Eli Zaretskii
0074aef227 src/bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR. 2011-10-12 13:32:41 +02:00
Dmitry Antipov
6e4b3fbe6d * alloc.c (Fgc_status): Do not access beyond zombies array
boundary if nzombies > MAX_ZOMBIES.
* alloc.c (dump_zombies): Add missing format specifier.
2011-10-11 23:09:40 -07:00
Paul Eggert
b5525cacc3 * xdisp.c (set_cursor_from_row): Simplify conditionals,
to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
2011-10-11 22:50:15 -07:00
Paul Eggert
0324f3af3d * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
Some packages use them to denote characters with modifiers.
2011-10-11 21:58:43 -07:00
Andreas Schwab
e9b5f88812 * src/lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
(GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
matching a pp-number.  Rename parameter var to var1.
2011-10-11 19:35:16 +02:00
Stefan Monnier
127827c013 * minibuf.c (Finternal_complete_buffer): Fix last change.
Fixes: debbugs:9709
2011-10-11 13:32:38 -04:00
Glenn Morris
c8fd3bd078 Small callint.c fix.
* src/callint.c (Fcall_interactively): Give a more explicit error for the
'c' case with a non-character input.

Fixes: debbugs:8479
2011-10-08 14:07:23 -07:00
Eli Zaretskii
7061c98630 Fix cursor positioning in hscrolled lines with R2L characters.
src/xdisp.c (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
 lines that are hscrolled on the left.
2011-10-08 15:03:43 +02:00
Eli Zaretskii
03669ccbad src/xdisp.c (hscroll_window_tree): Support hscroll in right-to-left lines. 2011-10-08 14:15:08 +02:00
Eli Zaretskii
352ec8ffdd Fix bug #4426 with buffer_posn_from_coords when header line is present.
dispnew.c (buffer_posn_from_coords): Account it.vpos for a possible
 presence of header-line.
2011-10-08 12:58:50 +02:00
Paul Eggert
84e8e185cd * alloc.c: Add comment. 2011-10-07 09:42:32 -07:00
Stefan Monnier
a66cfb1c67 * src/buffer.c (syms_of_buffer) <enable-multibyte-characters>: Don't
advertise functionality which we discourage or doesn't work.
2011-10-07 09:08:47 -04:00
Paul Eggert
7c5ee88ecb Fix alignment-related core dump during GC.
* configure.in (GC_LISP_OBJECT_ALIGNMENT): Remove.
This is now done by src/alloc.c.
* src/alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
or sizeof.  __alignof__ gives the wrong answer on Fedora x86-64
with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
this makes Emacs dump core during garbage collection on rare
occasions.  sizeof is obviously inferior to offsetof here, so
stick with offsetof.
(GC_POINTER_ALIGNMENT): New macro.
(mark_memory): Omit 3rd (offset) arg; caller changed.
Don't assume EMACS_INT alignment is the same as pointer alignment.
2011-10-07 00:23:44 -07:00
Stefan Monnier
df1bbe5b13 * src/keyboard.c (read_key_sequence_remapped): New var.
(read_key_sequence): Compute remapping in the right buffer.
(command_loop_1): Use read_key_sequence's remapping directly.
2011-10-03 16:50:54 -04:00
Stefan Monnier
32c1fffd72 * lisp/pcomplete.el: Require comint.
(pcomplete--common-suffix): Remove.
(pcomplete--common-quoted-suffix): Use comint--common-suffix instead.
(pcomplete--table-subvert): Sync with comint--table-subvert.
(pcomplete--entries): Use comint-completion-file-name-table.
* lisp/comint.el (comint-unquote-filename): Simplify.
(comint-completion-file-name-table): New function.
(comint--complete-file-name-data): Use it.
* src/dired.c (file_name_completion): Don't expand file name.
(Ffile_name_completion, Ffile_name_all_completions): Expand file name
before checking file name handler.

Fixes: debbugs:9616
2011-10-02 00:08:50 -04:00
Stefan Monnier
51553db66b * src/minibuf.c (Finternal_complete_buffer): Only show internal buffers if
they've been requested explicitly.

Fixes: debbugs:9591
2011-10-01 20:25:27 -04:00
Chong Yidong
b6bd159922 Merge changes from emacs-23 2011-10-01 14:46:45 -04:00
Paul Eggert
4222c55da7 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
This fixes a Y2038 bug on 64-bit hosts.
* buffer.c (reset_buffer):
* fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
(Fclear_buffer_auto_save_failure):
Use 0, not -1, to represent an unset failure time, since time_t
might not be signed.
2011-09-30 13:22:01 -07:00
Paul Eggert
f701dc2abb Remove dependency on glibc malloc internals.
* alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
Move back here from lisp.h, but with their new implementations.
(XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
(XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
* charset.c (charset_table_init): New static var.
(syms_of_charset): Use it instead of xmalloc.  This removes a
dependency on glibc malloc internals.  See Eli Zaretskii's comment in
<http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
* lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
Move back to alloc.c.
(XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
(XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
2011-09-30 10:07:40 -07:00
Jan Djärv
9ceebf39d9 * nsterm.m (windowDidResize): Call x_set_window_size only when
ns_in_resize is true.  Otherwise set pixelwidth/height and
call change_frame_size.

Fixes: debbugs:9628
2011-09-30 09:42:26 +02:00
Eli Zaretskii
04c7078847 src/ChangeLog: Minor typos fixed. 2011-09-30 10:25:15 +03:00
Paul Eggert
3930c88bfc Port --enable-checking=all to Fedora 14 x86-64.
* charset.c (syms_of_charset): Also account for glibc malloc's
internal overhead when calculating the initial malloc maximum.
2011-09-30 00:16:38 -07:00
Paul Eggert
cb993c584c Port --enable-checking=all to Fedora 14 x86.
* alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
Move to lisp.h.
(xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
(overrun_check_realloc, overrun_check_free):
Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
That way, xmalloc returns a properly-aligned pointer even if
XMALLOC_OVERRUN_CHECK is defined.  The old debugging code happened
to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
* charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
into account when calculating the initial malloc maximum.
* lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
Move here from alloc.c, so that charset.c can use it too.
Properly align; the old code wasn't right for common 32-bit hosts
when configured with --enable-checking=all.
(XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
(XMALLOC_OVERRUN_SIZE_SIZE): New macros.
2011-09-29 20:25:46 -07:00
Eli Zaretskii
31bed48620 Fix the MSDOS build.
msdos/mainmake.v2 (boot): Condition the value on the existence of
 autogen/README, not admin/admin.el, since the latter is now part
 of the release tarball.
 (install): Don't copy lib-src/fns.el, as that file is no longer
 generated in that directory.
 msdos/sed1v2.inp (LIB_PTHREAD, LIB_PTHREAD_SIGMASK): Edit to empty.
 (SETTINGS_CFLAGS, SETTINGS_LIBS): Edit these instead of
 GCONF_CFLAGS and GCONF_LIBS.
 msdos/sedlibmk.inp (ALLOCA_H, AR, ARFLAGS, GNULIB_CHDIR, GNULIB_DUP)
 (GNULIB_FDATASYNC, GNULIB_FDOPEN, GNULIB_FSTAT, GNULIB_PCLOSE)
 (GNULIB_PTHREAD_SIGMASK, GNULIB_RAISE, GNULIB_SIGACTION)
 (GNULIB_SIGPROCMASK, GNULIB_SIGNAL_H_SIGPIPE, HAVE_FDATASYNC)
 (HAVE_PCLOSE, HAVE_POPEN, HAVE_POSIX_SIGNALBLOCKING)
 (HAVE_PTHREAD_SIGMASK, HAVE_RAISE, HAVE_SIGACTION)
 (HAVE_SIGHANDLER_T, HAVE_SIGINFO_T, HAVE_SIGSET_T)
 (HAVE_STRUCT_SIGACTION_SA_SIGACTION)
 (HAVE_TYPE_VOLATILE_SIG_ATOMIC_T, LIB_PTHREAD)
 (LIB_PTHREAD_SIGMASK, NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H)
 (NEXT_SIGNAL_H, REPLACE_FDOPEN, REPLACE_PTHREAD_SIGMASK)
 (REPLACE_RAISE): New edits.
 (gl_LIBOBJS): Remove md5.o, filemode.o, and sha1.o.  Add
 pthread_sigmask.o.
 (@GL_GENERATE_ALLOCA_H_TRUE@, @GL_GENERATE_ALLOCA_H_FALSE@): Edit
 to comment out unneeded lines.
 (warn-on-use.h): Edit the recipe commands to work with DJGPP
 without requiring a Unixy shell.
 msdos/inttypes.h (strtoimax) [DJGPP < 2.04]: New macro.
 msdos/sed2v2.inp (HAVE_ALLOCA, HAVE_DECL_STRTOLL, HAVE_DECL_STRTOIMAX)
 (HAVE_STRTOLL, HAVE_SIGSET_T, HAVE_SNPRINTF): New edits.

 .bzrignore: Add ./GNUMakefile.unix.
 config.bat: Rename GNUMakefile, so it is not run on MS-DOS.
 Rename signal.in.h and alloca.in.h.

 src/sysdep.c (snprintf) [EOVERFLOW]: If EOVERFLOW is not defined,
 use EDOM.
2011-09-29 15:00:18 +03:00
Eli Zaretskii
fbcaa2f388 Fix bug #9624 with crashes in Muse mode.
src/xdisp.c (compute_display_string_end): If there's no display
 string at CHARPOS, return -1.
 src/bidi.c (bidi_fetch_char): When compute_display_string_end
 returns a negative value, treat the character as a normal
 character not covered by a display string.
2011-09-28 17:37:27 +03:00
Juanma Barranquero
a239d4e9c0 Fix typos. 2011-09-28 02:59:28 +02:00
Eli Zaretskii
88652fd58c Fix bug #9610 with slow cursor motion in buffers with invisible text.
src/xdisp.c (handle_invisible_prop): If invisible text ends on a
 newline, reseat the iterator instead of bidi-iterating there one
 character at a time.  (Bug#9610)
 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
 TO_CHARPOS if the bidi iterator is at base embedding level.
2011-09-27 20:18:31 +03:00
Andreas Schwab
ed497dd4ec * lread.c (readevalloop): Use correct code for NBSP.
(read1): Likewise.  (Bug#9608)
2011-09-27 10:37:07 +02:00
Chong Yidong
f7d75b4bba Bump version to 24.0.90.
Regenerate AUTHORS and ldefs-boot.el.
2011-09-25 23:20:03 -04:00
Michael Albinus
b2bf61aa89 * dbusbind.c (Fdbus_register_signal): When service is not
registered, use nil in Vdbus_registered_objects_table.  (Bug#9581)
2011-09-25 18:00:02 +02:00
Glenn Morris
32bbb17c0e * src/buffer.c (truncate-lines): Doc fix. 2011-09-24 19:30:31 -07:00
Chong Yidong
94e0933e1f Minor doc fixes for some window functions.
Minor doc fixes for switch-to-buffer, window-prev-buffers,
set-window-prev-buffers, set-window-next-buffers.
2011-09-24 18:51:36 -04:00
Glenn Morris
cddde9219f * src/minibuf.c (read_minibuf): Disable line truncation. (Bug#5715) 2011-09-24 11:29:35 -07:00
Paul Eggert
25b4bfa0d1 Fix minor problems found by static checking.
* xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
* indent.c (Fvertical_motion): Fix == vs = typo.
2011-09-24 09:31:55 -07:00
Paul Eggert
9f985e85e1 * xdisp.c (string_from_display_spec): Don't use int for vector length. 2011-09-24 09:28:25 -07:00
Paul Eggert
1260aef1ae * indent.c (Fvertical_motion): Fix == vs = typo. 2011-09-24 09:15:32 -07:00
Eli Zaretskii
6bf7006fa2 Change the default value of redisplay-dont-pause to t.
src/dispnew.c (syms_of_display) <redisplay-dont-pause>: Default
 value is now t.  Doc fix.
 doc/lispref/display.texi (Forcing Redisplay): Update the description of
 redisplay-dont-pause due to change in the default value.
 etc/NEWS: Mention the change of the default value.
2011-09-24 17:38:16 +03:00
Eli Zaretskii
e3cbd34b87 Fix vertical cursor motion when the newline is covered by a display string.
src/indent.c (Fvertical_motion): Compute and apply the overshoot
 logic when moving up, not only when moving down.  Fix the
 confusing name and values of the it_overshoot_expected variable;
 logic changes accordingly.  (Bug#9254) (Bug#9549)
 src/xdisp.c (pos_visible_p): Produce correct pixel coordinates when
 CHARPOS is covered by a display string which includes newlines.
 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
 is covered by a display string with embedded newlines.
2011-09-24 16:23:58 +03:00
Michael Albinus
a3de0cbd6d * dbusbind.c (Fdbus_register_signal): Add match rule to
Vdbus_registered_objects_table.  (Bug#9581)
(Fdbus_register_method, Vdbus_registered_objects_table): Fix
docstring.
2011-09-24 13:36:53 +02:00
Richard M. Stallman
512a289dc6 bidi.c: Whitespace changes and a few added parentheses,
to follow usual Emacs and GNU style.
2011-09-24 06:31:37 -04:00
Jim Meyering
b260039d42 do not ignore write error for any output size
The previous change was incomplete.
While it makes emacs --batch detect the vast majority of stdout
write failures, errors were still ignored whenever the output size is
k * (BUFSIZ+1) - 4.  E.g., on a system with BUFSIZ of 4096,
  $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
      && echo FAIL: ignored write error
  FAIL: ignored write error
  $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
      && echo FAIL: ignored write error
  FAIL: ignored write error
* emacs.c (Fkill_emacs): Also test ferror.  (Bug#9574)
2011-09-24 11:22:06 +02:00
Andreas Schwab
8eca8a7c48 * src/emacs.c (Fkill_emacs): In noninteractive mode exit
non-successfully if a write error occurred on stdout.  (Bug#9574)
2011-09-23 11:56:55 +02:00
Eli Zaretskii
3341db6299 Fix assertion failure when displaying stretch glyphs under linum-mode.
src/xdisp.c (pop_it): Allow it->object that is a cons cell to pass
 the xassert test.
 src/dispextern.h (struct it): Update the comment documenting what
 can it->OBJECT be.
2011-09-21 04:13:18 -04:00