Eli Zaretskii [Sat, 22 May 2010 19:32:21 +0000 (22:32 +0300)]
Redesign bidi-aware edge positions of glyph rows, fix bug #6036.
dispextern.h (struct glyph_row): New members minpos and maxpos.
(MATRIX_ROW_START_CHARPOS, MATRIX_ROW_START_BYTEPOS)
(MATRIX_ROW_END_CHARPOS, MATRIX_ROW_END_BYTEPOS): Reference minpos
and maxpos members instead of start.pos and end.pos, respectively.
xdisp.c (display_line): Compare IT_CHARPOS with the position in
row->start.pos, rather than with MATRIX_ROW_START_CHARPOS.
(cursor_row_p): Use row->end.pos rather than MATRIX_ROW_END_CHARPOS.
(try_window_reusing_current_matrix, try_window_id): Use
ROW->minpos rather than ROW->start.pos.
(init_from_display_pos, init_iterator): Use EMACS_INT for
character and byte positions.
(find_row_edges): Renamed from find_row_end. Accept additional
arguments for minimum and maximum buffer positions seen by
display_line for this row. Don't use iterator to find the
position following the maximum one; instead, increment the
position found by display_line directly. Fix logic; eol_pos
should be tested before the rest. Handle the case of characters
delivered from display vector (bug#6036). Fix tests related to
it->method. Handle the truncated_on_right_p rows.
(RECORD_MAX_MIN_POS): New macro.
(display_line): Use it to record the minimum and maximum buffer
positions for glyphs in the row being assembled. Record the
position of the newline that terminates the line. If word wrap is
in effect, restore minimum and maximum positions seen up to the
wrap point, when iterator returns to it.
(try_window_reusing_current_matrix): Give up if in bidi-reordered
row and cursor not already at point. Restore original pre-bidi
code for unidirectional buffers.
dispnew.c (increment_row_positions, check_matrix_invariants):
Increment and check row->start.pos and row->end.pos, in addition
to MATRIX_ROW_START_CHARPOS and MATRIX_ROW_END_CHARPOS.
.gdbinit (prowlims): Display row->minpos and row->maxpos.
Display truncated_on_left_p and truncated_on_right_p flags.
Formatting fixes.
(pmtxrows): Display the ordinal number of each row. Don't display
rows beyond the last one.
bidi.c (bidi_cache_iterator_state): Don't zero out new_paragraph:
it is not copied by bidi_copy_it.
Juri Linkov [Fri, 21 May 2010 20:43:04 +0000 (23:43 +0300)]
* progmodes/grep.el (grep-read-files): Fix multi-pattern aliases.
Remove "all" from grep-files-aliases. Split grep-files-aliases by
whitespace, call wildcard-to-regexp on substrings and concat them
with "\\|". (Bug#6114)
Chong Yidong [Fri, 21 May 2010 17:29:27 +0000 (13:29 -0400)]
Improve image cache clearing logic (Bug#6230).
* xdisp.c (redisplay_internal): Clear caches even if redisplaying
just one window.
* image.c (Vimage_cache_eviction_delay): Decrease to 300.
(clear_image_cache): If the number of cached images is unusually
large, decrease the cache eviction delay.
Glenn Morris [Fri, 21 May 2010 00:48:14 +0000 (17:48 -0700)]
Handle some HAVE_NS Makefile conditionals with configure.
* configure.in (ns_frag): New output file.
* src/Makefile.in (${ns_appdir}, ${ns_appbindir}Emacs, ns-app):
Move these rules to ns.mk.
* ns.mk: New file. Copyright years based on date of nextstep merge.
Kevin Ryde [Thu, 20 May 2010 23:54:55 +0000 (02:54 +0300)]
* help-mode.el (help-make-xrefs): For Info node links turn
newlines into spaces. Link node names with newlines are matched
by help-xref-info-regexp and buttonized, this change ensures they
can be followed successfully with RET. (Bug#6206)
Juri Linkov [Thu, 20 May 2010 23:08:52 +0000 (02:08 +0300)]
* fileio.c (Fdelete_file): Change interative spec to use
`read-file-name' like in `find-file-read-args' where the default
value is `default-directory' instead of `buffer-file-name'.
http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00533.html
Juri Linkov [Thu, 20 May 2010 21:33:58 +0000 (00:33 +0300)]
* dired-x.el (dired-jump, dired-jump-other-window): Add arg
FILE-NAME to read from the minibuffer when called interactively
with prefix argument instead of using buffer-file-name.
http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00534.html
Glenn Morris [Thu, 20 May 2010 06:11:27 +0000 (23:11 -0700)]
Handle auto-depend with configure.
* make-dist (src): Include *.mk.
* config.bat: Concatenate deps.mk onto the end of src/Makefile.
* configure.in (DEPFLAGS, MKDEPDIR): New output variables.
(deps_frag): New output file.
(AUTO_DEPEND): Remove this definition.
* src/Makefile.in (DEPDIR): New constant.
(DEPFLAGS): Set with configure, not cpp.
(MKDEPDIR): New, set by configure.
(.c.o, .m.o, ecrt0.o): Use $MKDEPDIR.
(clean): Use $DEPDIR.
(deps_frag): Include from configure.
Move static/dynamic dependency stuff to deps.mk/autodeps.mk.
* src/deps.mk, src/autodeps.mk: New files, extracted from Makefile.in.
* msdos/sed1v2.inp (DEPFLAGS, deps_frag): Edit to empty.
(MKDEPDIR): Edit to ':'.
Eli Zaretskii [Wed, 19 May 2010 20:24:21 +0000 (23:24 +0300)]
Completed initial debugging and testing of reimplemented cursor motion.
.gdbinit (prowlims): Display row->minpos and row->maxpos.
Display truncated_on_left_p and truncated_on_right_p flags.
Formatting fixes.
(pmtxrows): Display the ordinal number of each row. Don't display
rows beyond the last one.
xdisp.c (RECORD_MAX_MIN_POS): New macro.
(display_line): Use it to record the minimum and maximum buffer
positions for glyphs in the row being assembled. If word wrap is
in effect, restore minimum and maximum positions seen up to the
wrap point, when iterator returns to it.
(find_row_edges): Fix logic; eol_pos should be tested before the
rest.
(try_window_reusing_current_matrix): Give up if in bidi-reordered
row and cursor not already at point. Restore original pre-bidi
code for unidirectional buffers.
bidi.c (bidi_cache_shrink, bidi_cache_iterator_state): Fix
reallocation of the cache. (Bug#6210)
(bidi_cache_iterator_state): Don't zero out new_paragraph (it is
not copied by bidi_copy_it).
Michael Albinus [Wed, 19 May 2010 12:47:37 +0000 (14:47 +0200)]
* net/secrets.el: Autoload the widget functions.
(secrets-search-items, secrets-create-item)
(secrets-get-attributes, secrets-expand-item): Attributes will be
stored on the password database without leading ":", as all other
clients do as well.
(secrets-mode): Fix docstring.
(secrets-show-secrets): Provide it as autoloaded command only when
D-Bus support is available. Check existence of Secret Service API.
Glenn Morris [Wed, 19 May 2010 02:27:01 +0000 (19:27 -0700)]
* s/aix4-2.h (LINKER): Remove; this file sets ORDINARY_LINK.
In any case, ORDINARY_LINK means uses the C compiler as the LINKER,
so setting LINKER=cc is redundant.
Michael Albinus [Tue, 18 May 2010 19:34:26 +0000 (21:34 +0200)]
Add visualization code for secrets.
* net/secrets.el (secrets-mode): New major mode.
(secrets-show-secrets, secrets-show-collections)
(secrets-expand-collection, secrets-expand-item)
(secrets-tree-widget-after-toggle-function)
(secrets-tree-widget-show-password): New defuns.
Stefan Monnier [Tue, 18 May 2010 19:24:24 +0000 (15:24 -0400)]
* emacs-lisp/smie.el (smie-next-sexp): Break inf-loop at BOB.
(smie-backward-sexp, smie-forward-sexp): Remove boundary condition now
handled in smie-next-sexp.
(smie-indent-calculate): Provide a starting indentation (so the
recursion is well-founded ;-).
Chong Yidong [Tue, 18 May 2010 18:05:43 +0000 (14:05 -0400)]
Fix stack overflow in string creation (Bug#6214).
* character.c (Fstring, Funibyte_string): Use SAFE_ALLOCA to
prevent stack overflow if number of arguments is too large
(Bug#6214).
Stefan Monnier [Tue, 18 May 2010 16:03:51 +0000 (12:03 -0400)]
Fix handling of non-associative equal levels.
* emacs-lisp/smie.el (smie-prec2-levels): Choose distinct levels even
when it's not needed.
(smie-op-left, smie-op-right): New functions.
(smie-next-sexp): New function, extracted from smie-backward-sexp.
Better handle equal levels to distinguish the associative case from
the "multi-keyword construct" case.
(smie-backward-sexp, smie-forward-sexp): Use it.
Eli Zaretskii [Tue, 18 May 2010 15:22:15 +0000 (18:22 +0300)]
Initial reimplementation of calculating line edge positions in bidi lines.
dispextern.h (struct glyph_row): New members minpos and maxpos.
(MATRIX_ROW_START_CHARPOS, MATRIX_ROW_START_BYTEPOS)
(MATRIX_ROW_END_CHARPOS, MATRIX_ROW_END_BYTEPOS): Reference minpos
and maxpos members instead of start.pos and end.pos, respectively.
xdisp.c (display_line): Compare IT_CHARPOS with the position in
row->start.pos, rather than with MATRIX_ROW_START_CHARPOS.
(cursor_row_p): Use row->end.pos rather than MATRIX_ROW_END_CHARPOS.
(try_window_reusing_current_matrix, try_window_id): Use
ROW->minpos rather than ROW->start.pos.
(init_from_display_pos, init_iterator): Use EMACS_INT for
character and byte positions.
(find_row_edges): Renamed from find_row_end. Accept additional
arguments for minimum and maximum buffer positions seen by
display_line for this row. Don't use iterator to find the
position following the maximum one; instead, increment the
position found by display_line directly.
(display_line): Record minimum and maximum buffer positions for
glyphs in this row. Record the position of the newline that
terminates the line.
dispnew.c (increment_row_positions, check_matrix_invariants):
Increment and check row->start.pos and row->end.pos, in addition
to MATRIX_ROW_START_CHARPOS and MATRIX_ROW_END_CHARPOS.