1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00
Commit Graph

292 Commits

Author SHA1 Message Date
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Paul Eggert
22bcf20469 Spelling fixes. 2011-12-30 17:27:15 -08:00
Paul Eggert
c80e3b4aed Spelling fixes. 2011-12-04 00:02:42 -08:00
Paul Eggert
e47695319f Spelling fixes. 2011-11-26 20:43:11 -08:00
Juanma Barranquero
fe7a3057a3 Fix typos. 2011-11-20 20:35:27 +01:00
Juanma Barranquero
7877f37394 Fix typos. 2011-11-16 18:47:25 +01:00
Paul Eggert
8350f087ef Spelling fixes. 2011-11-14 12:23:26 -08:00
Eli Zaretskii
0bb2392728 Support bidi reordering of overlay and display strings.
Fix bugs #7616, #8133, #8867.

 src/xdisp.c (compute_display_string_pos)
 (compute_display_string_end): Accept additional argument STRING.
 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
 (reseat_to_string): Initialize bidi_it->string.s and
 bidi_it->string.schars.
 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
 NULL (avoids a crash in bidi_paragraph_init).  Initialize
 itb.string.lstring.
 (init_iterator): Call bidi_init_it only of a valid
 buffer position was specified.  Initialize paragraph_embedding to
 L2R.
 (reseat_to_string): Initialize the bidi iterator.
 (display_string): If we need to ignore text properties of
 LISP_STRING, set IT->stop_charpos to IT->end_charpos.  (The
 original value of -1 will not work with bidi.)
 (compute_display_string_pos): First arg is now struct
 `text_pos *'; all callers changed.  Support display properties on
 Lisp strings.
 (compute_display_string_end): Support display properties on Lisp
 strings.
 (init_iterator, reseat_1, reseat_to_string): Initialize the
 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
 when iterating on a string not from display properties).
 (compute_display_string_pos, compute_display_string_end): Fix
 calculation of the object to scan.  Fixes an error when using
 arrow keys.
 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
 base_level_stop; instead, set base_level_stop to BEGV.  Fixes
 crashes in vertical-motion.
 (next_element_from_buffer): Improve commentary for when
 the iterator is before prev_stop.
 (init_iterator): Initialize bidi_p from the default value of
 bidi-display-reordering, not from buffer-local value.  Use the
 buffer-local value only if initializing for buffer iteration.
 (handle_invisible_prop): Support invisible properties on strings
 that are being bidi-reordered.
 (set_iterator_to_next): Support bidi reordering of C strings and
 Lisp strings.
 (next_element_from_string): Support bidi reordering of Lisp
 strings.
 (handle_stop_backwards): Support Lisp strings as well.
 (display_string): Support display of R2L glyph rows.  Use
 IT_STRING_CHARPOS when displaying from a Lisp string.
 (init_iterator): Don't initialize it->bidi_p for strings
 here.
 (reseat_to_string): Initialize it->bidi_p for strings here.
 (next_element_from_string, next_element_from_c_string)
 (next_element_from_buffer): Add xassert's for correspondence
 between IT's object being iterated and it->bidi_it.string
 structure.
 (face_before_or_after_it_pos): Support bidi iteration.
 (next_element_from_c_string): Handle the case of the first string
 character that is not the first one in the visual order.
 (get_visually_first_element): New function, refactored from common
 parts of next_element_from_buffer, next_element_from_string, and
 next_element_from_c_string.
 (tool_bar_lines_needed, redisplay_tool_bar)
 (display_menu_bar): Force left-to-right direction.  Add a FIXME
 comment for making that be controlled by a user option.
 (push_it, pop_it): Save and restore the state of the
 bidi iterator.  Save and restore the bidi_p flag.
 (pop_it): Iterate out of display property for string iteration as
 well.
 (iterate_out_of_display_property): Support iteration over strings.
 (handle_single_display_spec): Set up it->bidi_it for iteration
 over a display string, and call bidi_init_it.
 (handle_single_display_spec, next_overlay_string)
 (get_overlay_strings_1, push_display_prop): Set up the bidi
 iterator for displaying display or overlay strings.
 (forward_to_next_line_start): Don't use the shortcut if
 bidi-iterating.
 (back_to_previous_visible_line_start): If handle_display_prop
 pushed the iterator stack, restore the internal state of the bidi
 iterator by calling bidi_pop_it same number of times.
 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
 and we are bidi-iterating, don't decrement the iterator position;
 instead, set the first_elt flag in the bidi iterator, to produce
 the same effect.
 (reseat_1): Remove redundant setting of string_from_display_prop_p.
 (push_display_prop): xassert that we are iterating a buffer.
 (push_it, pop_it): Save and restore paragraph_embedding member.
 (handle_single_display_spec, next_overlay_string)
 (get_overlay_strings_1, reseat_1, reseat_to_string)
 (push_display_prop): Set up the `unibyte' member of bidi_it.string
 correctly.  Don't assume unibyte strings are not bidi-reordered.
 (compute_display_string_pos)
 (compute_display_string_end): Fix handling the case of C string.
 (push_it, pop_it): Save and restore from_disp_prop_p.
 (handle_single_display_spec, push_display_prop): Set the
 from_disp_prop_p flag.
 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
 (pop_it): Call iterate_out_of_display_property only if we are
 popping after iteration over a string that came from a display
 property.  Fix a typo in popping stretch info.  Add an assertion
 for verifying that the iterator position is in sync with the bidi
 iterator.
 (handle_single_display_spec, get_overlay_strings_1)
 (push_display_prop): Fix initialization of paragraph direction for
 string when that of the parent object is not yet determined.
 (reseat_1): Call bidi_init_it to resync the bidi
 iterator with IT's position.  (Bug#7616)
 (find_row_edges): If ROW->start.pos gives position
 smaller than min_pos, use it as ROW->minpos.  (Bug#7616)
 (handle_stop, back_to_previous_visible_line_start, reseat_1):
 Reset the from_disp_prop_p flag.
 (SAVE_IT, RESTORE_IT): New macros.
 (pos_visible_p, face_before_or_after_it_pos)
 (back_to_previous_visible_line_start)
 (move_it_in_display_line_to, move_it_in_display_line)
 (move_it_to, move_it_vertically_backward, move_it_by_lines)
 (try_scrolling, redisplay_window, display_line): Use them when
 saving a temporary copy of the iterator and restoring it back.
 (back_to_previous_visible_line_start, reseat_1)
 (init_iterator): Empty the bidi cache "stack".
 (move_it_in_display_line_to): If iterator ended up at
 EOL, but we never saw any buffer positions smaller than
 to_charpos, return MOVE_POS_MATCH_OR_ZV.  Fixes vertical cursor
 motion in bidi-reordered lines.
 (move_it_in_display_line_to): Record prev_method and prev_pos
 immediately before the call to set_iterator_to_next.  Fixes cursor
 motion in bidi-reordered lines with stretch glyphs and strings
 displayed in margins.  (Bug#8133) (Bug#8867)
 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
 TO_CHARPOS.
 (pos_visible_p): Support positions in bidi-reordered lines.  Save
 and restore bidi cache.
 src/bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
 (bidi_paragraph_info): Delete unused struct.
 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
 (bidi_cache_start): New variable.
 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
 to zero.
 (bidi_cache_fetch_state, bidi_cache_search)
 (bidi_cache_find_level_change, bidi_cache_iterator_state)
 (bidi_cache_find, bidi_peek_at_next_level)
 (bidi_level_of_next_char, bidi_find_other_level_edge)
 (bidi_move_to_visually_next): Compare cache index with
 bidi_cache_start rather than with zero.
 (bidi_fetch_char): Accept new argument STRING; all callers
 changed.  Support iteration over a string.  Support strings with
 display properties.  Support unibyte strings.  Fix the type of
 `len' according to what STRING_CHAR_AND_LENGTH expects.
 (bidi_paragraph_init, bidi_resolve_explicit_1)
 (bidi_resolve_explicit, bidi_resolve_weak)
 (bidi_level_of_next_char, bidi_move_to_visually_next): Support
 iteration over a string.
 (bidi_set_sor_type, bidi_resolve_explicit_1)
 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
 can now be zero (for strings); special values 0 and -1 were
 changed to -1 and -2, respectively.
 (bidi_char_at_pos): New function.
 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
 Call it instead of FETCH_MULTIBYTE_CHAR.
 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
 initialized to valid values.
 (bidi_init_it): Don't initialize charpos and bytepos with invalid
 values.
 (bidi_level_of_next_char): Allow the sentinel "position" to pass
 the test for valid cached positions.  Fix the logic for looking up
 the sentinel state in the cache.  GCPRO the Lisp string we are
 iterating.
 (bidi_push_it, bidi_pop_it): New functions.
 (bidi_initialize): Initialize the bidi cache start stack pointer.
 (bidi_cache_ensure_space): New function, refactored from part of
 bidi_cache_iterator_state.  Don't assume the required size is just
 one BIDI_CACHE_CHUNK away.
 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
 (bidi_count_bytes, bidi_char_at_pos): New functions.
 (bidi_cache_search): Don't assume bidi_cache_last_idx is
 always valid if bidi_cache_idx is valid.
 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
 is valid if it's going to be used.
 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
 (bidi_cache_fetch_state, bidi_cache_search)
 (bidi_cache_find_level_change, bidi_cache_ensure_space)
 (bidi_cache_iterator_state, bidi_cache_find)
 (bidi_find_other_level_edge, bidi_cache_start_stack): All
 variables related to cache indices are now EMACS_INT.
 src/dispextern.h (struct bidi_string_data): New structure.
 (struct bidi_it): New member `string'.  Make flag members be 1-bit
 fields, and put them last in the struct.
 (compute_display_string_pos, compute_display_string_end): Update
 prototypes.
 (bidi_push_it, bidi_pop_it): Add prototypes.
 (struct iterator_stack_entry): New members bidi_p,
 paragraph_embedding, and from_disp_prop_p.
 (struct it): Member bidi_p is now a bit field 1 bit wide.
 (bidi_shelve_cache, bidi_unshelve_cache): Declare
 prototypes.
 src/.gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
 and vector-like objects.
 src/dispnew.c (buffer_posn_from_coords): Save and restore the bidi
 cache around display iteration.
 src/window.c (Fwindow_end, window_scroll_pixel_based)
 (displayed_window_lines, Frecenter): Save and restore the bidi
 cache around display iteration.
 lisp/buff-menu.el (Buffer-menu-buffer+size): Accept an additional
 argument LRM; if non-nil, append an invisible LRM character to the
 buffer name.
 (list-buffers-noselect): Call Buffer-menu-buffer+size with the
 last argument non-nil, when formatting buffer names.
 (Buffer-menu-mode, list-buffers-noselect): Force left-to-right
 paragraph direction.
 doc/lispref/display.texi (Other Display Specs): Document that `left-fringe'
 and `right-fringe' display specifications are of the "replacing"
 kind.
2011-07-14 20:28:42 +03:00
Glenn Morris
38125d2ba2 * etc/TODO: Remove some things that got to-done. 2011-06-29 19:56:12 -07:00
Eli Zaretskii
cc7245e4b5 Tried and abandoned idea of displaying mode line and tool/menu-bars R2L.
Added those features to etc/TODO wishlist.
Fixed src/.gdbinit for changes in Lisp vector structures.

 src/.gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
 and vector-like objects.
2011-06-18 16:28:53 +03:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
e9bffc61f2 Refill some copyright headers. 2011-01-15 18:21:30 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Glenn Morris
88edf64cbf * etc/TODO: Updates; and re-fill some lines. 2010-12-10 18:39:41 -08:00
Glenn Morris
8521e69b33 Merge nextstep/FOR-RELEASE outstanding issues into etc/TODO. 2010-10-11 21:01:55 -07:00
Glenn Morris
3d91f78986 * lisp/nxml/TODO: Remove.
* etc/NEWS: Move nxml TODO items here.
2010-09-08 19:34:25 -07:00
Glenn Morris
ae2cc2d8e7 * README.imagemagick: Remove.
* etc/NEWS: Move remaining ImageMagick items here.
2010-09-08 19:30:31 -07:00
Stefan Monnier
fd67a7000e Merge from emacs-23 2010-05-31 22:34:49 -04:00
Stefan Monnier
605d1fd9a9 CEDET is not TODO any more 2010-05-24 20:57:43 -04:00
Stefan Monnier
7eca871a82 Mention multi-planes text-properties 2010-05-24 16:48:46 -04:00
Glenn Morris
38b8b32648 * etc/TODO: prog-mode updates. 2010-05-18 19:56:44 -07:00
Juri Linkov
dc2d2590b2 Make occur handle multi-line matches cleanly with context.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01280.html

* replace.el (occur-accumulate-lines): Add optional arg `pt'.
(occur-engine): Add local variables `ret', `prev-after-lines',
`prev-lines'.  Use more arguments for `occur-context-lines'.
Set first elem of its returned list to `data', and the second elem
to `prev-after-lines'.  Don't print the separator line.
In the end, print remaining context after-lines.
(occur-context-lines): Add new arguments `begpt', `endpt',
`lines', `prev-lines', `prev-after-lines'.  Rewrite to combine
after-lines of the previous match with before-lines of the
current match and not overlap them.  Return a list with two
values: the output line and the list of context after-lines.

* search.texi (Other Repeating Search): Remove line that `occur'
can not handle multiline matches.

* occur-testsuite.el (occur-tests): Add tests for context lines.
2010-03-30 19:03:08 +03:00
Juri Linkov
774642e549 Implement Occur multi-line matches.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01044.html

* replace.el (occur): Doc fix.
(occur-engine): Set `begpt' to the beginning of the first line.
Set `endpt' to the end of the last match line.  At first, count
line numbers between `origpt' and `begpt'.  Split out code from
`out-line' variable to new let-bindings `match-prefix' and
`match-str'.  In `out-line' add non-numeric prefix to all
non-first lines of multi-line matches.  Finally, count lines
between `begpt' and `endpt' and add to `lines'.
2010-03-23 18:09:45 +02:00
Stefan Monnier
bbbab483c4 Start laying out a plan for Emacs-24 2010-03-07 15:08:38 -05:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Juri Linkov
e0987650e4 (dired-get-filename)<declare-function>:
Tell the byte-compiler about dired-get-filename.
(shell-command): In Dired mode, get filename from the current line
as the default value.
2009-11-11 00:11:40 +00:00
Chong Yidong
cbdf1202c9 Fix URL (Bug#4521). 2009-09-25 03:24:52 +00:00
Glenn Morris
115f44b62d Add generated-autoload-file item. 2009-09-11 06:51:58 +00:00
Dan Nicolaescu
1fb6109b78 emacsclient already accepts -nw. 2009-08-21 06:16:07 +00:00
Glenn Morris
b2de63e7b6 --daemon was done some time ago. 2009-08-18 07:32:46 +00:00
Glenn Morris
d198332302 Minor modes via local variables:
2009-08-17  Chong Yidong  <cyd at stupidchicken.com>

        * files.el (hack-one-local-variable): If the mode function is for
        a minor mode, pass it an argument (Bug#4148).
2009-08-18 07:32:19 +00:00
Juri Linkov
b36f028e9e Remove "Add a command to make a Local Variables section in the current buffer". 2009-08-04 23:51:11 +00:00
Chong Yidong
57b7fad645 Entry removed:
** Implement something better than the current Refill mode.
2009-07-26 17:26:29 +00:00
Chong Yidong
1a205eae91 Entry removed:
** "Options -> Save Options" should save the font set via "Set Font/Fontset"
2009-07-26 17:24:13 +00:00
Juri Linkov
e9e0f2822f Delete task for replacing finder.el with Info manual. 2009-07-18 21:04:15 +00:00
Glenn Morris
63e51ddd1d Add defcustom trivia. 2009-03-12 06:27:21 +00:00
Glenn Morris
bb65542c44 Add 2009 to copyright years. 2009-01-08 05:11:56 +00:00
Glenn Morris
48abcfcc72 *** empty log message *** 2008-09-20 19:50:42 +00:00
Daiki Ueno
29c068d1d1 Remove the entry describing auto-encryption. 2008-09-08 03:22:11 +00:00
Glenn Morris
8b5e9361c0 face-remap was installed.
help has forward buttons.
SYNC_INPUT is the default.
keymap bug was fixed.
2008-09-06 02:26:13 +00:00
Martin Rudalics
b1a345eeaa *** empty log message *** 2008-08-23 08:11:51 +00:00
Dan Nicolaescu
bfb906ac17 Remove done items. Add a new one. 2008-08-06 03:46:11 +00:00
Glenn Morris
6772c8e169 American English spelling fix. 2008-06-27 02:41:14 +00:00
Eli Zaretskii
400aaed216 Large file support in MS-Windows `stat' is done. 2008-06-23 21:08:22 +00:00
Glenn Morris
ab73e885f0 Switch to recommended form of GPLv3 permissions notice. 2008-05-15 07:32:14 +00:00
Dan Nicolaescu
cea6009118 *** empty log message *** 2008-04-30 16:10:58 +00:00
Dan Nicolaescu
a45868562f *** empty log message *** 2008-04-10 15:05:46 +00:00
Chong Yidong
d73803e635 ** Add a defcustom that supplies a function to name numeric backup files,
like make-backup-file-name-function for non-numeric backup files.
2008-04-08 01:24:07 +00:00
Dan Nicolaescu
479be3f4ba *** empty log message *** 2008-04-04 22:29:55 +00:00