Juri Linkov [Wed, 24 Aug 2011 18:09:18 +0000 (21:09 +0300)]
More uses of `error' and `warning' faces.
* lisp/battery.el (battery-update): Use the face `error' instead of
`font-lock-warning-face'.
* lisp/ibuffer.el (ibuffer-marked-face): Change default face from
`font-lock-warning-face' to `warning'.
(ibuffer-deletion-face): Change default face from
`font-lock-type-face' to `error'.
* lisp/proced.el (proced-marked): Inherit from `error' instead of
`font-lock-warning-face'.
Eli Zaretskii [Wed, 24 Aug 2011 15:51:56 +0000 (18:51 +0300)]
Fix cursor movement in R2L text within L2R paragraphs.
src/xdisp.c (set_cursor_from_row): Consider candidate row a win if its
glyph represents a newline and point is on that newline. Fixes cursor
positioning on the newline at EOL of R2L text within L2R
paragraph, and vice versa.
(try_cursor_movement): Check continued rows, in addition to
continuation rows. Fixes unwarranted scroll when point enters a
continued line of R2L text within an L2R paragraph, or vice versa.
(cursor_row_p): Consider the case of point being equal to
MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
from the end of a short line to the beginning of a continued line
of R2L text within L2R paragraph.
(RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
composed characters.
Eli Zaretskii [Wed, 24 Aug 2011 11:49:54 +0000 (14:49 +0300)]
Fix current-bidi-paragraph-direction and its doc.
src/xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
buffers, return left-to-right.
doc/lispref/display.texi (Bidirectional Display): Document return value in
buffers that are not bidi-reordered for display, and in unibyte
buffers.
Juri Linkov [Wed, 24 Aug 2011 09:40:58 +0000 (12:40 +0300)]
"C-s M-p" brings the tip of the search ring.
* lisp/isearch.el (isearch-ring-adjust1): Start visiting previous
search strings from the index 0 (-1 + 1) instead of 1 (0 + 1).
(isearch-repeat, isearch-edit-string): Call `isearch-ring-adjust1'
for empty search string (when the last search string is reused
automatically) to adjust the isearch ring to the last element and
prepare the correct index for further M-p commands.
Stefan Monnier [Wed, 24 Aug 2011 01:55:10 +0000 (21:55 -0400)]
* lisp/mpc.el (mpc--proc-filter): Don't signal mpc-proc-error since signals
from process filters aren't reliably transmitted to the surrounding
accept-process-output.
(mpc-proc-check): New function.
(mpc-proc-sync): Use it
Eli Zaretskii [Tue, 23 Aug 2011 14:45:14 +0000 (17:45 +0300)]
Followup for character properties in 2011-08-23T11:48:07Z!handa@m17n.org.
src/bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
a character.
admin/unidata/unidata-gen.el (unidata-prop-alist): Update the default
values of bidi-class according to DerivedBidiClass.txt from the
latest UCD.
lisp/international/uni-bidi.el: Regenerated.
doc/lispref/nonascii.texi (Character Properties): Document the values for
unassigned codepoints.
Eli Zaretskii [Tue, 23 Aug 2011 08:38:29 +0000 (11:38 +0300)]
Fix crashes with completion and composed characters.
src/dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
instead of CHAR_TO_BYTE. Fixes a crash when a completion
candidate is selected by the mouse, and that candidate has a
composed character under the mouse.
Eli Zaretskii [Tue, 23 Aug 2011 07:01:25 +0000 (10:01 +0300)]
Fix pos-visible-in-window-p for zero-column composed character.
src/xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
coordinates reported by pos-visible-in-window-p for a composed
character in column zero.
Stefan Monnier [Tue, 23 Aug 2011 05:21:09 +0000 (01:21 -0400)]
* lisp/pcomplete.el (pcomplete-parse-comint-arguments): Fix inf-loop.
Mark obsolete.
* lisp/shell.el (shell-parse-pcomplete-arguments): New function.
(shell-completion-vars): Use it instead.
Stefan Monnier [Mon, 22 Aug 2011 21:16:46 +0000 (17:16 -0400)]
* lisp/emacs-lisp/debug.el (debug-arglist): New function.
(debug-convert-byte-code): Use it. Handle lexical byte-codes.
(debug-on-entry-1): Handle interpreted closures.
Eli Zaretskii [Mon, 22 Aug 2011 17:00:40 +0000 (20:00 +0300)]
Fix vertical cursor motion under bidi on auto-composed characters.
src/xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
consider it a hit if to_charpos is anywhere in the range of the
composed buffer positions.
Juri Linkov [Mon, 22 Aug 2011 12:46:45 +0000 (15:46 +0300)]
* lisp/progmodes/compile.el (compilation-mode-font-lock-keywords):
Revert regexp that highlights output switches to its old
pre-2010-10-28 value and remove one `?' from it (bug#9319).
Chong Yidong [Mon, 22 Aug 2011 02:34:23 +0000 (22:34 -0400)]
Fix animated gif segfault and frame clearing bug.
* src/image.c (gif_load): Don't assume that each subimage has the same
dimensions as the base image. Handle disposal method that is
"undefined" by the gif spec.
nnmail.el (nnmail-get-new-mail-1): If one mail source bugs out, continue on and do the clean-up phase (bug#9188).
gnus-sum.el (gnus-summary-expire-articles): When expiring articles, just ignore groups that can't be opened instead of erroring out (bug#9225).
gnus-art.el (gnus-article-update-date-headers): Flip the default to nil since some many people are fuddy-duddies.
gnus-html.el (gnus-html-image-fetched): Don't cache zero-length images.
Gnus developers [Sun, 21 Aug 2011 09:39:07 +0000 (09:39 +0000)]
Merge changes made in Gnus trunk.
nntp.el (nntp-authinfo-file): Mark as obsolete -- use auth-source instead.
pop3.el (pop3-wait-for-messages): Don't use Gnus functions here.
gnus-util.el (gnus-process-live-p): Copy over compat function.
pop3.el (pop3-wait-for-messages): If the pop3 process dies, stop processing.
nntp.el (nntp-kill-buffer): Kill the process before killing the buffer to avoid warnings.
gnus-agent.el (gnus-agent-expire-done-message): Use %.f as format specified to reduce precision.
Alan Mackenzie [Sat, 20 Aug 2011 14:54:21 +0000 (14:54 +0000)]
Fontify CPP expressions correctly when starting in the middle of such a
construct. Mainly for when jit-lock etc. starts a chunk here.
cc-fonts.el (c-font-lock-context): new buffer local variable.
(c-make-font-lock-search-form): new function, extracted from
c-make-font-lock-search-function.
(c-make-font-lock-search-function): Use the above function.
(c-make-font-lock-context-search-function): New function.
(c-cpp-matchers): Enhance the preprocessor expression case with the above
function
(c-font-lock-complex-decl-prepare): Test for being in a CPP form which
takes an expression.
cc-langs.el (c-cpp-expr-intro-re): New lang-variable.
Alan Mackenzie [Sat, 20 Aug 2011 14:43:33 +0000 (14:43 +0000)]
Fontify CPP expressions correctly when starting in the middle of such a
construct. Mainly for when jit-lock etc. starts a chunk here.
cc-fonts.el (c-font-lock-context): new buffer local variable.
(c-make-font-lock-search-form): new function, extracted from
c-make-font-lock-search-function.
(c-make-font-lock-search-function): Use the above function.
(c-make-font-lock-context-search-function): New function.
(c-cpp-matchers): Enhance the preprocessor expression case with the above
function
(c-font-lock-complex-decl-prepare): Test for being in a CPP form which
takes an expression.
cc-langs.el (c-cpp-expr-intro-re): New lang-variable.
Gnus developers [Sat, 20 Aug 2011 00:20:39 +0000 (00:20 +0000)]
Merge changes made in Gnus trunk.
nnimap.el (nnimap-transform-headers): Protect against (NIL ...) bodystructures (bug#9314).
starttls.el (starttls-any-program-available): Define as obsolete function.
gnus-util.el (gnus-y-or-n-p): Reinstate the message-clearing y-or-n-p versions which Gnus use when appropriate.
gnus-group.el (gnus-group-clear-data): Add a y-or-n query, since it's a pretty destructive command.
nnmail.el (nnmail-extra-headers): Clarify slightly (bug#9302).
message.el (message-fix-before-sending): Make a different warning about NUL characters (bug#9270).
gnus-sum.el (gnus-auto-select-subject): Allow specifying a function from custom (bug#9260).
Eli Zaretskii [Fri, 19 Aug 2011 11:30:29 +0000 (14:30 +0300)]
Avoid a crash in mouse-highlight of Speedbar frames.
src/xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
from an Org mode buffer to a Speedbar frame.
Gnus developers [Thu, 18 Aug 2011 22:12:47 +0000 (22:12 +0000)]
Merge changes made in Gnus trunk.
nnmairix.el (nnmairix-request-set-mark, nnmairix-goto-original-article): Remove adding of article to registry, since `gnus-registry-add-group' isn't available anymore.
(nnmairix-determine-original-group-from-registry): Use `gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't available anymore.
gnus-spec.el (gnus-lrm-string): Use 8206 instead of ?\x200e to make things work in Emacs 22 and XEmacs, too.
gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): LRM-ify the default From.
gnus-spec.el (gnus-lrm-string-p): New macro.
(gnus-lrm-string): New constant.
(gnus-summary-line-format-spec): LRM-ify the from.
(gnus-tilde-max-form): LRM-ify string chopping.
gnus-ems.el (gnus-string-mark-left-to-right): New function.
Eli Zaretskii [Thu, 18 Aug 2011 18:46:02 +0000 (21:46 +0300)]
Protect the bidi iterator against zero bidi properties.
src/bidi.c (bidi_get_type): If bidi_type_table reports zero as the
character bidirectional type, use STRONG_L instead. Fixes crashes
in a buffer produced by `describe-categories'.
Eli Zaretskii [Thu, 18 Aug 2011 16:09:40 +0000 (19:09 +0300)]
Fix bidi reordering around TAB characters covered by display properties.
src/dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
members before the level stack, so they would be saved and
restored when copying iterator state. Fixes incorrect reordering
around TABs covered by display properties.
Juri Linkov [Thu, 18 Aug 2011 11:36:19 +0000 (14:36 +0300)]
* lisp/faces.el (error, warning, success): New faces with definitions
copied from old default values of `font-lock-warning-face',
`compilation-warning', `compilation-info'.
* lisp/font-lock.el (font-lock-warning-face): Inherit from `error'.
* lisp/progmodes/compile.el (compilation-error): Inherit from `error'.
(compilation-warning): Inherit from `warning'.
(compilation-info): Inherit from `success'.
* lisp/dired.el (dired-marked): Inherit from `warning'.
(dired-flagged): Inherit from `error'.
Eli Zaretskii [Thu, 18 Aug 2011 10:53:55 +0000 (13:53 +0300)]
Improve documentation of bidi in ELisp manual.
doc/lispref/nonascii.texi (Character Properties): Document use of
`bidi-class' and `mirroring' properties as part of reordering.
Provide cross-references to "Bidirectional Display".
doc/lispref/display.texi (Bidirectional Display): Document the pitfalls of
concatenating strings with bidirectional content, with possible
solutions. Document string-mark-left-to-right. Mention paragraph
direction in modes that inherit from prog-mode. Document use of
`bidi-class' and `mirroring' properties as part of reordering.
etc/NEWS: Mark string-mark-left-to-right as documented.
message.el (message-is-yours-p): Allow disabling canlock checking (bug#9295).
(message-shoot-gnksa-feet): Add `canlock-verify'.
(message-auto-save-directory): Use ~/ as the auto-save directory if the message directory isn't writable (bug#9304).
auth-source.el (auth-source-netrc-saver): Make the .authinfo file non-world-readable.
Martin Rudalics [Wed, 17 Aug 2011 06:50:31 +0000 (08:50 +0200)]
In display-buffer-pop-up-frame make frame with buffer to display current.
* window.el (display-buffer-pop-up-frame): Run frame creation
function with BUFFER current (as special-display-popup-frame
does). Reported by Drew Adams.
Ken Brown [Tue, 16 Aug 2011 13:27:12 +0000 (09:27 -0400)]
Fix memory allocation problems in Cygwin build (Bug#9273).
* src/gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo): New
variables.
(malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
dumped emacs.
(_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
in the static heap.
[CYGWIN] (special_realloc): New function.
(_realloc_internal_nolock) [CYGWIN]: Use the new function on
requests to realloc storage in the static heap.
* src/unexcw.c ( __malloc_initialized): Declare external variable.
(fixup_executable): Force the dumped emacs to reinitialize malloc.
Eli Zaretskii [Tue, 16 Aug 2011 07:53:33 +0000 (10:53 +0300)]
Improve documentation of regexp search for categories.
doc/lispref/searching.texi (Regexp Backslash): Document how to display
existing categories. Mention the possibility of adding
categories, and add an xref to where this is described. Add an
index entry.
doc/lispref/syntax.texi (Categories): Add an example of defining a new
category and category table.