* doc/emacs/programs.texi (Matching): Add descriptions of some pertinent user
options, including the new show-paren-when-point-inside-paren and
show-paren-when-point-in-periphery.
* etc/NEWS (.. Specialized Modes ...): Add an entry for Show Paren mode.
Move an entry on pcase to the Lisp Changes section.
Eli Zaretskii [Wed, 16 Dec 2015 10:40:33 +0000 (12:40 +0200)]
Fix invocation of Python and Guile interpreters from gdb-mi
* lisp/progmodes/gdb-mi.el (gdb-control-commands-regexp): Add
commands for interactive Python and Guile interpreters.
(gdb-send): Recognize various ways of exiting from Python and
Guile interpreters and returning to GDB. For details, see
http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00693.html
and http://stackoverflow.com/questions/31514741.
Paul Eggert [Wed, 16 Dec 2015 07:10:12 +0000 (23:10 -0800)]
Remove attempt to use C11 threads
C11 threads are not needed for Emacs now, and their use is causing
hassles on FreeBSD 10.x. Problem reported by Ashish SHUKLA in:
http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00648.html
* configure.ac: Do not check for C11 threads. Remove unnecessary
fiddling with CPPFLAGS when configuring pthreads.
* src/emacs-module.c (main_thread, check_main_thread)
(module_init): Do not worry about C11 threads.
Michael Albinus [Tue, 15 Dec 2015 22:54:11 +0000 (23:54 +0100)]
Set utf8 encoding with stty in Tramp
* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Move up uname check. Handle Mac OS X eol encoding. Set utf8
encoding with stty.
Tassilo Horn [Sun, 13 Dec 2015 18:41:58 +0000 (19:41 +0100)]
Improve regex to not trigger stack overflow
* lisp/textmodes/reftex-vars.el (reftex-label-regexps): Improve regex in
order not to trigger a stack overflow in regex matcher with unbalanced
brackets (bug#22146).
Paul Eggert [Sun, 13 Dec 2015 03:27:51 +0000 (19:27 -0800)]
Fix performance regression with gcc -O0
This fixes the smaller performance hit that I noted in:
https://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00357.html
* src/alloc.c (macro_XPNTR_OR_SYMBOL_OFFSET, macro_XPNTR):
* src/puresize.h (puresize_h_PURE_P)
(puresize_h_CHECK_IMPURE):
New macros, with the old contents of the functions.
* src/alloc.c (XPNTR_OR_SYMBOL_OFFSET, XPNTR):
* src/puresize.h (PURE_P, CHECK_IMPURE):
Use the new macros. Also macros, if DEFINE_KEY_OPS_AS_MACROS.
* src/conf_post.h (ATTRIBUTE_UNUSED):
* src/lisp.h (DEFINE_KEY_OPS_AS_MACROS): New macros.
Martin Rudalics [Sat, 12 Dec 2015 13:38:11 +0000 (14:38 +0100)]
Fix frame height calculations with added menu bar on Windows (Bug#22105)
* doc/lispref/frames.texi (Parameter Access): Mention pitfalls
when simultaneously specifying multiple parameters for
`modify-frame-parameters' that all may change the frame's size.
* src/w32fns.c (x_set_menu_bar_lines): Don't set
windows_or_buffers_changed here.
(my_create_tip_window, Fx_show_tip): Call AdjustWindowRect
with third argument false.
* src/w32menu.c (set_frame_menubar): Set
windows_or_buffers_changed here.
* src/w32term.c (x_set_window_size): Determine third argument of
AdjustWindowRect from whether the frame has a menu bar and not
from whether it wants one.
Eli Zaretskii [Sat, 12 Dec 2015 13:17:14 +0000 (15:17 +0200)]
Document new features of package.el
* doc/emacs/package.texi (Package Menu): Document the 'external'
status and the new menu commands.
(Package Installation): Document archive priorities.
Eli Zaretskii [Fri, 11 Dec 2015 10:50:53 +0000 (12:50 +0200)]
Avoid errors when creating files under SVN in new directory
* lisp/vc/vc-svn.el (vc-svn-registered): Use
file-accessible-directory-p, to avoid cd'ing to a non-existing
directory, which signals an error on some systems. (Bug#21984)
(vc-svn-checkin): Call log-edit-extract-headers with 2 arguments.
Use declare-function to avoid byte-compiler warnings.
Anders Lindgren [Fri, 11 Dec 2015 05:46:19 +0000 (06:46 +0100)]
; Restore selector `member' accidentally drooped in ert rewrite.
; `test/automated/ert.el' and `test/automated/ert-x.el' now run
; without errors.
* lisp/emacs-lisp/ert.el (ert--insert-human-readable-selector): Add
the `member' selector. This was accidentally dropped when code was
converted from `cl-typecase' (where `member' has a special meaning)
and `cl-ecase' (where it doesn't) to `pcase'.
Eli Zaretskii [Wed, 9 Dec 2015 18:03:54 +0000 (20:03 +0200)]
Yet another fix for when point ends up in invisible text
* src/xdisp.c (redisplay_window): When someone forced
window-start, and honoring that failed to show the cursor, try
moving out of invisible text, before falling back to the middle of
the window. (Bug#22098)
Paul Eggert [Mon, 7 Dec 2015 16:35:53 +0000 (08:35 -0800)]
Spelling fixes
* doc/misc/calc.texi (Predefined Units): Use the bland modern
scientific style for spelling the units “ampere” and
“angstrom” rather than the older style “Ampere” and
“Ångstrom”. The latter spelling was wrong anyway (it should
have been “Ångström”).
* lisp/emacs-lisp/ert.el (ert--explain-equal-rec):
Fix misspelling of ‘atom’ in code.
Eli Zaretskii [Mon, 7 Dec 2015 16:20:43 +0000 (18:20 +0200)]
Improve documentation of kill commands
* lisp/simple.el (region-extract-function, delete-backward-char)
(delete-forward-char, kill-region, copy-region-as-kill)
(kill-ring-save): Better document the optional argument REGION in
the doc strings. Mention in the doc strings that text put in the
kill-ring can be filtered by 'filter-buffer-substring'.
* doc/lispref/text.texi (Kill Functions): Mention that functions
described in this subsection can filter text they put in the
kill-ring. Add a cross-reference to "Buffer Contents" and an
index entry. Document the optional argument 'region' and its
effect.
(Bug#21315)
Michael Albinus [Mon, 7 Dec 2015 08:15:27 +0000 (08:15 +0000)]
Fix an utf8 problem for Tramp on BSD
* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Make lax check for utf8.
(tramp-get-remote-locale): Add "en_US.UTF-8" as candidate.
Paul Eggert [Sun, 6 Dec 2015 23:07:19 +0000 (15:07 -0800)]
Remove overenthusiastic eassert
* src/lisp.h (XSYMBOL): Remove eassert incorrectly added in
previous change. It breaks on MS-Windows --with-wide-int.
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00275.html
Michael Albinus [Sun, 6 Dec 2015 17:55:50 +0000 (18:55 +0100)]
Fix minor Tramp problems found on BSD
* lisp/net/tramp-sh.el (tramp-perl-file-truename): Do not append
trailing slash. Quote apostrophes.
(tramp-sh-handle-file-truename): Do not append trailing slash in
the "ls" case.
(tramp-get-ls-command-with-w-option): New defun.
(tramp-do-file-attributes-with-ls)
(tramp-do-directory-files-and-attributes-with-stat): Use it.
* test/automated/tramp-tests.el
(tramp-test31-special-characters-with-perl)
(tramp-test31-special-characters-with-ls)
(tramp-test32-utf8-with-perl, tramp-test32-utf8-with-ls):
Suppress also readlink.
Eli Zaretskii [Sun, 6 Dec 2015 17:27:12 +0000 (19:27 +0200)]
Fix cursor display when invisible text is at line beginning
* src/xdisp.c (redisplay_window): When scrolling fails to show
point, prefer using the desired matrix if possible for finding the
fallback glyph row for displaying the cursor. (Bug#22098)
(row_containing_pos): Exit the loop as soon as we hit the first
disabled glyph row. Otherwise we risk accessing garbled data and
departing to the no-no land.
Paul Eggert [Sun, 6 Dec 2015 17:09:07 +0000 (09:09 -0800)]
Improve module interface when WIDE_EMACS_INT
* src/emacs-module.c (plain_values): New constant.
(module_nil): Now a constant.
(Finternal_module_call, value_to_lisp_bits, lisp_to_value_bits)
(syms_of_module): Use if, not #ifdef, so that both sides are
checked at compile-time, and so that GCC doesn’t complain
about an unused var in the typical case. Also, depend on
plain_values, not on WIDE_EMACS_INT; the code shouldn’t assume
that WIDE_EMACS_INT implies !USE_LSB_TAG.
(value_to_lisp_bits, lisp_to_value_bits): New functions.
Sign-extend integers rather than zero-extending them, as small
negative integers are more likely.
(value_to_lisp, lisp_to_value): Rewrite in terms of the new *_bits
functions.
(HAVE_STRUCT_ATTRIBUTE_ALIGNED): Define to 0 if not already defined.
(mark_modules): Remove. All uses removed.
(lisp_to_value): Don’t assume Fcons returns a pointer aligned
to GCALIGNMENT.
(syms_of_module): Check that module_nil converts to Qnil.
* src/lisp.h (lisp_h_XSYMBOL, XSYMBOL): Use signed conversion, since
we prefer signed to unsigned when either will do.
(TAG_PTR): Sign-extend pointers when USE_LSB_TAG, as this is
a bit better for emacs-module.c.
Paul Eggert [Sun, 6 Dec 2015 16:55:30 +0000 (08:55 -0800)]
Port mod-test to x86-64 GNU/Linux running 32-bit
* modules/mod-test/test.el (mod-test-sum-test):
Don’t attempt to match descriptions to operating systems.
It didn’t work on Fedora x86-64 running a 32-bit executable,
and it’s not worth the trouble anyway.
Port to 32-bit platforms by removing an assumption about
fixnum widths.
Artur Malabarba [Sat, 5 Dec 2015 16:37:01 +0000 (16:37 +0000)]
* lisp/emacs-lisp/package.el: Don't install bad signatures (bug#22089)
(package--with-response-buffer): NOERROR and ERROR-FORM only
handle connection errors.
(bad-signature): New error type.
(package--check-signature-content): Use it.
(package--check-signature): Properly distinguish connection errors
from bad-signature errors. Do the check for
`package-check-signature' `allow-unsigned' here instead of forcing
the callbacks to do it. Add a new argument, UNWIND.
(package--download-one-archive, package-install-from-archive):
Update usage of `package--check-signature'.
Ulf Jasper [Sat, 5 Dec 2015 15:55:49 +0000 (16:55 +0100)]
Fix Bug#22092.
* lisp/calendar/icalendar.el (icalendar--get-unfolded-buffer):
Clean up inconsistent line endings. (Bug#22092)
(icalendar--clean-up-line-endings): New.
* test/automated/icalendar-tests.el (icalendar-real-world): Add test
for Bug#22092.
Eli Zaretskii [Sat, 5 Dec 2015 11:51:09 +0000 (13:51 +0200)]
Initial documentation of dynamic modules
* doc/lispref/loading.texi (Dynamic Modules): New section with
initial documentation for dynamic modules.
* doc/lispref/elisp.texi (Top): Add "Dynamic Modules" to the
detailed menu
Eli Zaretskii [Sat, 5 Dec 2015 10:52:54 +0000 (12:52 +0200)]
Add "Preliminaries" section to etc/DEBUG
* etc/DEBUG: Add the "Preliminaries" section for GDB beginners.
Most of the content was suggested by Phillip Lord
<phillip.lord@russet.org.uk>. Remove the section about debugging
with the Visual Studio, as building Emacs with the Microsoft
compilers is no longer supported. Minor fixes in some other
sections.
Alex Dunn [Sat, 5 Dec 2015 09:32:01 +0000 (11:32 +0200)]
Improve parsing of version strings
* lisp/subr.el (version-regexp-alist): Allow "." as priority separator
(version-to-list): More helpful error messages.
(version-to-list): ".5" is valid (update docstring). Make
"22.8X3" invalid, as the doc string says.
* test/automated/subr-tests.el (ert-test-version-parsing): New
tests for version string processing.
Glenn Morris [Sat, 5 Dec 2015 00:49:07 +0000 (19:49 -0500)]
* lisp/net/net-utils.el: Small improvements.
(net-utils--executable-find-sbin): New function.
(ifconfig-program): Check sbin directories.
Fallback to "ip". (Bug#22091)
(ifconfig-program-options): Check the actual program in use.
(arp-program): Check sbin directories.
Artur Malabarba [Fri, 4 Dec 2015 15:12:10 +0000 (15:12 +0000)]
* lisp/character-fold.el: Remove special case-folding support
(character-fold-to-regexp): Remove special code for
case-folding. Char-fold search still respects the
`case-fold-search' variable (i.e., f matches F). This only
removes the code that was added to ensure that f also matched
all chars that F matched. For instance, after this commit, f
no longer matches 𝔽.
This was necessary because the logic created a regexp with
2^(length of the string) redundant paths. So, when a very
long string "almost" matched, Emacs took a very long time to
figure out that it didn't. This became particularly relevant
because isearch's lazy-highlight does a search bounded by (1-
match-end) (which, in most circumstances, is a search that
almost matches). A recipe for this can be found in bug#22090.