Leo Liu [Wed, 9 Apr 2014 13:37:49 +0000 (21:37 +0800)]
New command rcirc-cmd-reconnect
* net/rcirc.el (rcirc-connection-info): New variable.
(rcirc-connect): Use it to store connection info.
(rcirc-buffer-process): Avoid get-buffer-process which returns nil
for killed process.
(rcirc-cmd-reconnect): New command.
(rcirc-mode, set-rcirc-encode-coding-system)
(set-rcirc-decode-coding-system, rcirc-connect): Use setq-local.
Stefan Monnier [Wed, 9 Apr 2014 01:48:07 +0000 (21:48 -0400)]
* src/insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and
region handling (and don't call signal_before_change) if
inhibit_modification_hooks is set.
(signal_before_change): Don't check inhibit_modification_hooks any more.
* lisp/subr.el (with-silent-modifications): Don't bind deactivate-mark,
buffer-file-name, and buffer-file-truename any more.
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.
João Távora [Fri, 4 Apr 2014 23:31:02 +0000 (00:31 +0100)]
Improve on previous quote autopairing change
* 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.
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.
* alloc.c: Include execinfo.h if available.
(SUSPICIOUS_OBJECT_CHECKING): New macro; define unconditionally.
(suspicious_free_record): New structure.
(suspicious_objects,suspicious_object_index)
(suspicious_free_history, suspicious_free_history_index): New
variables.
(find_suspicious_object_in_range,detect_suspicious_free,Fsuspicious_object):
New functions.
(cleanup_vector): Call find_suspicious_object_in_range.
* font.c (font_list_entities): Do not add empty vector to font cache.
(font_matching_entity): Likewise. If matching entity is found, insert
1-item vector with this entity instead of entity itself (Bug#17125).
João Távora [Wed, 2 Apr 2014 09:59:06 +0000 (10:59 +0100)]
Inhibit quote autopairing more frequently
* 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'.
Paul Eggert [Tue, 1 Apr 2014 20:18:12 +0000 (13:18 -0700)]
* fns.c (validate_subarray): Rename from validate_substring,
since it works for vectors too. New arg ARRAY. Optimize for the
non-nil case. Instead of returning bool, throw an error if out of
range, so that the caller needn't do that. All uses changed.
Report original values if out of range.
(Fsubstring, Fsubstring_no_properties, secure_hash):
Also optimize the case where FROM is 0 or TO is the size.
Dmitry Antipov [Mon, 31 Mar 2014 07:13:58 +0000 (11:13 +0400)]
* search.c (Freplace_match): Use make_specified_string.
* xterm.c, w32term.c (x_set_glyph_string_gc): Use emacs_abort
to catch bogus override face of glyph strings.