* test/automated/file-notify-tests.el (file-notify--test-desc2):
New variable.
(file-notify--test-cleanup): Use it.
(file-notify--test-event-handler): Enable trace.
(file-notify-test08-watched-file-in-watched-dir): Tag it as
:expensive-test. Rewrite callbacks to use
`file-notify--test-event-handler'. Read events in loop. Check
`file-notify--test-results'.
(file-notify-test08-watched-file-in-watched-dir): Fix docstring.
Stephen Berman [Sat, 20 Feb 2016 12:44:47 +0000 (13:44 +0100)]
Fix todo-mode item date editing bugs
* lisp/calendar/todo-mode.el (todo-edit-item--header): Prevent out of
range error by making sure the value of the numerical month date
component cannot be nil. Prevent wrong type error on trying to edit
day number in February by making sure numerical instead of string
value of the year component is passed to todo-read-date.
(todo-read-date): When using the numerical month date component make
sure to use `*' for an arbitrary month instead of its numerical value.
Ari Roponen [Sat, 20 Feb 2016 07:57:44 +0000 (18:57 +1100)]
Use pop-to-buffer-same-window in woman.el
* lisp/woman.el (woman-really-find-file): Work around going to
the wrong buffer by using `pop-to-buffer-same-window' (bug#22332).
(WoMan-find-buffer): Ditto.
Martin Rudalics [Thu, 18 Feb 2016 10:25:07 +0000 (11:25 +0100)]
Fix bugs in window resizing code
* lisp/window.el (adjust-window-trailing-edge): Fix mismatched
parenthesis.
(shrink-window, enlarge-window): Fix bug#22723 where windows
with preserved size would not get resized. Also now signal an
error when the window cannot be shrunk or enlarged as requested.
Daiki Ueno [Wed, 17 Feb 2016 07:32:25 +0000 (16:32 +0900)]
Make GnuPG version check robuster
We changed the default gpg program to "gpg2" from "gpg" in the commit f93d669a16bd3cb3f43f0c8cfd22fe18b627a6a1. However, there are two
maintained branches (2.0 and 2.1) and Emacs doesn't work well with 2.0
series. Check the actual version of "gpg2" at run time, and properly
divert to "gpg" if necessary.
* lisp/epg-config.el: Require 'cl-lib for `cl-destructuring-bind'.
(epg-config--program-alist): New variable.
(epg--configurations): New variable.
(epg-configuration-find): New function.
(epg-config--make-gpg-configuration): New function.
(epg-config--make-gpgsm-configuration): New function.
(epg-configuration): Mark as obsolete.
* lisp/epg.el (epg-context): Use `epg-configuration-find'.
Eli Zaretskii [Mon, 15 Feb 2016 19:46:17 +0000 (21:46 +0200)]
Minor fixes in global-auto-composition-mode
* lisp/emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name):
Produce prettier names of globalized minor modes.
* lisp/composite.el (global-auto-composition-mode): Make it a
globalized mode. (Bug#22682)
Alan Mackenzie [Mon, 15 Feb 2016 12:45:42 +0000 (12:45 +0000)]
Allow arithmetic operators inside C++ template constructs.
Fixes debbugs #22486. This corrects the previous patch with this message
which was empty.
* lisp/progmodes/cc-langs.el (c-multichar->-op-not->>-regexp): New language
variable.
(c-<>-notable-chars-re): New language variable.
* lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur): User
c-<>-notable-chars-re in place of the former fixed string in searching for
places to stop and examine.
Use c-multichar->-op-not->>-regexp to check that a found ">" is not part of a
multichar operator in place of the former c->-op-without->-cont-regexp.
Add code to skip forwards over a balanced parenthesized expression.
Alan Mackenzie [Mon, 15 Feb 2016 12:45:42 +0000 (12:45 +0000)]
Allow arithmetic operators inside C++ template constructs.
Fixes debbugs #22486.
* lisp/progmodes/cc-langs.el (c-multichar->-op-not->>-regexp): New language
variable.
(c-<>-notable-chars-re): New language variable.
* lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur): User
c-<>-notable-chars-re in place of the former fixed string in searching for
places to stop and examine.
Use c-multichar->-op-not->>-regexp to check that a found ">" is not part of a
multichar operator in place of the former c->-op-without->-cont-regexp.
Add code to skip forwards over a balanced parenthesized expression.
Paul Eggert [Mon, 15 Feb 2016 03:24:38 +0000 (19:24 -0800)]
CONTRIBUTE cleanups and updates
* CONTRIBUTE: Mention URLs and info nodes more consistently,
avoiding possibly-confusing punctuation adjacent to a URL, and
giving full shell commands for 'info'. Start with a brief but
complete how-to, for people who want to get started right away.
Then briefly discuss how to join the development process in the
typical order. Omit needless words. Update some of the
now-obsolete file names, info node names, and quoting styles.
Better document emacs-NN branches and how they are merged.
* admin/notes/git-workflow: Change emacs-24 to emacs-25,
and trunk to master. This file still needs work.
Paul Eggert [Sun, 14 Feb 2016 19:19:39 +0000 (11:19 -0800)]
Port to x86 GCC 4.3.1 and earlier
This tries to port to x86 FreeBSD 9, where Emacs dumps core (Bug#22065).
* src/lisp.h (USE_STACK_LISP_OBJECTS): Default to false
for GCC 4.3.1 and earlier.
Eli Zaretskii [Sun, 14 Feb 2016 17:46:29 +0000 (19:46 +0200)]
Make 'mmap_realloc' on MS-Windows more reliable
* src/w32heap.c (mmap_alloc): If reserving memory succeeds, but
committing fails, return NULL. Don't call GetLastError twice for
the same API error.
(mmap_realloc): Zero out MEMORY_BASIC_INFORMATION structures
before calling VirtualQuery, to avoid using garbled values if the
call fails. If committing more pages from the same block fails,
fall back on mmap_alloc + CopyMemory. Enhance debugging printouts
if the call to VirtualAlloc to commit more pages fails.
(Bug#22526)
Paul Eggert [Sat, 13 Feb 2016 00:23:25 +0000 (16:23 -0800)]
Suppress GNUstep hardening
Fedora 23 normally hardens GNUstep applications, which causes
‘./configure --with-ns’ to break Emacs’s funky way of undumping.
Fix this by eliding the hardening options (Bug#22518).
* src/Makefile.in (LIBS_GNUSTEP): Omit options like
‘-specs=/usr/lib/rpm/redhat/redhat-hardened-ld’.
(GNU_OBJC_CFLAGS): Omit options like
‘-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1’.
Paul Eggert [Wed, 10 Feb 2016 19:40:09 +0000 (11:40 -0800)]
make-docfile cleanup for I/O, etc.
* lib-src/make-docfile.c (progname, generate_globals, num_globals)
(num_globals_allocated, globals): Now static.
(generate_globals, struct rcsoc_state, read_c_string_or_comment):
(write_c_args, scan_c_stream, search_lisp_doc_at_eol, scan_lisp_file):
Use bool for boolean.
(verror): New function.
(fatal, error): Use it. API is now like printf. All callers changed.
(main): Remove err_count local that was always 0.
(main, scan_c_stream, scan_lisp_file): Check for I/O error.
(scan_file, scan_c_file, scan_c_stream, scan_lisp_file):
Return void, not 0.
(put_char, scan_keyword_or_put_char, scan_c_file): Use char for byte.
(scan_keyword_or_put_char): Check for missing ( and unexpected EOF.
(close_emacs_globals): Use ptrdiff_t for index, not int.
(scan_c_file, scan_lisp_file): Exit with failure if file cannot be
opened, rather than diagnosing but exiting with status 0.
(search_lisp_doc_at_eol): Don't worry about ungetc of EOF; it's
portable now.
Paul Eggert [Wed, 10 Feb 2016 18:14:50 +0000 (10:14 -0800)]
Memory-management cleanup in make-docfile
I compiled it with -fsanitize=address and fixed the leaks it detected.
Also, I changed it to prefer signed to unsigned integer types,
and to check for integer overflow.
* lib-src/make-docfile.c:
Include <stddef.h>, <stdint.h>, <intprops.h>, <min-max.h>.
(memory_exhausted): New function.
(xmalloc, xrealloc): Use it.
(xmalloc, xrealloc, scan_file, struct rcsoc_state, write_c_args)
(uncompiled, scan_lisp_file):
Prefer signed integer types to unsigned.
(xstrdup): Remove. All uses removed.
(num_globals, num_globals_allocated, write_globals, scan_c_stream):
Use ptrdiff_t, not int, for indexes that in theory could exceed INT_MAX.
(add_global): Use const to pacify --enable-gcc-warnings.
Make a copy here, rather than relying on strdup calls later.
(add_global, write_globals, scan_c_stream):
Avoid integer overflow when calculating sizes.
(write_globals, scan_c_stream, scan_lisp_file): Avoid memory leak.
(scan_c_stream): Check for add_global failure.
Eli Zaretskii [Wed, 10 Feb 2016 18:30:12 +0000 (20:30 +0200)]
Improve doc strings of 'forward/backward-word-strictly'
* lisp/simple.el (backward-word): Refer to 'backward-word-strictly'
in the doc string. Suggested by Glenn Morris <rgm@gnu.org>.
* lisp/subr.el (forward-word-strictly, backward-word-strictly):
Mention 'subword-mode' in the doc strings.
* src/syntax.c (Fforward_word): Refer to 'forward-word-strictly'
in the doc string. (Bug#22560)
Dima Kogan [Wed, 10 Feb 2016 04:40:03 +0000 (15:40 +1100)]
Support integer image rotation and respect EXIF rotations
* src/image.c (imagemagick_load_image): Allow integer rotations in
addition to floating point rotations (bug#22591).
* src/image.c (imagemagick_load_image): Images that have an
orientation given in EXIF and have no explicit :rotation tag are now
pre-rotated. All information such as width/height is reported for the
rotated image.
Paul Eggert [Tue, 9 Feb 2016 23:01:44 +0000 (15:01 -0800)]
Suppress ACL ops if configured with --disable-acl
Without this patch, some ACL operations were suppressed, but not all.
* src/fileio.c [!USE_ACL]: Do not include sys/acl.h.
(Ffile_acl, Fset_file_acl) [!USE_ACL]: Return nil in this case.
Paul Eggert [Tue, 9 Feb 2016 17:06:40 +0000 (09:06 -0800)]
Sync with gnulib
This incorporates:
2016-02-09 stdalign: port to clang 3.7.0
2016-02-06 misc: port better to gcc -fsanitize=address
* doc/misc/texinfo.tex, lib/stdalign.in.h, m4/acl.m4, m4/getgroups.m4:
Copy from gnulib.
Paul Eggert [Tue, 9 Feb 2016 04:24:55 +0000 (20:24 -0800)]
Increase success rate of fallback lmalloc
* src/alloc.c (lmalloc, lrealloc): Reallocate with (typically)
larger and larger sizes, to increase the probability that
the allocator will return a Lisp-aligned pointer.
David Edmondson [Mon, 8 Feb 2016 23:26:52 +0000 (10:26 +1100)]
Compare recipient and keys case-insensitively
* lisp/gnus/mml2015.el: (mml-secure-check-user-id): When comparing a
recipient address with that from a key, do so in a case insensitive
manner (bug#22603).
Katsumi Yamaoka [Mon, 8 Feb 2016 22:41:25 +0000 (22:41 +0000)]
Refactor HTML images handling of Gnus and mm-* (a part of bug#21650)
* doc/misc/emacs-mime.texi (Display Customization):
Remove mm-inline-text-html-with-images; add documentations for
mm-html-inhibit-images and mm-html-blocked-images.
* lisp/gnus/gnus-art.el (gnus-article-show-images):
No need to bind mm-inline-text-html-with-images.
(gnus-bind-safe-url-regexp): Rename to gnus-bind-mm-vars.
(gnus-bind-mm-vars): Rename from gnus-bind-safe-url-regexp;
bind mm-html-inhibit-images and mm-html-blocked-images.
(gnus-mime-view-all-parts, gnus-mime-view-part-internally)
(gnus-mm-display-part, gnus-mime-display-single)
(gnus-mime-display-alternative): Use gnus-bind-mm-vars.
* lisp/gnus/mm-decode.el (mm-inline-text-html-with-images): Remove.
(mm-html-inhibit-images, mm-html-blocked-images): New user options.
(mm-shr): Bind shr-inhibit-images and shr-blocked-images with
mm-html-inhibit-images and mm-html-blocked-images respectively
instead of gnus-inhibit-images and gnus-blocked-images.
* lisp/gnus/mm-view.el (mm-setup-w3m): Use mm-html-inhibit-images
instead of mm-inline-text-html-with-images.
Paul Eggert [Mon, 8 Feb 2016 19:38:35 +0000 (11:38 -0800)]
Port to FreeBSD 11-CURRENT i386
Problem reported by Herbert J. Skuhra in:
http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00354.html
Instead of trying
* src/alloc.c (lmalloc, lrealloc, laligned): New functions.
(xmalloc, xzalloc, xrealloc, lisp_malloc): Use them.
(__alignof__) [!__GNUC__ && !__alignof__]: New macro.
(MALLOC_IS_GC_ALIGNED): New macro.
* src/lisp.h (NONPOINTER_BITS): Remove. All uses removed.
No longer needed now that alloc.c uses lmalloc and lrealloc.
Michael Albinus [Mon, 8 Feb 2016 09:54:43 +0000 (10:54 +0100)]
Some fixes in file-notify-tests.el
* test/automated/file-notify-tests.el
(file-notify--test-with-events-check)
(file-notify--test-with-events-explainer): New defuns.
(file-notify--test-with-events): Use it.
(file-notify-test07-backup): Fix docstring. Some of the
backends fire two `changed' events. Backup by rename doesn't
work for kqueue.
Michael Albinus [Sun, 7 Feb 2016 18:30:01 +0000 (19:30 +0100)]
Fix Bug#22557
* lisp/filenotify.el (file-notify-callback): Do not send a
`stopped' event in case of backup by renaming. (Bug#22557)
* test/automated/Makefile.in: Use $(SELECTOR_EXPENSIVE) for
all targets but check and check-maybe.
* test/automated/file-notify-tests.el
(file-notify--test-read-event-timeout): New defconst.
(file-notify--deftest-remote, file-notify--wait-for-events)
(file-notify-test02-events)
(file-notify-test04-file-validity)
(file-notify-test06-many-events): Use it.
(file-notify--test-cleanup): Make it more robust. Delete also
backup file.
(file-notify-test07-backup): New test.
Paul Eggert [Sun, 7 Feb 2016 15:46:59 +0000 (07:46 -0800)]
Fix test for dladdr
Problem reported by Andreas Schwab in:
http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00327.html
* configure.ac (dladdr): Link with LIBMODULES when checking for
this function.