lisp/faces.el (make-face): Deprecate optional argument as it is no
longer needed/used since the conditional X resources handling
has been pushed down to make-face-x-resource-internal itself.
(make-empty-face): Don't pass optional argument to make-face.
Eli Zaretskii [Sat, 12 Apr 2014 11:21:47 +0000 (14:21 +0300)]
Fix bug #17244 with line-move-visual when display string covers a lot of text.
src/xdisp.c (move_it_by_lines): If a large portion of buffer text is
covered by a display string that ends in a newline, and that cases
going back by DVPOS lines to hit the search limit, lift the limit
and go back until DVPOS is reached.
src/indent.c (Fvertical_motion): Handle correctly the case when the
display string is preceded by an empty line.
Leo Liu [Sat, 12 Apr 2014 04:07:53 +0000 (12:07 +0800)]
Don't break emacs <= 24.3 just yet
* progmodes/octave.el (completion-table-with-cache): Define if not
available.
(octave-goto-function-definition)
(octave-sync-function-file-names)
(octave-find-definition-default-filename): Backquote upattern for
compatibility.
Paul Eggert [Thu, 10 Apr 2014 19:12:34 +0000 (12:12 -0700)]
Spelling fixes.
* automated/electric-tests.el: Fix spelling error in test name.
(whitespace-skipping-for-quotes-not-outside):
Rename from whitespace-skipping-for-quotes-not-ouside.
Stefan Monnier [Mon, 7 Apr 2014 16:08:46 +0000 (12:08 -0400)]
* src/alloc.c: Keep track of symbols referenced from pure space (bug#17168).
(symbol_block_pinned): New var.
(Fmake_symbol): Initialize `pinned'.
(purecopy): New function, extracted from Fpurecopy. Mark symbols as
pinned and signal an error for un-purifiable objects.
(pure_cons): Use it.
(Fpurecopy): Use it, except for objects that can't be purified.
(mark_pinned_symbols): New function.
(Fgarbage_collect): Use it.
(gc_sweep): Remove hack made unnecessary.
* src/lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
João Távora [Mon, 7 Apr 2014 07:29:50 +0000 (08:29 +0100)]
Improve on previous quote autopairing change
Backported from trunk 2014-04-04T23:31:02Z!joaotavora@gmail.com
* lisp/elec-pair.el:
(electric-pair--syntax-ppss): When inside comments parse from
comment beginning.
(electric-pair--balance-info): Fix typo in comment.
(electric-pair--in-unterminated-string-p): Delete.
(electric-pair--unbalanced-strings-p): New function.
(electric-pair-string-bound-function): New var.
(electric-pair-inhibit-if-helps-balance): Decide quote pairing
according to `electric-pair--in-unterminated-string-p'
* test/automated/electric-tests.el (define-electric-pair-test): Don't
overtest..
(inhibit-in-mismatched-string-inside-ruby-comments): New test.
(inhibit-in-mismatched-string-inside-c-comments): New test.
João Távora [Mon, 7 Apr 2014 07:24:03 +0000 (08:24 +0100)]
Inhibit quote autopairing more frequently
Backported from trunk 2014-04-02T09:59:06Z!joaotavora@gmail.com
* lisp/elec-pair.el (electric-pair-inhibit-if-helps-balance): Inhibit
quote pairing if point-max is inside an unterminated string.
(electric-pair--looking-at-unterminated-string-p):
Delete.
(electric-pair--in-unterminated-string-p): New function.
* test/automated/electric-tests.el (inhibit-if-strings-mismatched):
New test, change from `inhibit-only-of-next-is-mismatched'.
João Távora [Sun, 6 Apr 2014 23:37:17 +0000 (00:37 +0100)]
Fix electric-pair-delete-adjacent-pairs in modes binding backspace.
* lisp/elec-pair.el (electric-pair-backward-delete-char): Delete.
(electric-pair-backward-delete-char-untabify): Delete.
(electric-pair-mode-map): Bind backspace to a menu item filtering
a new `electric-pair-delete-pair' command.
(electric-pair-delete-pair): New command.
João Távora [Sun, 6 Apr 2014 23:09:19 +0000 (00:09 +0100)]
Fix electric-pair-skip-whitespace with quotes in text-mode
* lisp/elec-pair.el (electric-pair-post-self-insert-function): Don't
skip whitespace for quote syntax when `electric-pair-text-pairs'
and `electric-pair-pairs' were used.
* test/automated/electric-tests.el (electric-pair-define-test-form):
More readable test docstrings.
(whitespace-skipping-for-quotes-not-ouside)
(whitespace-skipping-for-quotes-only-inside)
(whitespace-skipping-not-without-proper-syntax):
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.