Fix bug #16434 with handling the -rv command-line option.
lisp/faces.el (make-face-x-resource-internal): Do nothing when
inhibit-x-resources is non-nil. Don't touch the default face if
reversed video is given--as was done in previous versions of Emacs.
(face-set-after-frame-default): Don't call
make-face-x-resource-internal here.
lisp/faces.el (face-spec-choose): Accept additional optional argument,
whose value is returned if no matching attributes are found.
(face-spec-recalc): Use the new optional argument when calling
face-spec-choose.
lisp/faces.el (face-spec-recalc): Call make-face-x-resource-internal
only when inhibit-x-resources is nil, and do that earlier in the
function. Doc fix.
Jan Djärv [Fri, 4 Apr 2014 16:32:24 +0000 (18:32 +0200)]
Backport from trunk.
* nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
is nil. If waiting for toolbar to complete, force a redraw.
(free_frame_tool_bar): Set wait_for_tool_bar = NO
* nsterm.h (EmacsView): Add wait_for_tool_bar.
* nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
bar is zero height, just return (Bug#16976).
(initFrameFromEmacs:): Initialize wait_for_tool_bar.
Eli Zaretskii [Fri, 4 Apr 2014 08:26:00 +0000 (11:26 +0300)]
A better fix for bug #17169.
lisp/international/characters.el (mirroring): Fix last change:
instead of loading uni-mirrored.el explicitly, do that implicitly
by creating the 'mirroring' uniprop table. This avoids announcing
the loading of uni-mirrored.el.
Doc updates for buffer-stale-function now applying to file buffers too
* doc/emacs/arevert-xtra.texi (Supporting additional buffers):
* doc/lispref/backups.texi (Reverting):
Update for buffer-stale-function also applying to file-buffers.
Doc updates for default values of some -function vars no longer being nil
* doc/emacs/files.texi (Backup Names):
* doc/emacs/arevert-xtra.texi (Supporting additional buffers):
* doc/lispref/backups.texi (Making Backups, Reverting):
Update for default values of some -function vars no longer being nil.
* lisp/emacs-lisp/package.el: Fix bug#16733 (again).
(url-http-parse-response, url-http-end-of-headers, url-recreate-url)
(url-http-target-url): Remove unused declarations.
(package-handle-response): Remove.
(package--with-work-buffer): Use url-insert-file-contents and simplify.
(package--download-one-archive): Use current-buffer instead of
dynamic binding of `buffer'.
(describe-package-1): Do not decode readme-string.
* lisp/url/url-handlers.el (url-http-parse-response): Add autoload.
(url-insert-file-contents): Signal file-error in case of HTTP error.
* net/tramp-sh.el (tramp-sh-handle-vc-registered): Revert change
from 2014-03-07, it decreases performance unnecessarily. Let-bind
`remote-file-name-inhibit-cache' to nil in the second pass.
(tramp-find-executable): Do not call "which" on SunOS.
(tramp-send-command-and-check): Fix docstring.
Barry O'Reilly [Tue, 25 Mar 2014 02:47:39 +0000 (22:47 -0400)]
Undo in region after markers in undo history relocated
* simple.el (primitive-undo): Only process marker adjustments
validated against their corresponding (TEXT . POS). Issue warning
for lone marker adjustments in undo history. (Bug#16818)
(undo-make-selective-list): Add marker adjustments to selective
undo list based on whether their corresponding (TEXT . POS) is in
the region. Remove variable adjusted-markers, which was unused
and only non nil during undo-make-selective-list.
(undo-elt-in-region): Return nil when passed a marker adjustment
and explain in function doc.
Have (MARKER . ADJUSTMENT) undo records always be immediately
after their corresponding (TEXT . POS) record in undo list.
(Bug#16818)
* lisp.h (record-delete): New arg record_markers.
(record_marker_adjustment): No longer needed outside undo.c.
* insdel.c (adjust_markers_for_delete): Move calculation of marker
adjustments to undo.c's record_marker_adjustments. Note that
fileio.c's decide_coding_unwind is another caller to
adjust_markers_for_delete. Because it has undo list bound to t,
it does not rely on adjust_markers_for_delete to record marker
adjustments.
(del_range_2): Swap call to record_delete and
adjust_markers_for_delete so as undo marker adjustments are
recorded before current deletion's adjustments, as before.
(adjust_after_replace):
(replace_range): Pass value for new record_markers arg to
delete_record.
* undo.c (record_marker_adjustment): Renamed to
record_marker_adjustments and made static.
(record_delete): Check record_markers arg and call
record_marker_adjustments.
(record_change): Pass value for new record_markers arg to
delete_record.
(record_point): at_boundary calculation no longer needs to account
for marker adjustments.
* undo-tests.el (undo-test-marker-adjustment-nominal):
(undo-test-region-t-marker): New tests of marker adjustments.
(undo-test-marker-adjustment-moved):
(undo-test-region-mark-adjustment): New tests to demonstrate
bug#16818, which fail without the fix.
* markers.texi (Moving Marker Positions): The 2014-03-02 doc
change mentioning undo's inability to handle relocated markers no
longer applies. See bug#16818.
* text.texi (Undo): Expand documentation of (TEXT . POS) and
(MARKER . ADJUSTMENT) undo elements.
Dmitry Gutov [Mon, 24 Mar 2014 22:38:06 +0000 (00:38 +0200)]
Fix bug#16762
* lisp/emacs-lisp/package.el (package--add-to-archive-contents):
Include already installed and built-in packages in
`package-archive-contents'.
(package-install): Don't include already installed packages in the
options on interactive invocation.
Dmitry Gutov [Mon, 24 Mar 2014 08:53:56 +0000 (10:53 +0200)]
Match special globals in Ruby better
* lisp/progmodes/ruby-mode.el (ruby-expression-expansion-re):
Match special global variables without curlies, too.
(ruby-font-lock-keywords): Simplify the matcher for special global
variables. Don't require a non-word character after the variable.
Stefan Monnier [Sun, 23 Mar 2014 22:30:47 +0000 (18:30 -0400)]
* lisp/simple.el (redisplay-highlight-region-function): Increase priority of
overlay to make sure boundaries are visible.
* src/buffer.c (struct sortvec): Add field `spriority'.
(compare_overlays): Use it.
(sort_overlays): Set it.
Eli Zaretskii [Sun, 23 Mar 2014 15:57:25 +0000 (17:57 +0200)]
Fix bug #17047 with cursor motion when invisible text starts a line.
src/xdisp.c (redisplay_window): If all previous attempts to find the
cursor row failed, try a few alternatives before falling back to
the top-most row of the window. Use row_containing_pos.
lisp/w32-common-fns.el (x-selection-owner-p): Get documentation from DOC.
Add empty docstring for the benefit of doc.c; change parameter profile
to match the X function.
Stefan Monnier [Fri, 21 Mar 2014 21:47:52 +0000 (17:47 -0400)]
* doc/lispref/functions.texi (Advising Functions): Explain a bit more how
arguments work.
(Advice combinators): New node.
(Core Advising Primitives): Use it. Expand description of "depth".
(Advising Named Functions): Document limitation of advices on macros.
Martin Rudalics [Fri, 21 Mar 2014 09:23:22 +0000 (10:23 +0100)]
Truly maximize w32 frames with odd fonts and some texi fixes.
* w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
constrain frame size in SW_SHOWMAXIMIZED case so we can truly
maximize a frame for odd default fonts.
* frames.texi (Size and Position): In `frame-resize-pixelwise'
description drop remark about frame maximization.
* windows.texi (Display Action Functions): Add description for
`display-buffer-no-window' and explain use of `allow-no-window'
alist entries.
Dmitry Gutov [Fri, 21 Mar 2014 06:06:52 +0000 (08:06 +0200)]
Fix bug#16826
* lisp/emacs-lisp/package.el (package-compute-transaction):
Use `version-list-<=' to compare the requirement version against
the package version already to be installed. Update the error
message.