* 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.
* lisp/progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp): Update.
(top-level): No longer require assoc.
(vhdl-asort, vhdl-anot-head-p, vhdl-aput, vhdl-adelete, vhdl-aget):
New functions. Use throughout to replace aget etc.
(vhdl-aput-delete-if-nil): Rename from vhdl-aput.
(vhdl-update-file-contents): Update for vhdl-aput-delete-if-nil rename.
(vhdl-template-replace-header-keywords): Fix bug for "<title string>".
(vhdl-compile-init): Do not initialize regexps for Emacs 22+.
(vhdl-error-regexp-emacs-alist): Remove regexps from all compilers
except `vhdl-compiler'.
(vhdl-error-regexp-add-emacs): Remove all other compilers,
when appropriate.
Jan Djärv [Sun, 30 Mar 2014 17:21:20 +0000 (19:21 +0200)]
Avoid flickering on frame creation with tool bar on OSX.
* nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
is nil. If waiting for toolbar to complete, force a redraw.
* 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.
(initFrameFromEmacs:): Initialize wait_for_tool_bar.
Glenn Morris [Fri, 28 Mar 2014 23:11:39 +0000 (19:11 -0400)]
Improve usage of AC_INIT
* configure.ac (AC_INIT): Add "GNU" in package, add bug address.
(PACKAGE_BUGREPORT): Use it.
* src/emacs.c (emacs_version): Use PACKAGE_VERSION rather than VERSION.
(emacs_bugreport): New variable.
(usage_message): Use PACKAGE_BUGREPORT.
(syms_of_emacs) <report-emacs-bug-address>: New variable.
* lisp/cus-start.el (report-emacs-bug-address): Set custom properties.
* lisp/mail/emacsbug.el (report-emacs-bug-address):
Variable is now defined in emacs.c.
Make `cycle-spacing' behave more like `just-one-space' if colled once.
* simple.el (cycle-spacing): Never delete spaces on first run by
default, but do so in a new 'fast mode and if there are already
N spaces (the previous behaviour).
Compare N with its value in previous invocation so that changing
prefix argument restarts `cycle-spacing' sequence.
The idea is that with this change, binding M-SPC to
`cycle-spacing' should not introduce any changes in behaviour of
the binding so long as users do not type M-SPC twice in a raw with
the same prefix argument or lack thereof.
Paul Eggert [Thu, 27 Mar 2014 22:52:14 +0000 (15:52 -0700)]
Port recent signal-related changes to FreeBSD.
Problem reported by Herbert J. Skuhra.
* lisp.h (block_tty_out_signal, unblock_tty_out_signal):
Move decls from here ...
* syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h.
Glenn Morris [Thu, 27 Mar 2014 20:57:23 +0000 (16:57 -0400)]
Simplify treatment of some startup hooks
* lisp/startup.el (inhibit-startup-hooks): Doc tweak.
(normal-top-level): Simplify running of hooks.
For window-setup-hook, respect inhibit-startup-hooks.
(command-line-1): Don't set window-setup-hook to nil.
Glenn Morris [Thu, 27 Mar 2014 19:41:57 +0000 (15:41 -0400)]
Require GNU make to build Emacs
Ref: http://debbugs.gnu.org/16717#45
If no-one objects, we can then start getting rid of some of the
convoluted Makefile hacks that exist to support non-GNU makes.
* configure.ac: Require GNU make.
(HAVE_GNU_MAKE): Remove.
* INSTALL, etc/NEWS, etc/PROBLEMS: Update for this change.
Glenn Morris [Thu, 27 Mar 2014 18:20:08 +0000 (14:20 -0400)]
vhdl-mode.texi clean-up
* doc/misc/vhdl-mode.texi: General clean-up.
Set copyright to FSF (years based on vhdl-mode releases), add license.
Remove hand-written node pointers. Remove info re old Emacs versions.
Markup fixes.
(Getting Connected): Remove irrelevant info.
(Indentation Commands, Requirements): Remove empty/irrelevant nodes.
(Frequently Asked Questions): Electric indent is now enabled.
* 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.
Reto Zimmermann [Wed, 26 Mar 2014 03:58:25 +0000 (20:58 -0700)]
Sync with upstream vhdl mode v3.35.1
* lisp/progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp): Update.
(vhdl-compiler-alist): Doc fix.
(vhdl-goto-line): Remove.
(vhdl-mode-abbrev-table-init): Add XEmacs compat.
(vhdl-mode) <paragraph-start>: Fix value.
(vhdl-fix-statement-region): Not `for' in wait-statement.
(vhdl-beautify-region): Also (un)tabify.
(vhdl-get-visible-signals):
Scan declarative part of generate statements.
(vhdl-template-record): Fix indentation for record type declaration.
(vhdl-expand-abbrev, vhdl-expand-paren): FIXME.
(vhdl-scan-directory-contents): Tweak.
(vhdl-speedbar-find-file, vhdl-speedbar-port-copy)
(vhdl-compose-components-package):
Replace vhdl-goto-line with forward-line.
(top-level): Tweak speedbar frame selection.
(vhdl-generate-makefile-1): Support for compilers with no
unit-to-file name mapping (create directory with dummy files).
Paul Eggert [Tue, 25 Mar 2014 14:43:26 +0000 (07:43 -0700)]
Handle sigmask better with nested signal handlers.
* atimer.c (sigmask_atimers): Remove.
Remaining use rewritten to use body of this function.
* atimer.c (block_atimers, unblock_atimers):
* callproc.c (block_child_signal, unblock_child_signal):
* sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
New arg OLDSET. All callers changed.
* atimer.c (block_atimers, unblock_atimers):
* callproc.c (block_child_signal, unblock_child_signal):
* keyboard.c (handle_interrupt):
* sound.c (vox_configure, vox_close):
Restore the old signal mask rather than unilaterally clearing bits
from the mask, in case a handler is running within another
handler. All callers changed.
* lisp.h, process.c, process.h, term.c:
Adjust decls and callers to match new API.
* sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE;
signal handlers aren't supposed to use floating point anyway.
(handle_arith_signal): Unblock just SIGFPE rather than clearing mask.
* 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.