Michael Albinus [Thu, 14 Feb 2013 13:32:04 +0000 (14:32 +0100)]
* net/tramp.el (tramp-debug-message): Add
`tramp-condition-case-unless-debug'.
(tramp-debug-on-error): New defvar.
(tramp-condition-case-unless-debug): New defun.
(tramp-file-name-handler): Use it.
Juri Linkov [Thu, 14 Feb 2013 09:15:55 +0000 (11:15 +0200)]
* lisp/info.el (Info-isearch-filter): Treat non-nil values of
`search-invisible' including its default value `open'
like the value `t' to match hidden text.
Dmitry Gutov [Thu, 14 Feb 2013 05:45:33 +0000 (09:45 +0400)]
(ruby-add-log-current-method): Improve performance at the expense
of accuracy. `ruby-block-contains-point' is relatively slow, so
only use it for method and singleton class blocks.
* test/automated/ruby-mode-tests.el
(ruby-add-log-current-method-after-inner-class): Lower
expectations: move point inside a method, initially.
Dmitry Gutov [Thu, 14 Feb 2013 03:33:55 +0000 (07:33 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-parse-partial): Don't increase
depth for unfinished percent literal. Not using it in the caller.
(ruby-move-to-block): Jump over multiline literals of all types,
ignoring code-looking contents inside them.
* test/automated/ruby-mode-tests.el
(ruby-move-to-block-skips-percent-literal): Add depth-affecting
bits inside the examples.
(ruby-move-to-block-skips-heredoc): New test.
Jambunathan K [Wed, 13 Feb 2013 15:13:22 +0000 (10:13 -0500)]
* lisp/icomplete.el (icomplete-hide-common-prefix): New user option.
(icomplete-first-match): New face.
(icomplete-completions): Correct handling of "complete but not unique".
Stefan Monnier [Wed, 13 Feb 2013 13:40:00 +0000 (08:40 -0500)]
* lisp/tmm.el: Use lexical-binding and current-active-maps.
(tmm-menubar): Use map-keymap and pcase.
(tmm--completion-table): New function.
(tmm-prompt): Use it to fix the menu order.
(tmm-get-keybind): Use current-active-maps.
* locate.el (locate-mode): Set parent mode property to dired-mode.
* find-dired.el (find-dired): Call dired-insert-set-properties on
initial information line. Set process mark on end of buffer.
(find-dired-sentinel):
Call dired-insert-set-properties on summary.
* dired.el (dired-hide-details-hide-symlink-targets)
(dired-hide-details-hide-information-lines): New options.
(dired-insert-directory):
Set properties after final treatment of output.
(dired-insert-set-properties):
Set dired-hide-details-* properties.
(dired-mode-map): Bind dired-hide-details-mode.
(dired-mode): Set buffer-invisibility-spec to a list.
(dired-next-line): Skip hidden lines.
(dired-previous-line): Use dired-next-line.
(dired-hide-details-mode): New minor mode.
(dired-hide-details-update-invisibility-spec): New function.
Juri Linkov [Wed, 13 Feb 2013 08:28:47 +0000 (10:28 +0200)]
Add more keymaps where S-SPC scrolls in the opposite direction to SPC.
* lisp/image-mode.el (image-mode-map):
* lisp/doc-view.el (doc-view-mode-map):
* lisp/vc/ediff-util.el (ediff-setup-keymap):
Make S-SPC scroll in the opposite sense to SPC.
* lisp/gnus/gnus-art.el (gnus-article-mode-map):
* lisp/gnus/gnus-sum.el (gnus-summary-mode-map, gnus-summary-article-map):
Make S-SPC scroll in the opposite sense to SPC. (Bug#2145)
Dmitry Gutov [Wed, 13 Feb 2013 08:15:05 +0000 (12:15 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-move-to-block): Improve
performance. Instead of recalculating indentation fully for each
line, sum up indentation depth based only on visited lines.
(ruby-parse-partial): Increase the depth after "do" even when END
is right after it.
(ruby-parse-partial): When END is in the middle of a percent
literal, increase the depth if the delimiter chars belong to the
paren syntax class.
* test/automated/ruby-mode-tests.el
(ruby-move-to-block-skips-percent-literal): New test.
Dmitry Antipov [Wed, 13 Feb 2013 07:14:38 +0000 (11:14 +0400)]
* font.c (font_range): Add pos_byte argument. Adjust comment
and break long line.
* font.h (font_range): Adjust prototype.
* composite.c (autocmp_chars): Pass byte position to font_range.
Break long line. Remove useless prototype and format comment.
Paul Eggert [Tue, 12 Feb 2013 18:43:11 +0000 (10:43 -0800)]
Improve AIX port some more.
With this, it should be as good as it was in 23.3, though it's
still pretty bad: the dumped emacs does not run. See Mark Fleishman in
http://lists.gnu.org/archive/html/help-gnu-emacs/2011-04/msg00287.html
* unexaix.c (start_of_text): Remove.
(_data, _text): Declare as char[], not int, as AIX manual suggests.
(bias, lnnoptr, text_scnptr, data_scnptr, load_scnptr)
(orig_load_scnptr, orig_data_scnptr):
Now off_t, not long, since they are file offsets.
(make_hdr): Use _data, not start_of_data ().
This is the key part of the fix.
(make_hdr, unrelocate_symbols): Use off_t for file offsets.
(unrelocate_symbols): Cast pointers to intptr_t, not to ulong.
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.
Paul Eggert [Mon, 11 Feb 2013 20:32:54 +0000 (12:32 -0800)]
Improve AIX port.
This doesn't fix the bug, but it makes progress: Emacs builds now.
* unexaix.c: Include inttypes.h, stdarg.h.
(report_error, report_error_1): Mark as _Noreturn.
(report_error): Don't report the wrong errno.
(report_error_1): Now varargs. All callers changed.
(make_hdr): Use uintptr_t, not unsigned, when converting pointers
to unsigned. Don't use ADDR_CORRECT, as it no longer exists.
(write_ptr): Use %p to print address rather than %lx and a cast
to unsigned long. Grow buffer a bit, to be safer.
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.
Eli Zaretskii [Mon, 11 Feb 2013 17:27:48 +0000 (19:27 +0200)]
Fix rare aborts in bidi.c.
src/bidi.c (bidi_resolve_neutral): After finding the next
non-neutral character, accept NEUTRAL_ON type as well, because
directional control characters, such as LRE and RLE, have their
type converted to that by bidi_resolve_weak. This avoids aborts
when LRE/RLE follows a run of neutrals.
(bidi_move_to_visually_next): Assert that return value of
bidi_peek_at_next_level is non-negative. Negative values will
cause an infloop.
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'.