Juri Linkov [Tue, 30 Mar 2010 16:03:08 +0000 (19:03 +0300)]
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.
Eli Zaretskii [Tue, 30 Mar 2010 09:13:07 +0000 (05:13 -0400)]
Initial support for bidirectional editing.
Makefile.in (obj): Include bidi.o.
(bidi.o): New target.
makefile.w32-in (OBJ1): Add $(BLD)/bidi.$(O).
($(BLD)/bidi.$(O)): New target.
bidi.c: New file.
buffer.h (struct buffer): New members bidi_display_reordering
and bidi_paragraph_direction.
buffer.c (init_buffer_once): Initialize bidi_display_reordering
and bidi_paragraph_direction.
(syms_of_buffer): Declare Lisp variables bidi-display-reordering
and bidi-paragraph-direction.
(Fbuffer_swap_text): Swap the values of
bidi_display_reordering and bidi_paragraph_direction.
dispextern.h (BIDI_MAXLEVEL, BIDI_AT_BASE_LEVEL): New macros.
(bidi_type_t, bidi_dir_t): New types.
(bidi_saved_info, bidi_stack, bidi_it): New structures.
(struct it): New members bidi_p, bidi_it, paragraph_embedding,
prev_stop, base_level_stop, and eol_pos.
(bidi_init_it, bidi_get_next_char_visually): New prototypes.
(IT_STACK_SIZE): Enlarge to 5.
(struct glyph_row): New member reversed_p.
<string_buffer_position>: Update prototype.
(PRODUCE_GLYPHS): Set the reversed_p flag in the iterator's
glyph_row if bidi_it.paragraph_dir == R2L.
(struct glyph): New members resolved_level and bidi_type.
dispnew.c (direct_output_forward_char): Give up if we need bidi
processing or buffer's direction is right-to-left.
(prepare_desired_row): Preserve the reversed_p flag.
(row_equal_p): Compare the reversed_p attributes as well.
xdisp.c (init_iterator): Initialize it->bidi_p. Call
bidi_init_it and set it->paragraph_embedding from the current
buffer's value of bidi_paragraph_direction.
(reseat_1): Initialize bidi_it.first_elt.
(set_iterator_to_next, next_element_from_buffer): Use the value of
paragraph_embedding to determine the paragraph direction.
(set_iterator_to_next): Under bidi reordering, call
bidi_get_next_char_visually. Call bidi_paragraph_init if the
new_paragraph flag is set in the bidi iterator.
(next_element_from_buffer): If bidi_it.first_elt is set,
initialize paragraph direction and find the first character to
display in the visual order. If reseated to a middle of a line,
prime the bidi iterator starting at the line's beginning. Handle
the situation where we overstepped stop_charpos due to
non-linearity of the bidi iteration. Likewise for when we back up
beyond the previous stop_charpos. When moving across stop_charpos,
record it in prev_stop.
(display_line): Set row->end and it->start for the next row to the
next character in logical order. Always extend reversed_p rows to
the end of line, even if they end at ZV. Copy the reversed_p flag
to the next glyph row. Keep calling set_cursor_from_row for
bidi-reordered rows even if we already have a possible candidate
for cursor position. Set row_end after all the row's glyphs have
been produced, by looping over the glyphs. Record the position
after EOL in it->eol_pos, and use it to set end_pos of the last
row produced for a continued line.
<Qright_to_left, Qleft_to_right>: New variables.
(syms_of_xdisp): Initialize and staticpro them.
(string_buffer_position_lim): New function.
(string_buffer_position): Most of code moved to
string_buffer_position_lim. Last argument and return value are
now EMACS_INT; all callers changed.
(set_cursor_from_row): Rewritten to support bidirectional text and
reversed glyph rows.
(text_outside_line_unchanged_p, try_window_id): Disable
optimizations if we are reordering bidirectional text and the
paragraph direction can be affected by the change.
(append_glyph, append_composite_glyph)
(produce_image_glyph, append_stretch_glyph): Set the
resolved_level and bidi_type members of each glyph.
(append_glyph): If the glyph row is reversed, prepend the glyph
rather than appending it.
(handle_stop_backwards): New function.
(reseat_1, pop_it, push_it): Set prev_stop and base_level_stop.
(reseat): call handle_stop_backwards to recompute prev_stop and
base_level_stop for the new position.
(handle_invisible_prop): Under bidi iteration, skip invisible text
using bidi_get_next_char_visually. If we are `reseat'ed, init the
paragraph direction. Update IT->prev_stop after skipping
invisible text.
(move_it_in_display_line_to): New variables prev_method
and prev_pos. Compare for strict equality in
BUFFER_POS_REACHED_P.
(try_cursor_movement): Examine all the candidate rows that occlude
point, to return the best match. If rows are bidi-reordered
and point moved backwards, back up to the row that is not a
continuation line, and start looking for a suitable row from
there.
term.c (append_glyph): Reverse glyphs by pre-pending them,
rather than appending, if the glyph_row's reversed_p flag is set.
Set the resolved_level and bidi_type members of each glyph.
.gdbinit (pbiditype): New command.
(pgx): Use it to display bidi level and type of the glyph.
(pitx): Display some bidi information about the iterator.
(prowlims, pmtxrows): New commands.
files.el: Make bidi-display-reordering safe variable for boolean
values.
mule.texi (International): Mention support of bidirectional editing.
(Bidirectional Editing): New section.
HELLO: Reorder Arabic and Hebrew into logical order, and
insert RLM before the opening paren, to make the display more
reasonable. Add setting for bidi-display-reordering in the local
variables section.
NEWS: Mention initial support for bidirectional editing.
Katsumi Yamaoka [Tue, 30 Mar 2010 04:44:38 +0000 (04:44 +0000)]
2010-03-30 Martin Stjernholm <mast@lysator.liu.se>
* mm-decode.el (mm-add-meta-html-tag): Added option to override the
charset.
* gnus-art.el (gnus-article-browse-html-parts): Force the correct
charset into the <meta> tag when the article is encoded to utf-8.
Katsumi Yamaoka [Tue, 30 Mar 2010 04:03:00 +0000 (04:03 +0000)]
2010-03-30 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-article-browse-delete-temp-files): Delete
directories as well.
(gnus-article-browse-html-parts): Work for images that do not specify
file names; delete temp directory when quitting; insert header at the
right place; use file: scheme for image files.
2010-03-30 Eric Schulte <schulte.eric@gmail.com>
* gnus-art.el (gnus-article-browse-html-save-cid-image): New function.
(gnus-article-browse-html-parts): Use it to make temporary cid image
files in addition to html file so that browser may display them.
Chong Yidong [Mon, 29 Mar 2010 23:18:48 +0000 (19:18 -0400)]
* subr.el: Extend progress reporters to perform "spinning".
(progress-reporter-update, progress-reporter-do-update): Handle
non-numeric value arguments.
(progress-reporter--pulse-characters): New var.
Eli Zaretskii [Mon, 29 Mar 2010 12:26:24 +0000 (08:26 -0400)]
Support MS-Windows build and reversed rows in GUI frames; add initial docs.
doc/emacs/mule.texi (International): Mention support of
bidirectional editing.
(Bidirectional Editing): New section.
etc/HELLO: Reorder Arabic and Hebrew into logical order, and
insert RLM before the opening paren, to make the display more
reasonable. Add setting for bidi-display-reordering in the local
variables section.
lisp/files.el: Make bidi-display-reordering safe variable for
boolean values.
src/xdisp (append_glyph): If the glyph row is reversed, prepend the
glyph rather than appending it.
src/makefile.w32-in (OBJ1): Add $(BLD)/bidi.$(O).
($(BLD)/bidi.$(O)): New target.
Katsumi Yamaoka [Sun, 28 Mar 2010 23:55:59 +0000 (23:55 +0000)]
2010-03-27 Teodor Zlatanov <tzz@lifelogs.com>
* auth.texi (Secret Service API): Add TODO node.
(Help for users): Explain the new source options for `auth-sources'.
Katsumi Yamaoka [Sun, 28 Mar 2010 23:52:01 +0000 (23:52 +0000)]
2010-03-27 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el (auth-sources): Change default to be simpler. Explain
about Secret Service API sources. Improve Customize options.
(auth-source-pick): Change to accept any number of search parameters.
Implement fallbacks iteratively, not recursively. Add scoring on the
second pass and sort by score. Call Secret Service API when needed.
(auth-source-user-or-password): Use it. Call Secret Service API
directly when needed to get the user name and the password.
Eli Zaretskii [Sun, 28 Mar 2010 15:18:10 +0000 (11:18 -0400)]
Fix glyph_row reversed_p flag in empty lines between paragraphs.
bidi.c (bidi_get_next_char_visually): Improve commentary.
dispextern.h (PRODUCE_GLYPHS): Set the reversed_p flag in the
iterator's glyph_row here.
xdisp.c (handle_invisible_prop, set_iterator_to_next)
(next_element_from_buffer): Don't set the reversed_p flag in the
iterator's glyph_row here.
Eli Zaretskii [Sat, 27 Mar 2010 12:01:22 +0000 (15:01 +0300)]
Enclose the argument of "-l" in quotes.
makefile.w32-in ($(TIT), $(MISC_DIC), leim-list.el): Enclose the
argument of "-l" in $(ARGQUOTE), in case it includes blanks or
other special characters.
Stefan Monnier [Thu, 25 Mar 2010 00:06:08 +0000 (20:06 -0400)]
Add "union tags" in mpc.el.
* mpc.el: Remove backward compatibility code.
(mpc-browser-tags): Change default.
(mpc--find-memoize-union-tags): New var.
(mpc-cmd-flush, mpc-cmd-special-tag-p): New fun.
(mpc-cmd-find): Handle the case where the playlist does not exist.
Handle union-tags.
(mpc-cmd-list): Use mpc-cmd-special-tag-p. Handle union-tags.
(mpc-cmd-add): Use mpc-cmd-flush.
(mpc-tagbrowser-tag-name): New fun.
(mpc-tagbrowser-buf): Use it.
(mpc-songs-refresh): Use cond. Move to point-min as a fallback.
Stefan Monnier [Wed, 24 Mar 2010 23:56:43 +0000 (19:56 -0400)]
Misc cleanup.
* progmodes/make-mode.el (makefile-bsdmake-rule-action-regex):
Use replace-regexp-in-string.
(makefile-mode-abbrev-table): Merge defvar and define-abbrev-table.
(makefile-imake-mode-syntax-table): Move init into defvar.
(makefile-mode): Use define-derived-mode.
Ted Zlatanov [Wed, 24 Mar 2010 09:30:28 +0000 (04:30 -0500)]
Add a list of HTTP status code symbols and their text, mapped by number.
* url-http.el (url-http-codes): New variable to hold a mapping of
HTTP status codes' numbers, their symbolic name, and their text.
(url-http-parse-headers): Use it, leaving the original numeric
code in a comment.
Sam Steingold [Tue, 23 Mar 2010 18:22:46 +0000 (14:22 -0400)]
Fix bug#5620: recalculate all markers on compilation buffer
modifications, not on file modifications.
(buffer-modtime): New buffer-local variable:
the buffer modification time, for buffers not associated with files.
(compilation-mode): Create it.
(compilation-filter): Update it.
(compilation-next-error-function): Use it instead of
`visited-file-modtime' for timestamp.
* 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'.
Katsumi Yamaoka [Tue, 23 Mar 2010 07:37:09 +0000 (07:37 +0000)]
Synch with Gnus trunk
=====================
2010-03-23 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (canlock-verify): Autoload it for Emacs 21.
* message.el (ecomplete-setup): Autoload it for Emacs <23.
* mml-sec.el (mml-secure-cache-passphrase): Default to t that is
password-cache's default if it is not bound.
(mml-secure-passphrase-cache-expiry): Default to 16 that is
password-cache-expiry's default if it is not bound.
* pop3.el (pop3-list): Don't use 3rd arg of `split-string' which is not
available in Emacs 21.
2010-03-23 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el (auth-sources): Fix up definition so extra parameters
are always inline.
2010-03-22 Martin Stjernholm <mast@lysator.liu.se>
* nnimap.el (nnimap-verify-uidvalidity): Fixed bug where uidvalidity
wasn't updated after mismatch. Clear cached mailbox info correctly
when uidvalidity changes.
(nnimap-group-prefixed-name): New function to avoid some code
duplication.
(nnimap-verify-uidvalidity, nnimap-group-overview-filename)
(nnimap-request-group): Use it.
(nnimap-retrieve-groups, nnimap-verify-uidvalidity)
(nnimap-update-unseen): Significantly improved speed of Gnus startup
with many imap folders. This is done by caching the group status from
the imap server persistently in a group parameter `imap-status'. (This
was cached before too if `nnimap-retrieve-groups-asynchronous' was set,
but not persistently, so every Gnus startup was still very slow.)
2010-03-20 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el: Set up autoloads. Bump to 23.2 because of the
secrets.el dependency.
(auth-sources): Add optional user name. Add secrets.el configuration
choice (unused right now).
2010-03-20 Teodor Zlatanov <tzz@lifelogs.com>
* gnus-sum.el (gnus-summary-make-menu-bar): Let
`gnus-registry-install-shortcuts' fill in the functions.
* gnus-registry.el (gnus-summary-misc-menu): Declare to avoid
warnings.
(gnus-registry-misc-menus): Variable to hold registry mark menus.
(gnus-registry-install-shortcuts): Populate and use it in a
`gnus-summary-menu-hook' lambda, under "Gnus"->"Registry Marks".
2010-03-20 Martin Stjernholm <mast@lysator.liu.se>
* nnimap.el (nnimap-decode-group-name, nnimap-encode-group-name):
In-place substitutions for the group name encoding/decoding.
(nnimap-find-minmax-uid, nnimap-possibly-change-group)
(nnimap-retrieve-headers-progress, nnimap-possibly-change-group)
(nnimap-retrieve-headers-progress, nnimap-request-article-part)
(nnimap-update-unseen, nnimap-request-list)
(nnimap-retrieve-groups, nnimap-request-update-info-internal)
(nnimap-request-set-mark, nnimap-split-to-groups)
(nnimap-split-articles, nnimap-request-newgroups)
(nnimap-request-create-group, nnimap-request-accept-article)
(nnimap-request-delete-group, nnimap-request-rename-group)
(nnimap-acl-get, nnimap-acl-edit): Use them. Replace `mbx' with
`encoded-mbx' for consistency.
(nnimap-close-group): Call `imap-current-mailbox' instead of using the
variable `imap-current-mailbox'.
* gnus-agent.el (gnus-agent-fetch-articles, gnus-agent-fetch-headers)
(gnus-agent-regenerate-group): Use `gnus-agent-decoded-group-name'.
2010-03-20 Bojan Petrovic <bpetrovi@f.bg.ac.rs>
* pop3.el (pop3-display-message-size-flag): Display message size byte
counts during POP3 download.
(pop3-movemail): Use it.
(pop3-list): Implement listing of available messages.
2010-03-20 Mark Triggs <mst@dishevelled.net> (tiny change)
* nnir.el (nnir-get-article-nov-override-function): New function to
override the normal NOV retrieval.
(nnir-retrieve-headers): Use it.
Juri Linkov [Tue, 23 Mar 2010 07:16:57 +0000 (09:16 +0200)]
* replace.el (occur-accumulate-lines, occur-engine):
Use `occur-engine-line' instead of duplicate code.
(occur-engine-line): New function created from duplicate code
in `occur-accumulate-lines' and `occur-engine'.
Juri Linkov [Tue, 23 Mar 2010 07:11:50 +0000 (09:11 +0200)]
* finder.el: Remove TODO tasks.
* info.el (Info-finder-find-node): Add node "all"
with all package info. Handle a list of multiple keywords
separated by comma.
(info-finder): In interactive use with a prefix argument,
use `completing-read-multiple' to read a list of keywords
separated by comma.
Stefan Monnier [Tue, 23 Mar 2010 00:59:49 +0000 (20:59 -0400)]
Add a new completion style `substring'.
* minibuffer.el (completion-basic--pattern): New function.
(completion-basic-try-completion, completion-basic-all-completions): Use it.
(completion-substring--all-completions)
(completion-substring-try-completion)
(completion-substring-all-completions): New functions.
(completion-styles-alist): New style `substring'.
Dan Nicolaescu [Mon, 22 Mar 2010 19:51:59 +0000 (12:51 -0700)]
Remove dead code dealing with POSIX_SIGNALS.
* atimer.c (set_alarm): Remove dead code, all USG systems define
POSIX_SIGNALS.
* data.c (arith_error): Likewise.
* keyboard.c (input_available_signal, handle_user_signal)
(interrupt_signal): Likewise.
* process.c (sigchld_handler): Likewise.
(create_process): Remove if 0 code. Remove HPUX conditional when
!defined (POSIX_SIGNALS), it cannot be true.
* syssignal.h: Remove USG5_4 and USG conditionals when
!POSIX_SIGNALS, they cannot be true.
Jan Djärv [Mon, 22 Mar 2010 07:50:40 +0000 (08:50 +0100)]
Makefile.in (compile-main): cd to $(lisp) in a sub-shell, so we
don't do make there. When compiling with separate object dir, there
is no Makefile there.
Stefan Monnier [Mon, 22 Mar 2010 04:24:25 +0000 (00:24 -0400)]
Get rid of the ELCFILES abomination, again.
* Makefile.in (update-elclist, ELCFILES, compile-last): Remove.
(all, compile): Don't call compile-last.
(compile-main): Build the "elcfiles" list dynamically.
(compile-targets): New (internal) target.
Andreas Schwab [Sun, 21 Mar 2010 11:57:49 +0000 (12:57 +0100)]
Use absolute directory names substituted by configure
* lisp/Makefile.in (top_srcdir): Define.
(abs_top_builddir): Define.
(srcdir): Don't append `/..'.
(EMACS): Use ${abs_top_builddir}.
(all, compile, compile-always, compile-last): Don't set emacswd.
(update-subdirs, update-authors): Use $(top_srcdir) instead of
$(srcdir).
(lisp): Use $(srcdir) instead of @srcdir@.
* src/Makefile.in (abs_builddir): Define.
(bootstrap_exe): Use it.
(VPATH): Use $(srcdir) instead of @srcdir@.
Juri Linkov [Sun, 21 Mar 2010 10:52:51 +0000 (12:52 +0200)]
Fix message of multi-line occur regexps and multi-buffer header lines.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00457.html
* replace.el (occur-1): Don't display regexp if it is longer
than window-width. Use `query-replace-descr' to display regexp.
(occur-engine): Don't display regexp in the buffer header for
multi-buffer occur. Display a separate header line with total
match count and regexp for multi-buffer occur.
Use `query-replace-descr' to display regexp.
Stefan Monnier [Sat, 20 Mar 2010 21:46:31 +0000 (17:46 -0400)]
Use more relative file and directory names in `lisp' make rules.
* lisp/Makefile.in (EMACS): Arrange for it to work when we chdir.
(setwins, setwins_almost, setwins_for_subdirs):
Don't `cd'; output relative names.
(all, compile, compile-always, compile-last): Set emacswd.
(custom-deps, finder-data, autoloads, update-subdirs, compile-last):
Just cd to the lisp source dir so we can use relative file names.
* src/Makefile.in (bootstrap_exe): Use an absolute name.
Glenn Morris [Sat, 20 Mar 2010 18:13:46 +0000 (11:13 -0700)]
Cosmetic changes to lib-src/Makefile.in.
* Makefile.in (KRB4LIB, DESLIB, KRB5LIB, CRYPTOLIB, COM_ERRLIB)
(LIBHESIOD, LIBRESOLV): Make previous change a bit more friendly by
defining these as Makefile variables.
(LIBS_MOVE): Add LIBS_MAIL into this.
(movemail${EXEEXT}): Just use LIBS_MOVE, not LIBS_MAIL as well.
Eli Zaretskii [Sat, 20 Mar 2010 14:32:32 +0000 (10:32 -0400)]
Finish work on cursor motion in continuation lines.
xdisp.c (set_cursor_from_row): Don't miss a candidate row whose
glyph->charpos is an exact match for point.
(try_cursor_movement): Don't give up if rows are bidi-reordered
and point moved backwards. Instead, back up to the row that is
not a continuation line.
Dan Nicolaescu [Sat, 20 Mar 2010 08:11:59 +0000 (01:11 -0700)]
Remove support for old GNU/Linux using libc version 5.
* m/alpha.h (LINUX_SBRK_BUG): Remove definition.
* emacs.c (main): Remove code depending on LINUX_SBRK_BUG.
Dan Nicolaescu [Sat, 20 Mar 2010 07:09:31 +0000 (00:09 -0700)]
Consolidate redundant definitions.
* s/usg5-4.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not define,
it's undefined in all files that include this one.
(POSIX_SIGNALS): Define here instead of doing it in all files that
include this one.
* s/irix6-5.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
(POSIX_SIGNALS): Do not define.
* s/sol2-6.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
(POSIX_SIGNALS): Do not define.
* s/unixware.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
(POSIX_SIGNALS): Do not define.
Dan Nicolaescu [Sat, 20 Mar 2010 05:52:55 +0000 (22:52 -0700)]
Remove support for Solaris on PPC and for old versions.
* s/sol2-6.h: Add the contents of s/sol-2.3.h, s/sol-2.4.h, s/sol-2.5.h.
(LD_SWITCH_SYSTEM, USE_MMAP_FOR_BUFFERS): Remove #defines/#undef
that cancel each other.
* s/sol2-3.h:
* s/sol2-4.h:
* s/sol2-5.h: Remove.
* m/ibmrs6000.h: Remove code for USG5_4, this file is only used on AIX.
(NO_REMAP): Remove, unused.
(UNEXEC): Move definition ...
* s/aix4-2.h (UNEXEC): ... here.
* configure.in: Remove support for Solaris on PPC and for old versions.