Eli Zaretskii [Tue, 12 Feb 2013 16:43:09 +0000 (18:43 +0200)]
Fix cursor positioning near scroll margin at top of window.
src/xdisp.c (try_scrolling): Scroll text up more if point is too close
to ZV and inside the scroll margin. This makes sure point is moved
outside the scroll margin in these cases.
Eli Zaretskii [Tue, 12 Feb 2013 16:36:55 +0000 (18:36 +0200)]
Minor additional fix in the wake of bugs #13623 and 13626.
src/xdisp.c (redisplay_internal): Don't set w->region_showing to the
marker's position.
(display_line): Set w->region_showing to the value of
it->region_beg_charpos, not to -1. This fixes redisplay
optimization when cursor is moved up after M->.
src/window.h (struct window): region_showing can no longer be negative.
Stefan Monnier [Mon, 11 Feb 2013 19:21:23 +0000 (14:21 -0500)]
Clean up read_key_sequence a bit; reread active keymaps after first event.
* src/keyboard.c (read_char, read_char_x_menu_prompt)
(read_char_minibuf_menu_prompt):
Replace nmaps+maps with a single `map' arg.
(follow_key): Operate on a single map.
(active_maps): New function.
(test_undefined): Also return true for nil bindings.
(read_key_sequence): Use active_maps to replace the arrays of keymaps with
a single (composed) keymap. Remember `first_event' to choose the right
set of active keymaps. Recompute the set of keymaps after receiving
the first event. Remove GOBBLE_FIRST_EVENT.
(syms_of_keyboard): Remove inhibit_local_menu_bar_menus.
* src/keyboard.h (read_char): Update declaration.
* src/lread.c (read_filtered_event): Adjust call to read_char.
* lisp/cus-start.el (all): Remove inhibit-local-menu-bar-menus.
Dmitry Antipov [Mon, 11 Feb 2013 10:21:52 +0000 (14:21 +0400)]
* marker.c (set_marker_internal): If desired position is passed
as a marker, avoid call to buf_charpos_to_bytepos.
* window.c (Fset_window_point): Omit redundant type checking.
(Fset_window_start): Likewise. Format comment.
(window_scroll_pixel_based): Use set_marker_restricted_both
with character and byte positions obtained from an iterator.
(Fset_window_configuration): Use set_marker_restricted_both.
* xdisp.c (message_dolog): Likewise.
Eli Zaretskii [Sun, 10 Feb 2013 16:49:09 +0000 (18:49 +0200)]
Speed up some redisplay operations with very long lines (Bug#13675).
src/xdisp.c (move_it_vertically_backward, move_it_by_lines): When
text lines are longer than window's screen lines, don't move back
too far. This speeds up some redisplay operations.
Paul Eggert [Sat, 9 Feb 2013 22:42:33 +0000 (14:42 -0800)]
Minor hashing refactoring.
* fns.c (SXHASH_REDUCE): Move to lisp.h.
(sxhash_float): Return EMACS_UINT, for consistency with the other
hash functions.
* lisp.h (INTMASK): Now a macro, since SXHASH_REDUCE is now a
non-static inline function and therefore can't use static vars.
(SXHASH_REDUCE): Move here from fns.c, and make it inline.
* profiler.c (hashfn_profiler): Use SXHASH_REDUCE, to be consistent
with the other hash functions.
Eli Zaretskii [Sat, 9 Feb 2013 16:36:53 +0000 (18:36 +0200)]
Fix bug #13661 with w32-downcase-file-names and shell-command.
src/callproc.c (Fcall_process_region): Make sure the XXXXXX part of
the temporary file pattern is not downcased even when
w32-downcase-file-names is non-nil.
Tassilo Horn [Sat, 9 Feb 2013 09:58:48 +0000 (10:58 +0100)]
* doc-view.el: Use (and prefer) soffice as default ODF->PDF
converter (Bug#13622). Patch provided by Jambunathan K
<kjambunathan@gmail.com>.
(doc-view-unoconv-program): Make obsolete variable.
(doc-view-odf->pdf-converter-program): New variable.
(doc-view-odf->pdf-converter-function): New variable.
(doc-view-mode-p): Use it.
(doc-view-odf->pdf-converter-unoconv): Rename from
`doc-view-odf->pdf-converter-unoconv'.
(doc-view-odf->pdf-converter-soffice): New function.
(doc-view-convert-current-doc): Use
`doc-view-odf->pdf-converter-function'.
Aidan Gauland [Fri, 8 Feb 2013 15:07:03 +0000 (10:07 -0500)]
* lisp/eshell: Minor fixes.
* lisp/eshell/em-ls.el (show-almost-all): Declare.
(eshell-do-ls): Add support for -A argument.
* lisp/eshell/esh-proc.el (eshell/kill): Rewrite.
Dmitry Antipov [Fri, 8 Feb 2013 14:44:53 +0000 (18:44 +0400)]
* search.c (scan_buffer): Calculate end byte position just once.
(scan_newline): Do not recalculate start_byte.
(search_command): Use eassert.
* syntax.c (struct lisp_parse_state): New member location_byte.
(scan_sexps_forward): Record from_byte and avoid redundant
character to byte position calculation ...
(Fparse_partial_sexp): ... here. Break too long line.
Dmitry Antipov [Thu, 7 Feb 2013 16:09:04 +0000 (20:09 +0400)]
* coding.c (Fdefine_coding_system_internal): Use AREF where
argument is known to be a vector.
* fns.c (Flocale_info): Likewise for ASET.
* xselect.c (selection_data_to_lisp_data): Likewise for ASET.
* w32fns.c (w32_parse_hot_key): Likewise for ASIZE and AREF.
* src/nsmenu.m (update_frame_tool_bar): Check for negative tool bar
height.
* src/nsterm.h (HAVE_NATIVE_FS): Define if OSX => 10.7.
(EmacsView): Add fs_is_native, fsIsNative, isFullscreen and
updateCollectionBehaviour.
* src/nsterm.m (NEW_STYLE_FS): Remove.
(ns_last_use_native_fullscreen): New variable.
(x_make_frame_visible): Replace NEW_STYLE_FS with isFullscreen.
(x_set_window_size): Do not take title bar and tool bar into account
if isFullscreen returns YES.
(ns_fullscreen_hook): Replace NEW_STYLE_FS with isFullscreen.
(check_native_fs): New function.
(ns_select, ns_read_socket): Call check_native_fs if HAVE_NATIVE_FS.
(ns_term_init): Remove NEW_STYLE_FS.
(updateFrameSize:, windowWillResize:toSize:): Only adjust for title bar
and tool bar if isFullscreen returns NO.
(windowDidResize:): Replace NEW_STYLE_FS with fsIsNative.
(initFrameFromEmacs:): Initialize fs_is_native. Replace NEW_STYLE_FS
with HAVE_NATIVE_FS.
(window:willUseFullScreenPresentationOptions:): New method.
(windowDidEnterFullScreen:): Replace NEW_STYLE_FS with fsIsNative.
Hide toolbar if not enabled.
(windowDidExitFullScreen:): Call updateCollectionBehaviour.
Restore tool bar if enabled, hide it otherwise (Bug#13444).
(fsIsNative, isFullscreen, updateCollectionBehaviour): New methods.
(toggleFullScreen:): If fs_is_native, call toggleFullScreen on
window. Do no set FRAME_EXTERNAL_TOOL_BAR (f) to 0.
Check FRAME_EXTERNAL_TOOL_BAR (f) before restoring
FRAME_TOOLBAR_HEIGHT (f). Call updateFrameSize when going non-fs.
(syms_of_nsterm): Add ns-use-native-fullscreen.