Juri Linkov [Mon, 5 Apr 2010 23:38:53 +0000 (02:38 +0300)]
Scrolling commands which does not signal errors at top/bottom.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html
* simple.el (scroll-up-command, scroll-down-command): New commands.
Put property isearch-scroll=t on them.
* bindings.el (global-map): Rebind [prior] from `scroll-down' to
`scroll-down-command' and [next] from `scroll-up' to
`scroll-up-command'.
* emulation/cua-base.el: Put property CUA=move on
`scroll-up-command' and `scroll-down-command'.
(cua--init-keymaps): Remap `scroll-up-command' to `cua-scroll-up'
and `scroll-down-command' to `cua-scroll-down'.
John Wiegley [Sun, 4 Apr 2010 06:55:19 +0000 (02:55 -0400)]
2010-04-04 John Wiegley <jwiegley@gmail.com>
* ido.el (ido-use-virtual-buffers): New variable to indicate
whether "virtual buffer" support is enabled for IDO. Essentially
it works as follows: Say you are visiting a file and the buffer
gets cleaned up by mignight.el. Later, you want to switch to that
buffer, but find it's no longer open. With virtual buffers
enabled, the buffer name stays in the buffer list (using the
ido-virtual face, and always at the end), and if you select it, it
opens the file back up again. This allows you to think less about
whether recently opened files are still open or not. Most of the
time you can quit Emacs, restart, and then switch to a file buffer
that was previously open as if it still were. NOTE: This feature
has been present in iswitchb for several years now, and I'm
porting the same logic to IDO.
(ido-virtual): Face used to indicate virtual buffers in the list.
(ido-buffer-internal): If a buffer is chosen, and no such buffer
exists, but a virtual buffer of that name does (which would be why
it was in the list), recreate the buffer by reopening the file.
(ido-make-buffer-list): If virtual buffers are being used, call
`ido-add-virtual-buffers-to-list' before the make list hook.
(ido-virtual-buffers): New variable which contains a copy of the
current contents of the `recentf-list', albeit pared down for the
sake of speed, and with proper faces applied.
(ido-add-virtual-buffers-to-list): Using the `recentf-list',
create a list of "virtual buffers" to present to the user in
addition to the currently open set. Note that this logic could
get rather slow if that list is too large. With the default
`recentf-max-saved-items' of 200, there is little speed penalty.
Juri Linkov [Fri, 2 Apr 2010 23:01:22 +0000 (02:01 +0300)]
* ehelp.el (electric-help-orig-major-mode): New buffer-local variable.
(electric-help-mode): Set it to original major-mode. Doc fix.
(with-electric-help): Use `electric-help-orig-major-mode' instead
of (default-value 'major-mode). Doc fix.
http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00069.html
Sam Steingold [Fri, 2 Apr 2010 17:24:37 +0000 (13:24 -0400)]
(bug-reference-bug-regexp): Also accept "patch" and "RFE".
(bug-reference-fontify): `bug-reference-url-format' can also be a
function to be able to handle the bug kind.
(turn-on-bug-reference-mode, turn-on-bug-reference-prog-mode): Add
* Makefile.in (LIBTIFF, LIBJPEG, LIBPNG, LIBGIF, LIBXPM, XFT_LIBS):
Define as Makefile variables.
(LIBX): Use above variables rather than directly using autoconf.
Dan Nicolaescu [Wed, 31 Mar 2010 20:39:03 +0000 (13:39 -0700)]
Clean up BSD_SYSTEM use.
* xterm.c:
* process.c:
* emacs.c: Use HAVE_SYS_IOCTL_H instead of BSD_SYSTEM as a guard
for including <sys/ioctl.h>.
* sysdep.c (wait_without_blocking): Remove BSD_SYSTEM case, this
code is only used for MSDOS.
Juri Linkov [Wed, 31 Mar 2010 15:16:12 +0000 (18:16 +0300)]
* simple.el (next-line, previous-line): Re-throw a signal
with `signal' instead of using `ding'.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01432.html
Juri Linkov [Wed, 31 Mar 2010 15:02:53 +0000 (18:02 +0300)]
* simple.el (keyboard-escape-quit): Raise deselecting the active
region higher than exiting the minibuffer.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00904.html
Juri Linkov [Wed, 31 Mar 2010 14:55:01 +0000 (17:55 +0300)]
Rename `image-extension-data' to `image-metadata'.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01456.html
* image.c: Add `Qextension_data'.
(syms_of_image): Initialize and staticpro `Qextension_data'.
(Fimage_metadata): Rename from `Fimage_extension_data'.
(gif_load): Put GIF extension data to the property
`Qextension_data'.
* image.el (image-animated-p): Use `image-metadata' instead of
`image-extension-data'. Get GIF extenstion data from metadata
property `extension-data'.
Katsumi Yamaoka [Wed, 31 Mar 2010 06:44:35 +0000 (06:44 +0000)]
(gnus-article-browse-html-save-cid-content): Rename from
gnus-article-browse-html-save-cid-image;
make it work recursively for forwarded messages as well.
(gnus-article-browse-html-parts): Work when prefix arg is given.
(gnus-article-browse-html-article): Doc fix.
Stefan Monnier [Wed, 31 Mar 2010 04:14:08 +0000 (00:14 -0400)]
Get rid of the direct_output optimizations.
* keyboard.c (nonundocount): Remove extern declaration.
(command_loop_1): Remove brittle optimisation for cheap and common operations.
* xdisp.c (redisplay_internal): Don't bother checking
redisplay_performed_directly_p any more.
* sysdep.c (init_sys_modes): Don't call direct_output_forward_char any more.
* dispnew.c (redisplay_performed_directly_p)
(direct_output_for_insert, direct_output_forward_char):
* dispextern.h (redisplay_performed_directly_p)
(direct_output_for_insert, direct_output_forward_char): Remove.
* cmds.c (nonundocount): Make it static.
Juri Linkov [Tue, 30 Mar 2010 16:38:45 +0000 (19:38 +0300)]
* replace.el (occur-accumulate-lines): Move occur-engine related
functions `occur-accumulate-lines' and `occur-engine-add-prefix'
to be located after `occur-engine'.
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 10:59:26 +0000 (13:59 +0300)]
Improve documentation of "C-x 8 RET".
mule.texi (Input Methods): Mention "C-x 8 RET" and add a
cross-reference to "Inserting Text".
basic.texi (Inserting Text): Add an index entry for "C-x 8 RET".
Mention completion provided by `ucs-insert'.
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.
* nsfns.m (x_implicitly_set_name): If frame-title-format is t, use
filename for the title.
(ns_set_doc_edited): Do nothing if the selected window is a
minibuffer window.
* nsterm.h: Add prototypes for ns_set_name_as_filename and
ns_set_doc_edited.
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.
Stefan Monnier [Mon, 29 Mar 2010 15:23:01 +0000 (11:23 -0400)]
Make tmm-menubar work for the Buffers menu again.
* tmm.el (tmm-prompt): Also handle keymap entries in the form of
vectors rather than cons cells, as used in menu-bar-update-buffers.
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.