1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 11:00:45 -08:00
Commit graph

34414 commits

Author SHA1 Message Date
Eli Zaretskii
9e63b4a534 Fix bug #14287 with decoding EOL by *-dos coding systems.
src/coding.c (decode_coding_gap): Don't remove the character before
 a newline unless it's a CR character.
2013-04-28 21:21:01 +03:00
Dan Nicolaescu
ad60824ef1 * dispextern.h (struct face): Move enum face_underline_type
earlier so that bitfields can be in the same word.
2013-04-28 09:11:16 -04:00
Jan Djärv
edbdcec0a2 * nsfns.m (handlePanelKeys): New function.
(EmacsOpenPanel:performKeyEquivalent:)
(EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
arrows/function/control and copy/paste keys.

Fixes: debbugs:14296
2013-04-28 11:55:20 +02:00
Juri Linkov
0208ede7ab * src/callint.c (Fcall_interactively): Call `Qread_number' for
interactive code letter `n' instead of using duplicate code.

* lisp/subr.el (read-number): Doc fix about using it by interactive
code letter `n'.

Fixes: debbugs:14254
2013-04-28 00:12:17 +03:00
Paul Eggert
b8dd59f747 * systime.h (make_timeval): Declare as 'const'. 2013-04-27 08:34:28 -07:00
Kenichi Handa
13d0e56fa3 merge trunk 2013-04-27 22:34:02 +09:00
Kenichi Handa
8bd722db81 font.c (font_open_entity): Always open a font of manageable size. 2013-04-27 22:32:24 +09:00
Paul Eggert
f780d632f2 Port better to AIX.
* configure.ac (CFLAGS): Append -O if the user did not specify CFLAGS,
we did not already infer an optimization option, and -O works.
AIX xlc needs -O, otherwise garbage collection doesn't work.
* src/lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
to pacify AIX xlc.

Fixes: debbugs:14258
2013-04-26 12:31:09 -07:00
Kenichi Handa
ec5098562a coding.c (decode_coding_iso_2022): When an invalid escape sequence is encountered, reset the invocation and designation status to the safest one. 2013-04-25 00:09:49 +09:00
Paul Eggert
84fc48e57a * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
Without this fix, "make distclean" leaves stamp-h1 behind.
2013-04-21 22:18:30 -07:00
Erik Charlebois
806bda47dd Better full-screen frame support on MS-Windows.
src/w32fns.c (w32_fullscreen_rect): New function to compute the
 window rectangle for the given fullscreen mode.
 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
 longer tunes the window size.  This keeps the window's edges flush
 with the screen and allows the taskbar to hide itself in fullboth.
 src/w32term.c (w32fullscreen_hook): 'fullboth' now shows without
 window decorations and uses the entire screen.
 src/w32term.h  (w32_fullscreen_rect) Add prototype.
 (struct w32_output): Replace normal_width, normal_height,
 normal_top, and normal_left members with a single normal_placement
 struct.
 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
 Remove macros.
 (FRAME_NORMAL_PLACEMENT): New macro.

Fixes: debbugs:14180
2013-04-20 10:32:31 +03:00
Juanma Barranquero
f4ad7ea14b Fix typos in ChangeLogs. 2013-04-16 04:52:53 +02:00
Juanma Barranquero
9cc2810b69 src/minibuf.c (Ftest_completion): Silence compiler warning. 2013-04-16 04:39:47 +02:00
Eli Zaretskii
5fbcd23785 ChangeLog for the last commit. 2013-04-15 10:29:39 +03:00
Eli Zaretskii
fd16b54c72 More debugging code to investigate bug #14062.
src/w32fns.c (w32_wnd_proc): Add more assertions to investigate
 bug#14062.
 src/frame.h (WINDOW_FRAME): Protect macro and its argument with
 parentheses.
 src/dispextern.h (CURRENT_MODE_LINE_HEIGHT)
 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
 parentheses where appropriate.
2013-04-15 10:27:56 +03:00
Paul Eggert
9e3379a08b * keyboard.c (timer_start_idle): Remove no-longer-used local. 2013-04-14 13:33:57 -07:00
Eli Zaretskii
ddd6b68524 Improve doc strings of left/right-margin/fringe-width.
src/buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>
 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
 Mention in the doc string that setting these variables takes
 effect only after a call to set-window-buffer.  (Bug#14200)
2013-04-14 09:51:15 +03:00
Erik Charlebois
1f635a07be * src/w32fns.c (w32_fullscreen_rect): New function to compute the
window rectangle for the given fullscreen mode.
(w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING
no longer tunes the window size.  This keeps the window's edges
flush with the screen and allows the taskbar to hide itself in
fullboth.
* src/w32term.c (w32fullscreen_hook): fullboth now shows without
window decorations and uses the entire screen.
2013-04-13 20:58:45 -04:00
Eli Zaretskii
29b79ba197 Fix vertical cursor motion when there are overlay strings at EOL.
src/indent.c (Fvertical_motion): Don't consider display strings on
 overlay strings as display strings on the buffer position we
 started from.  This prevents vertical cursor motion from jumping
 more than one line when there's an overlay string with a display
 property at end of line.
 Reported by Karl Chen <Karl.Chen@quarl.org> in
 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
2013-04-13 11:54:02 +03:00
Stefan Monnier
562c6ee945 * src/window.c (select_window): `record_buffer' even if window is
already selected.

Fixes: debbugs:14191
2013-04-12 13:32:52 -04:00
Eli Zaretskii
fcc1fe8541 Fix bug #14170 with window-end returning a stale value.
This bug was introduced in 2012-10-15T09:03:56Z!rudalics@gmx.at
while solving bug #12600.

 src/window.c (Fwindow_end): Test more flags, including the buffer's
 last_overlay_modified flag, to determine whether the window's
 display is really up-to-date.  Prevents the function from
 returning a stale value.
 (Fwindow_line_height): Fix the test for up-to-date-ness of the
 current matrix.
2013-04-11 19:06:47 +03:00
Eli Zaretskii
f009190abc Fix bug #13864 with flickering of TTY frames in an emacslient session.
src/frame.c (do_switch_frame): Mark the TTY frame we switch to as
 garbaged only if it is not already the top frame on its TTY.  This
 prevents flickering due to constant redrawing of TTY frames when
 there are GUI frames open in the same session.
2013-04-10 18:38:20 +03:00
Stefan Monnier
78ce603d02 * src/keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
of marking the idle timers directly.
* lisp/emacs-lisp/timer.el (timer--check): New function.
(timer--time, timer-set-function, timer-event-handler): Use it.
(timer-set-idle-time): Simplify.
(timer--activate): CSE.
(timer-event-handler): Give more info in error message.
(internal-timer-start-idle): New function, moved from C.
2013-04-10 09:31:35 -04:00
Stefan Monnier
a8036e4076 * src/minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
tables.

Fixes: debbugs:14054
2013-04-09 16:10:47 -04:00
Stefan Monnier
7ffe7ef6ba * src/window.c (select_window): Don't record_buffer while the invariant is
temporarily broken.
* src/fns.c (Fdelq): Don't assume !NILP => CONSP.

Fixes: debbugs:14161
2013-04-08 14:04:58 -04:00
Eli Zaretskii
7d9f6883aa Provide definition of ACL_NOT_WELL_SUPPORTED for MS-Windows.
src/fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.

Fixes: debbugs:13702
2013-04-07 19:18:41 +03:00
Romain Francoise
5406cfd9cd Ignore additional platform-specific ACL errors (Bug#13702).
* fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
(Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
2013-04-07 13:21:39 +02:00
Jan Djärv
95c0e83b2a * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
f->output_data.ns.
2013-04-07 12:51:29 +02:00
Paul Eggert
876da980f8 Fix --enable-profiling bug introduced by 2013-02-25 change.
This bug was introduced by my 2013-02-25 change that simplified
data_start configuration.  Without this change, on GNU/Linux
an Emacs configured with --enable-profiling fails immediately
due to a profiler signal.
* configure.ac (LD_SWITCH_SYSTEM_TEMACS): Append -pg if profiling
and if not on GNU/Linux or FreeBSD.
* lib/Makefile.am (AM_CFLAGS): Add $(PROFILING_CFLAGS), so that
lib/*.o is profiled too.
* src/Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
with these flags.  On platforms where special flags are needed
when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
(ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
(.c.o, .m.o): Compile with $(PROFILING_CFLAGS).

Fixes: debbugs:13783
2013-04-06 23:21:40 -07:00
Dmitry Antipov
7452b7bd70 Get rid of some platform-specific functions examining window
system and its capabilities.  This is a partial rework of the
2013-04-05 change.
* lisp.h (have_menus_p): Remove prototype.  This function is
replaced with platform-independent window_system_available.
(check_window_system): Move to...
* frame.h (decode_window_system_frame, window_system_available):
...here, add new prototypes.
* frame.c (window_system_available, decode_window_system_frame):
New functions.
(check_window_system): Platform-independent now.
* xterm.h (x_in_use): Remove declaration.
(check_x_frame):
* w32term.h (check_x_frame):
* nsterm.h (check_x_frame): Remove prototypes.  This function
is replaced with platform-independent decode_window_system_frame.
* msdos.c (have_menus_p): Remove.
* nsfns.m (check_window_system, have_menus_p, check_ns_frame):
Remove platform-specific functions.  Use check_window_system,
decode_window_system_frame and check_ns_display_info where
appropriate.  Minor style and comment tweaks.
* w32fns.c (w32_in_use, check_window_system, have_menus_p)
(check_x_frame): Likewise.
* xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
Likewise.
* fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
* nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
* xmenu.c, xselect.c: All related users changed.
2013-04-07 08:41:19 +04:00
Paul Eggert
8ead390103 Spelling fix. 2013-04-06 00:33:18 -07:00
Kenichi Handa
b7a6f9f791 merge trunk 2013-04-05 23:17:55 +09:00
Kenichi Handa
251e91474c Optimize the code for reading UTF-8 files. 2013-04-05 23:08:56 +09:00
Dmitry Antipov
73931ad14a Consistently use platform-specific function to detect window system.
* lisp.h (check_window_system): New prototype.  This function is
going to replace check_x, check_w32 and check_ns.
(have_menus_p): Mention msdos.c in comment.
* fontset.c (check_window_system_func): Remove.  Adjust all users.
* fontset.h (check_window_system_func): Remove prototype.
* nsterm.h (check_ns):
* xterm.h (check_x):
* w32term.h (check_w32): Likewise.
* menu.c (Fx_popup_menu): Use check_window_system.
* msdos.c (check_window_system): Define for MS-DOS.
* nsfns.m (check_window_system): Define for NS.  Adjust all users.
* w32fns.c (check_window_system): Likewise for MS-Windows.
* xfns.c (check_window_system): Likewise for X.
* font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
* xfaces.c, xmenu.c: Use check_window_system where appropriate.
2013-04-05 18:07:02 +04:00
Paul Eggert
7216e43b32 Prefer < to > in range checks such as 0 <= i && i < N.
This makes it easier to visualize quantities on a number line.
This patch doesn't apply to all such range checks,
only to the range checks affected by the 2013-03-24 change.
This patch reverts most of the 2013-03-24 change.
* alloc.c (xpalloc, Fgarbage_collect):
* ccl.c (ccl_driver, resolve_symbol_ccl_program):
* character.c (string_escape_byte8):
* charset.c (read_hex):
* data.c (cons_to_unsigned):
* dispnew.c (update_frame_1):
* doc.c (Fsubstitute_command_keys):
* doprnt.c (doprnt):
* editfns.c (hi_time, decode_time_components):
* fileio.c (file_offset):
* fns.c (larger_vector, make_hash_table, Fmake_hash_table):
* font.c (font_intern_prop):
* frame.c (x_set_alpha):
* gtkutil.c (get_utf8_string):
* indent.c (check_display_width):
* keymap.c (Fkey_description):
* lisp.h (FIXNUM_OVERFLOW_P, vcopy):
* lread.c (read1):
* minibuf.c (read_minibuf_noninteractive):
* process.c (wait_reading_process_output):
* search.c (Freplace_match):
* window.c (get_phys_cursor_glyph):
* xdisp.c (redisplay_internal):
* xsmfns.c (smc_save_yourself_CB):
Prefer < to > for range checks.
* dispnew.c (sit_for): Don't mishandle NaNs.
This fixes a bug introduced in the 2013-03-24 change.
* editfns.c (decode_time_components): Don't hoist comparison.
This fixes another bug introduced in the 2013-03-24 change.
2013-04-01 18:54:56 -07:00
Paul Eggert
b9edfa5c63 Spelling fixes. 2013-04-01 00:58:04 -07:00
Dmitry Antipov
9275998872 * frame.h (struct frame): Drop scroll_bottom_vpos
member becaue all real users are dead long ago.
(FRAME_SCROLL_BOTTOM_VPOS): Remove.
* xdisp.c (redisplay_internal): Adjust user.
2013-03-31 09:45:54 +04:00
Glenn Morris
9a1971bbaa ChangeLog whitespace fix 2013-03-30 09:57:02 -07:00
Jan Djärv
f38ab1671f * nsmenu.m (showAtX:Y:for:): setLevel to
NSPopUpMenuWindowLevel (Bug#13998).
2013-03-30 11:18:48 +01:00
Jan Djärv
6d01f1feaf * nsmenu.m (ns_update_menubar): Correct NSTRACE.
(x_activate_menubar): Update the menu with title that matches
ns_get_pending_menu_title, and call
ns_check_pending_openmenu.
(menuWillOpen:): New method.
(menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).

* nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
(ns_check_pending_open_menu): Declare.

* nsterm.m (menu_will_open_state, menu_mouse_point)
(menu_pending_title): New varaibles.
(ns_get_pending_menu_title, ns_check_menu_open)
(ns_check_pending_open_menu): New functions.
2013-03-30 10:57:27 +01:00
Dmitry Antipov
781f4782a7 * indent.c (current_column_bol_cache): Remove leftover which is not
used in Fmove_to_column any more.
(current_column, scan_for_column): Adjust users.
* keyboard.c (last_point_position_buffer, last_point_position_window):
Remove leftovers which are not used for recording undo any more.
(command_loop_1, syms_of_keyboard): Adjust users.
* xdisp.c (last_max_ascent): Remove leftover which is not used in
redisplay_window any more.
(move_it_to): Adjust user.
2013-03-29 19:50:21 +04:00
Juanma Barranquero
1921c31bb9 src/makefile.w32-in: Update dependencies. 2013-03-29 04:03:19 +01:00
Stefan Monnier
717b8bcd96 * src/lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
(set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
forward references.
2013-03-28 12:21:38 -04:00
Dmitry Antipov
e74aeda863 * window.h (struct window): Replace hchild, vchild and buffer slots
with the only contents slot.  This is possible because each valid
window may have either the child window (in vertical or horizontal
combination) or buffer to display (for the leaf window).  Using that,
a lof of operations to traverse and/or change window hierarchies may
be simplified.  New member horizontal is used to distinguish between
horizontal and vertical combinations of internal windows.
(WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
(WINDOW_VERTICAL_COMBINATION_P): New macros.
(WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
* window.c (wset_hchild, wset_vchild): Remove.  Adjust all users.
Use contents slot, not buffer, where appropriate.
(wset_combination): New function.
(wset_buffer): Add eassert.
(Fframe_first_window): Simplify the loop reaching first window.
(Fwindow_buffer): Use WINDOW_LEAF_P.
(Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
(Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
(unshow_buffer): Convert initial debugging check to eassert.
(replace_window, recombine_windows, Fdelete_other_windows_internal)
(make_parent_window, window_resize_check, window_resize_apply)
(resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
(Fset_window_configuration, delete_all_child_windows, save_window_save):
Adjust to match struct window changes.
(window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
(mark_window_cursors_off, count_windows, get_leaf_windows)
(foreach_window_1): Simplify the loop.
* alloc.c (mark_object): Do not check for the leaf window because
internal windows has no glyph matrices anyway.
* dispnew.c (clear_window_matrices, showing_window_margins_p)
(allocate_matrices_for_window_redisplay, fake_current_matrices)
(allocate_matrices_for_frame_redisplay, free_window_matrices)
(build_frame_matrix_from_window_tree, mirror_make_current)
(frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
(update_window_tree, set_window_update_flags): Simplify the loop.
(sync_window_with_frame_matrix_rows): Enforce live window.
Use contents slot, not buffer, where appropriate.
* frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
and WINDOW_HORIZONTAL_COMBINATION_P.
(make_frame_visible_1): Simplify the loop.
Use contents slot, not buffer, where appropriate.
* xdisp.c (hscroll_window_tree, mark_window_display_accurate)
(redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
(expose_window_tree): Likewise.
Use contents slot, not buffer, where appropriate.
* textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
to avoid deleted windows.  Use contents slot instead of buffer.
* buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
* indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
* nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
* xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
2013-03-28 18:04:49 +04:00
Eli Zaretskii
9d42d31f24 Fix inaccuracy in a comment. 2013-03-28 15:54:21 +02:00
Eli Zaretskii
21e930f8f7 Fix bug #14073 with referencing window total number of columns.
src/w32fns.c (Fx_show_tip): Fix compilation error under
 "--enable-check-lisp-object-type".
2013-03-28 15:45:27 +02:00
Dmitry Antipov
c7f53895b9 Fix 2013-03-28T02:41:05Z!dmantipov@yandex.ru which brokes Fbuffer_swap_text.
* buffer.c (Fbuffer_swap_text): Adjust window start markers.
Fix comment.
2013-03-28 13:25:25 +04:00
Eli Zaretskii
ef454cf704 Add debugging code to w32fns.c.
src/w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
 identify the reasons for assertion violations in bug#14062 and
 similar ones.
2013-03-28 11:18:16 +02:00
Eli Zaretskii
121ab1cdc4 Add DEF_IMGLIB_FN for g_error_free to image.c.
src/image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
 Reported by <rzl24ozi@gmail.com>.
2013-03-28 08:40:01 +02:00
Dmitry Antipov
5c89ca240d * xdisp.c (with_echo_area_buffer_unwind_data): Save window
start marker...
(unwind_with_echo_area_buffer): ...to restore it here.  This
is needed to ensure that...
(redisplay_window): ...both window markers are valid here,
which is verified by eassert.
* editfns.c (save_excursion_save): Do not assume that
selected_window always displays the buffer.
2013-03-28 06:41:05 +04:00