]> code.delx.au - gnu-emacs/log
gnu-emacs
7 years ago; Merge from origin/emacs-25
Paul Eggert [Sat, 18 Jun 2016 22:47:01 +0000 (00:47 +0200)]
; Merge from origin/emacs-25

The following commit was skipped:

e18ee60 Bump version to 25.0.95

7 years agoMerge from origin/emacs-25
Paul Eggert [Sat, 18 Jun 2016 22:47:00 +0000 (00:47 +0200)]
Merge from origin/emacs-25

9ae514a * etc/AUTHORS: Update the AUTHORS file
3ca428e add entries to authors.el
66d556b Fix eldoc-related freezes in python mode
d59bcbc Handle mouse leaving initial window in `mouse-set-region' (Bu...
27fe1e4 org.el: Fix bindings of < and > for calendar scrolling
a813487 Fix undo boundary in recursive edit (Bug#23632)
1f85b7c Doc fixes re alist-get.  (Bug#23548)
ba3f206 * lisp/progmodes/python.el (inferior-python-mode): Avoid tabs...
56fa055 * src/syntax.c (syms_of_syntax) <comment-end-can-be-escaped>:...
4c1370a * lisp/help-fns.el (describe-function-1): Fix handling of fil...
a3f7ae8 * lisp/emacs-lisp/cl-macs.el (cl-loop): Doc fix re "by".
601b9b2 * doc/misc/cl.texi (Mapping over Sequences): Fix cl-notevery.

7 years ago* lisp/emacs-lisp/map.el (map-contains-key): Better docstring
Nicolas Petton [Sat, 18 Jun 2016 08:09:16 +0000 (10:09 +0200)]
* lisp/emacs-lisp/map.el (map-contains-key): Better docstring

7 years agoFix seq-contains
Nicolas Petton [Sat, 18 Jun 2016 08:07:26 +0000 (10:07 +0200)]
Fix seq-contains

Make sure seq-contains return the element of the sequence instead of t.

* lisp/emacs-lisp/seq.el (seq-contains): Fix the function.
* test/lisp/emacs-lisp/seq-tests.el: Add a regression test.

7 years agoAdd new function map-do
Nicolas Petton [Sat, 18 Jun 2016 07:42:09 +0000 (09:42 +0200)]
Add new function map-do

* lisp/emacs-lisp/map.el (map-do, map--do-alist, map--do-array): New
  functions.
* test/lisp/emacs-lisp/map-tests.el: Add a unit test for map-do.

7 years agoAdd seq-do-indexed
Nicolas Petton [Sat, 18 Jun 2016 07:32:18 +0000 (09:32 +0200)]
Add seq-do-indexed

* lisp/emacs-lisp/seq.el (seq-do-indexed): New function.
* test/lisp/emacs-lisp/seq-tests.el: Add a unit test for seq-do-indexed.

7 years agomap.el (map-merge*): Use `map-into' at beginning rather than end
Stefan Monnier [Sat, 18 Jun 2016 04:52:58 +0000 (00:52 -0400)]
map.el (map-merge*): Use `map-into' at beginning rather than end

* lisp/emacs-lisp/map.el (map-merge): Use `map-into' for the first map,
and don't use of an intermediate alist.
(map-merge-with): Same, plus use `cl-callf' to try and avoid performing
3 lookups per inner iteration.

7 years ago* lisp/window.el (switch-to-buffer-preserve-window-point): Bump :version.
Mark Oteiza [Thu, 16 Jun 2016 23:57:39 +0000 (19:57 -0400)]
* lisp/window.el (switch-to-buffer-preserve-window-point): Bump :version.

7 years agoSpeed up CC Mode's font locking by taking some code out of a hot loop.
Alan Mackenzie [Wed, 15 Jun 2016 22:06:14 +0000 (22:06 +0000)]
Speed up CC Mode's font locking by taking some code out of a hot loop.

* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Remove code which
tests for bare declarators.
(c-font-lock-cut-off-declarators): New function.
(c-complex-decl-matchers): insert c-font-lock-cut-off-declarators.

7 years agoAutomatically find vars and functions via definition-prefixes
Stefan Monnier [Wed, 15 Jun 2016 17:21:59 +0000 (13:21 -0400)]
Automatically find vars and functions via definition-prefixes

* lisp/help-fns.el (help-definition-prefixes): New var and function.
(help--loaded-p, help--load-prefixes, help--symbol-completion-table):
New functions.
(describe-function, describe-variable): Use them.

* lisp/emacs-lisp/radix-tree.el (radix-tree--prefixes)
(radix-tree-prefixes, radix-tree-from-map): New functions.

7 years agoAutomatically detect whether .h file is C or C++
Michal Nazarewicz [Tue, 7 Jun 2016 12:05:36 +0000 (14:05 +0200)]
Automatically detect whether .h file is C or C++

* lisp/progmodes/cc-mode.el (c-or-c++-mode): A new function which
analyses contents of the buffer to determine whether it looks like C++
source code and based on that enables c-mode or c++-mode.
(c-or-c++-mode--regexp): Regular expression which, when matches
a buffer, signals file is C++.

7 years agoParse compound identifiers in C++ member initialization lists.
Alan Mackenzie [Wed, 15 Jun 2016 15:57:37 +0000 (15:57 +0000)]
Parse compound identifiers in C++ member initialization lists.

* lisp/progmodes/cc-engine.el (c-back-over-compound-identifier): New function.
(c-back-over-member-initializer-braces, c-back-over-list-of-member-inits)
(c-back-over-member-initializers): Call c-back-over-compound-identifier rather
than c-simple-skip-symbol-backward.

7 years agoAdvertize set-keymap-parent as replacement for copy-keymap
Stefan Monnier [Wed, 15 Jun 2016 15:36:51 +0000 (11:36 -0400)]
Advertize set-keymap-parent as replacement for copy-keymap

* doc/lispref/keymaps.texi (Creating Keymaps):
* src/keymap.c (Fcopy_keymap): Advertize set-keymap-parent as replacement.

7 years ago* generic-x.el (ansible-inventory-generic-mode): Warn if value is missing
Ted Zlatanov [Wed, 15 Jun 2016 14:18:31 +0000 (10:18 -0400)]
* generic-x.el (ansible-inventory-generic-mode): Warn if value is missing

7 years agoAdd new ansible-inventory-generic-mode (Bug#23762)
Tim Chambers [Sun, 12 Jun 2016 05:13:40 +0000 (23:13 -0600)]
Add new ansible-inventory-generic-mode (Bug#23762)

* lisp/generic-x.el (ansible-inventory-generic-mode): Add new mode.

Copyright-paperwork-exempt: yes

7 years agoFix ifdef-vs-if typo with RANDR13_LIBRARY
Paul Eggert [Wed, 15 Jun 2016 05:40:18 +0000 (22:40 -0700)]
Fix ifdef-vs-if typo with RANDR13_LIBRARY

* src/xfns.c (x_get_monitor_attributes_xrandr): Use #if, not #ifdef.
This ports to systems that predate xrandr 1.3. See Christian Lynbech in:
http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00198.html

7 years agoPort to platforms where char * has top bit set
Paul Eggert [Tue, 14 Jun 2016 19:19:36 +0000 (12:19 -0700)]
Port to platforms where char * has top bit set

This fixes a five-year-old FIXME comment.  Although I don’t know
of a platform where this is a problem in practice, better safe
than sorry.
* src/doc.c (Fdocumentation): If SUBRP, simply use doc as integer,
as it is now an integer, not char *.
(store_function_docstring): Offset is now EMACS_INT, not ptrdiff_t;
this is a file offset and EMACS_INT is better if --with-wide-int.
If SUBRP, simply store the offset rather than negating it and
converting it to char *.
* src/lisp.h (struct Lisp_Subr.doc): Now EMACS_INT, not char *.

7 years agoRemove recursion from store_function_docstring
Paul Eggert [Tue, 14 Jun 2016 18:46:30 +0000 (11:46 -0700)]
Remove recursion from store_function_docstring

* src/doc.c (store_function_docstring):
Refactor to avoid the need for C-level recursion.

7 years agoRemove system-specific -I switch from Cygwin-w32 build
Ken Brown [Tue, 14 Jun 2016 13:50:38 +0000 (09:50 -0400)]
Remove system-specific -I switch from Cygwin-w32 build

Suggested by Eli Zaretskii in discussion of bug#18302.

* src/image.c [HAVE_NTGUI]: Remove the unused macro
PIXEL_ALREADY_TYPEDEFED.  On Cygwin, include "noX/xpm.h" instead of
"X11/xpm.h".

* configure.ac [CYGWIN && HAVE_W32]: Change the xpm test to use
"noX/xpm.h".  Don't add a -I switch to CPPFLAGS.

7 years agoMake python.el work in Emacs 24
Noam Postavsky [Sat, 4 Jun 2016 17:32:50 +0000 (13:32 -0400)]
Make python.el work in Emacs 24

* lisp/progmodes/python.el: Bump version.
(python-define-auxiliary-skeleton): Only use format-message if
fbound (Bug#23126).

7 years agoAvoid compiler warning
Ken Brown [Mon, 13 Jun 2016 23:26:05 +0000 (19:26 -0400)]
Avoid compiler warning

* src/w32fns.c (deliver_wm_chars): Add 'const' to declaration of
'type_CtrlAlt'.

7 years agoCall tzset after setting TZ
Paul Eggert [Mon, 13 Jun 2016 21:50:08 +0000 (14:50 -0700)]
Call tzset after setting TZ

* src/editfns.c (tzlookup): Call tzset after setting TZ, so that
the setting change propagates into Emacs local time (Bug#23600).
(emacs_setenv_TZ): Clarify comments.

7 years agoUpdate texinfo.tex
Paul Eggert [Mon, 13 Jun 2016 17:04:11 +0000 (10:04 -0700)]
Update texinfo.tex

* doc/misc/texinfo.tex: Update from gnulib.

7 years agoNew macro GNUC_PREREQ for GCC version
Paul Eggert [Sun, 12 Jun 2016 17:31:25 +0000 (10:31 -0700)]
New macro GNUC_PREREQ for GCC version

* src/conf_post.h (GNUC_PREREQ): New macro.
Change uses of __GNUC_MINOR__ and __GNUC_PATCHLEVEL__ to use this
macro instead, for clarity and consistency.
(PRINTF_ARCHETYPE): New macro.  Define it to __gnu_printf__ only
if glibc, since non-GNU platforms don’t necessarily support GNU
printf formats.
(ATTRIBUTE_FORMAT_PRINTF): Use it.

7 years ago* lisp/emacs-lisp/seq.el (seq-drop): Better list implementation
Nicolas Petton [Sun, 12 Jun 2016 10:37:16 +0000 (12:37 +0200)]
* lisp/emacs-lisp/seq.el (seq-drop): Better list implementation

7 years agoFix printf-related compilation warnings on MinGW
Eli Zaretskii [Sun, 12 Jun 2016 08:30:14 +0000 (11:30 +0300)]
Fix printf-related compilation warnings on MinGW

* src/conf_post.h (ATTRIBUTE_FORMAT_PRINTF) [__MINGW32__]: Use
'__ms_printf__', not '__gnu_printf__', as the latter is not what
MS 'printf' supports, and causes bogus compilation warnings.
* src/lisp.h (pI) [__MINGW32__]: Define to "I64", as MS 'printf'
doesn't support the "ll" modifier.

7 years agoemacs_strerror cleanups
Paul Eggert [Sun, 12 Jun 2016 06:48:13 +0000 (23:48 -0700)]
emacs_strerror cleanups

* src/buffer.c, src/emacs.c, src/lread.c: Don’t include coding.h;
no longer needed, now that emacs_strerror is declared by lisp.h.
* src/coding.c (emacs_strerror): Remove; moved to emacs.c.
* src/coding.h (emacs_strerror) [emacs]: Remove decl; moved
to lisp.h.
* src/emacs.c (emacs_strerror): Move here from coding.c.  Do not
convert result string; this is now the caller’s responsibility,
as some need conversion and others don’t.
* src/fileio.c (report_file_errno, report_file_notify_error):
Use emacs_strerror rather than rolling it ourselves.
* src/lisp.h (emacs_strerror): Move decl here from coding.h.
* src/lread.c (dir_warning): Just call emacs_strerror rather than
both strerror and emacs_strerror.  Convert its result from
locale-coding-system, since it no longer does that conversion.
* src/sound.c (sound_perror):
* src/sysdep.c (emacs_perror, str_collate):
Use emacs_strerror, not strerror.

7 years agoPrevent compiler warning for unused arguments
David Reitter [Sat, 11 Jun 2016 01:58:20 +0000 (11:58 +1000)]
Prevent compiler warning for unused arguments

* lisp/international/ucs-normalize.el
(ucs-normalize-hfs-nfd-pre-write-conversion):
Prevent compiler warning for unused arguments, add coment.

7 years agoCatch malloc_get_state, malloc_set_state failure
Paul Eggert [Sat, 11 Jun 2016 00:18:24 +0000 (17:18 -0700)]
Catch malloc_get_state, malloc_set_state failure

This should help insulate Emacs better from configuration screwups.
Future versions of the GNU C library are planned to deprecate
these functions, but will continue to support them in
already-built-and-dumped Emacs executables.
* src/alloc.c (malloc_initialize_hook) [DOUG_LEA_MALLOC]:
Abort if malloc_set_state fails.
(alloc_unexec_pre) [DOUG_LEA_MALLOC]:
Report malloc_get_state failure, and exit.

7 years agoBump version to 25.0.95 emacs-25.0.95
Nicolas Petton [Fri, 10 Jun 2016 22:24:29 +0000 (00:24 +0200)]
Bump version to 25.0.95

* README:
* configure.ac:
* lisp/ldefs-boot.el:
* msdos/sed2v2.inp: Bump Emacs version to 25.0.95.

7 years ago* etc/AUTHORS: Update the AUTHORS file
Nicolas Petton [Fri, 10 Jun 2016 22:24:21 +0000 (00:24 +0200)]
* etc/AUTHORS: Update the AUTHORS file

7 years agoadd entries to authors.el
Nicolas Petton [Fri, 10 Jun 2016 22:04:58 +0000 (00:04 +0200)]
add entries to authors.el

* admin/authors.el (authors-renamed-files-alist): Add char-fold files.

7 years agoFix eldoc-related freezes in python mode
Jules Tamagnan [Fri, 10 Jun 2016 09:08:29 +0000 (12:08 +0300)]
Fix eldoc-related freezes in python mode

* lisp/progmodes/python.el (python-eldoc-get-doc): New defvar.
(python-eldoc-function-timeout)
(python-eldoc-function-timeout-permanent): New defcustoms.
(python-eldoc-function): If python-eldoc--get-doc-at-point times
out, effectively turn off ElDoc in current buffer.  (Bug#23609)

7 years agoShow returned value after gdb-mi "finish" command
Eli Zaretskii [Fri, 10 Jun 2016 08:57:17 +0000 (11:57 +0300)]
Show returned value after gdb-mi "finish" command

* lisp/progmodes/gdb-mi.el (gdb-stopped): Display the expected
"Value returned" message in response to "finish", when not
produced by GDB/MI.  (Bug#23720)

7 years agoSimplify pre-write-conversion for utf-8-hfs coding system
David Reitter [Fri, 10 Jun 2016 07:58:41 +0000 (17:58 +1000)]
Simplify pre-write-conversion for utf-8-hfs coding system

* lisp/international/ucs-normalize.el
(ucs-normalize-hfs-nfd-pre-write-conversion): Refactor.

May address an issue where Emacs consumed large amounts of CPU
because of neverending toolbar updating (which was caused
by, but also called this function).

7 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Martin Rudalics [Fri, 10 Jun 2016 06:22:16 +0000 (08:22 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

7 years agoRevert "Bind `widget-button-click' to mouse-1/-2 instead of down-mouse-1/-2"
Martin Rudalics [Fri, 10 Jun 2016 06:21:33 +0000 (08:21 +0200)]
Revert "Bind `widget-button-click' to mouse-1/-2 instead of down-mouse-1/-2"

* lisp/wid-edit.el (widget-keymap): Bind `widget-button-click'
to mouse-1/-2 instead of down-mouse-1/-2.  Suggested by Stefan
Monnier.  (Bug#19185, Bug#20398)

This reverts commit 72166f2f3dba18f1217c666574032f5a0351ed65.

That commit did more harm than good (Bug#23571).

7 years agoPort __builtin_assume_aligned to Sun C 5.13
Paul Eggert [Fri, 10 Jun 2016 06:15:41 +0000 (23:15 -0700)]
Port __builtin_assume_aligned to Sun C 5.13

* src/conf_post.h (__builtin_assume_aligned):
Fix typo: the extra arg did not conform to C99.

7 years agoPrefer getsockopt to getpeername on non-MS-Windows
Paul Eggert [Fri, 10 Jun 2016 06:11:40 +0000 (23:11 -0700)]
Prefer getsockopt to getpeername on non-MS-Windows

* admin/CPP-DEFINES: Remove HAVE_GETPEERNAME.
* configure.ac: Don’t check for getpeername.
* src/process.c (wait_reading_process_output) [!WINDOWSNT]:
Use getsockopt even if not GNU/Linux, as the platforms where
getsockopt used to hang are no doubt long dead.

7 years agoFix XFASTINT of non-fixnum in process status
Paul Eggert [Fri, 10 Jun 2016 04:58:16 +0000 (21:58 -0700)]
Fix XFASTINT of non-fixnum in process status

* src/process.c (decode_status): 3rd arg is now Lisp_Object *,
not int *, and is not decoded.  All uses changed.
(status_message): Do not assume ‘failed’ code is an integer.
* src/process.h: Document codes better.

7 years ago; Refer to version 25.2 rather than 26.1.
Glenn Morris [Fri, 10 Jun 2016 04:55:02 +0000 (00:55 -0400)]
; Refer to version 25.2 rather than 26.1.
; I hope the next release from master is indeed 26.1, but for reasons
; that passeth my understanding we currently call it 25.2 everywhere else,
; so we should at least be consistent.

7 years agoMake messcompat.el obsolete.
Glenn Morris [Fri, 10 Jun 2016 04:28:16 +0000 (21:28 -0700)]
Make messcompat.el obsolete.

* lisp/obsolete/messcompat.el: Move here from lisp/gnus.
* doc/misc/message.texi (Compatibility): Remove section.

7 years agoLeading "*" in the doc of defvars is long obsolete.
Glenn Morris [Fri, 10 Jun 2016 04:23:33 +0000 (00:23 -0400)]
Leading "*" in the doc of defvars is long obsolete.

* lisp/plstore.el (plstore-encrypt-to):
* lisp/cedet/semantic/lex-spp.el
(semantic-lex-spp-macro-max-length-to-save):
* lisp/cedet/semantic/symref.el (semantic-symref-tool):
* lisp/cedet/semantic/bovine/el.el
(semantic-elisp-store-documentation-in-tag):
* lisp/cedet/semantic/wisent/comp.el (wisent-verbose-flag)
(wisent-expected-conflicts):
* lisp/cedet/semantic/wisent/wisent.el (wisent-parse-verbose-flag):
* lisp/gnus/gnus-agent.el (gnus-category-menu-hook):
* lisp/gnus/gnus-group.el (gnus-group-listing-limit):
* lisp/gnus/gnus-srvr.el (gnus-server-menu-hook)
(gnus-browse-menu-hook):
* lisp/gnus/message.el (message-shoot-gnksa-feet):
* lisp/gnus/mm-decode.el (mm-path-name-rewrite-functions):
* lisp/gnus/mm-util.el (mm-extra-numeric-entities):
* lisp/gnus/mm-view.el (mm-w3m-standalone-supports-m17n-p):
* lisp/gnus/mml.el (mml-generate-multipart-alist):
* lisp/gnus/nndraft.el (nndraft-required-headers):
* lisp/gnus/nnheader.el (nnheader-max-head-length)
(nnheader-head-chop-length, nnheader-file-name-translation-alist)
(nnheader-directory-separator-character)
(nnheader-pathname-coding-system):
* lisp/gnus/nnmail.el (nnmail-pathname-coding-system)
(nnmail-active-file-coding-system):
* lisp/gnus/nnrss.el (nnrss-file-coding-system):
* lisp/gnus/nntp.el (nntp-record-commands):
* lisp/gnus/score-mode.el (gnus-score-edit-done-hook)
(gnus-score-mode-hook, gnus-score-menu-hook):
* lisp/mail/rfc2047.el (rfc2047-header-encoding-alist)
(rfc2047-allow-irregular-q-encoded-words)
(rfc2047-allow-incomplete-encoded-text):
* lisp/mh-e/mh-alias.el (mh-alias-system-aliases):
* lisp/mh-e/mh-e.el (mh-mail-header-separator, mh-x-mailer-string):
* lisp/mh-e/mh-scan.el (mh-scan-format-mh, mh-scan-format-nmh):
* lisp/net/pop3.el (pop3-password):
* lisp/play/animate.el (animate-n-steps):
* lisp/progmodes/cc-vars.el (c-old-style-variable-behavior):
Convert from defvar with leading * to defcustom.

; * lisp/cedet/semantic/lex.el: Comments.

* lisp/emulation/viper-init.el (viper-heading-end):
* lisp/gnus/mm-url.el (mm-url-html-entities):
* lisp/gnus/nnmaildir.el (nnmaildir-article-file-name):
* lisp/mh-e/mh-e.el (mh-invisible-header-fields-compiled):
* lisp/net/tramp-adb.el (tramp-adb-method): Remove leading * from doc.

* lisp/gnus/messcompat.el: Mark (pointless) file not for compilation.
(message-from-style, message-interactive, message-indentation-spaces)
(message-signature, message-signature-file):
Remove settings that match the defaults.
(message-setup-hook, message-mode-hook, message-default-headers)
(message-send-hook, message-send-mail-function):
Just use setq rather than redefining.

* lisp/gnus/nnrss.el (nnrss):
* lisp/mail/rfc2047.el (rfc2047):
* lisp/play/animate.el (animate): New custom groups.

7 years agoRemove obsolete leading * from defcustom, defface doc strings.
Glenn Morris [Fri, 10 Jun 2016 00:13:12 +0000 (20:13 -0400)]
Remove obsolete leading * from defcustom, defface doc strings.

* lisp/cedet/ede/linux.el, lisp/cedet/ede/project-am.el:
* lisp/cedet/ede/simple.el, lisp/cedet/semantic/bovine/c.el:
* lisp/cedet/semantic/complete.el, lisp/cedet/semantic/db.el:
* lisp/cedet/semantic/decorate/include.el:
* lisp/cedet/semantic/decorate/mode.el, lisp/cedet/semantic/format.el:
* lisp/cedet/semantic/ia.el, lisp/cedet/semantic/idle.el:
* lisp/cedet/semantic/imenu.el, lisp/cedet/semantic/lex-spp.el:
* lisp/cedet/semantic/mru-bookmark.el, lisp/cedet/semantic/sb.el:
* lisp/cedet/srecode/fields.el, lisp/ecomplete.el:
* lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el:
* lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el:
* lisp/gnus/gnus-cite.el, lisp/gnus/gnus-delay.el:
* lisp/gnus/gnus-diary.el, lisp/gnus/gnus-dup.el:
* lisp/gnus/gnus-fun.el, lisp/gnus/gnus-group.el:
* lisp/gnus/gnus-kill.el, lisp/gnus/gnus-msg.el:
* lisp/gnus/gnus-picon.el, lisp/gnus/gnus-salt.el:
* lisp/gnus/gnus-score.el, lisp/gnus/gnus-start.el:
* lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el:
* lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el:
* lisp/gnus/gnus.el, lisp/gnus/mail-source.el, lisp/gnus/message.el:
* lisp/gnus/mm-url.el, lisp/gnus/mm-uu.el, lisp/gnus/mml.el:
* lisp/gnus/nndiary.el, lisp/gnus/nnir.el, lisp/gnus/nnmail.el:
* lisp/gnus/smiley.el, lisp/gnus/smime.el, lisp/mail/mail-extr.el:
* lisp/mh-e/mh-e.el, lisp/net/mailcap.el, lisp/net/pop3.el:
* lisp/net/starttls.el, lisp/progmodes/cc-vars.el:
* lisp/progmodes/cperl-mode.el, test/manual/cedet/tests/test.el:
Remove obsolete leading * from defcustom, defface doc strings.

7 years agoFix copying text properties by 'format'
Eli Zaretskii [Thu, 9 Jun 2016 13:52:08 +0000 (16:52 +0300)]
Fix copying text properties by 'format'

* src/editfns.c (styled_format): Fix copying text properties from
the format specification to the produced string representation.
(Bug#23730)
(Fformat) Doc fix.

* doc/lispref/strings.texi (Formatting Strings): Document that
text properties from the format specifiers are also copied to the
produced string.

7 years agoHandle C++ raw strings.
Alan Mackenzie [Thu, 9 Jun 2016 12:24:27 +0000 (12:24 +0000)]
Handle C++ raw strings.

* lisp/progmodes/cc-engine.el (c-raw-string-pos, c-depropertize-raw-string)
(c-depropertize-raw-strings-in-region,
c-before-change-check-raw-strings)
(c-propertize-raw-string-opener, c-after-change-re-mark-raw-strings): New
functions.

* lisp/progmodes/cc-fonts.el (c-basic-matchers-before): Insert a clause for
c-font-lock-raw-strings.
(c-font-lock-raw-strings): New function.

* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Insert
c-before-change-check-raw-strings into the C++ value, and c-depropertize-CPP
into the values for C, C++, and Objective C.
(c-before-font-lock-functions): Insert c-after-change-re-mark-raw-strings into
the C++ value.

* lisp/progmodes/cc-mode.el (c-old-BEG, c-old-END): New variables.
(c-depropertize-CPP): New function, extracted from
c-neutralize-syntax-in-and-mark-CPP.
(c-neutralize-syntax-in-and-mark-CPP): Remove the call to
c-clear-char-property-with-value for 'syntax-table value '(1) at the beginning
of the function.
(c-after-change): Set c-old-BEG and c-old-END to the current values of
c-new-BEG and c-new-END.

7 years agoepg: don't use obsolete function
Daiki Ueno [Thu, 9 Jun 2016 08:30:00 +0000 (17:30 +0900)]
epg: don't use obsolete function

* lisp/epg.el (epg-sign-string, epg-encrypt-string): Remove
redundant configuration check, which is now done in
`epg-make-context'.

7 years agoepg: don't start pinentry if it is useless
Daiki Ueno [Thu, 9 Jun 2016 08:23:38 +0000 (17:23 +0900)]
epg: don't start pinentry if it is useless

* lisp/epg.el (epg--start): Don't start pinentry server if the
session is non-interactive or pinentry-mode is set.

7 years agoHandle mouse leaving initial window in `mouse-set-region' (Bug#23707)
Martin Rudalics [Thu, 9 Jun 2016 08:12:48 +0000 (10:12 +0200)]
Handle mouse leaving initial window in `mouse-set-region' (Bug#23707)

* lisp/mouse.el (mouse-set-region): If the mouse ends up in
another window or on the menu bar, use `window-point' of
selected window instead of `posn-point' of the event end
(Bug#23707).

7 years agoorg.el: Fix bindings of < and > for calendar scrolling
Marco Wahl [Wed, 8 Jun 2016 23:03:34 +0000 (16:03 -0700)]
org.el: Fix bindings of < and > for calendar scrolling

[This patch taken from upstream Org repo with 8b63dc9 dated
2014-10-20 (Bug#23725).]
* lisp/org/org.el (org-read-date-minibuffer-local-map):
Switch to the current calendar API for scrolling the calendar.

7 years agoFix undo boundary in recursive edit (Bug#23632)
Phillip Lord [Mon, 6 Jun 2016 08:35:17 +0000 (09:35 +0100)]
Fix undo boundary in recursive edit (Bug#23632)

 * src/keyboard.c (recursive_edit_1): specbind
   undo-auto--undoably-changed-buffers.
 * lisp/simple.el (undo-auto--undoably-changed-buffers):
   fix docstring.

7 years agoReplace IF_LINT by NONVOLATILE and UNINIT
Paul Eggert [Wed, 8 Jun 2016 17:33:34 +0000 (10:33 -0700)]
Replace IF_LINT by NONVOLATILE and UNINIT

Inspired by a suggestion from RMS in: http://bugs.gnu.org/23640#58
* .dir-locals.el (c-mode): Adjust to macro changes.
* src/conf_post.h (NONVOLATILE, UNINIT): New macros (Bug#23640).
(IF_LINT): Remove.  All uses replaced by the new macros.

7 years agoRemove ‘ert-with-function-mocked’ macro in favour of ‘cl-letf’ macro
Michal Nazarewicz [Tue, 7 Jun 2016 20:32:59 +0000 (22:32 +0200)]
Remove ‘ert-with-function-mocked’ macro in favour of ‘cl-letf’ macro

* lisp/emacs-lisp/ert-x.el (ert-with-function-mocked): Remove macro
in favour of ‘cl-letf’ macro which is more generic.  All existing
uses are migrated accordingly.  The macro has not been included in
an official release yet so it should be fine to delete it.

7 years ago* test/lisp/emacs-lisp/package-tests.el
Glenn Morris [Wed, 8 Jun 2016 16:47:08 +0000 (12:47 -0400)]
* test/lisp/emacs-lisp/package-tests.el
(package-test-update-archives-async): Try re-enabling on hydra.

7 years ago* src/fileio.c (auto_save_error): Omit unused local.
Paul Eggert [Wed, 8 Jun 2016 07:35:51 +0000 (00:35 -0700)]
* src/fileio.c (auto_save_error): Omit unused local.

7 years agoSimplify overflow check via INT_SUBTRACT_WRAPV
Paul Eggert [Wed, 8 Jun 2016 07:35:11 +0000 (00:35 -0700)]
Simplify overflow check via INT_SUBTRACT_WRAPV

* src/editfns.c (check_tm_member): Simplify integer overflow check.

7 years agoTry to avoid hangs and stray procs in network-stream-tests. (Bug#23560)
Glenn Morris [Wed, 8 Jun 2016 03:50:35 +0000 (20:50 -0700)]
Try to avoid hangs and stray procs in network-stream-tests.  (Bug#23560)

* test/lisp/net/network-stream-tests.el (connect-to-tls-ipv4-wait)
(connect-to-tls-ipv4-nowait, connect-to-tls-ipv6-nowait):
Ensure gnutls-serv process gets killed.
(echo-server-nowait, connect-to-tls-ipv4-nowait):
Limit the amount of time we might wait.

7 years agoReduce allout.el's pollution of the namespace.
Glenn Morris [Wed, 8 Jun 2016 01:34:51 +0000 (21:34 -0400)]
Reduce allout.el's pollution of the namespace.

* lisp/allout.el (allout-set-regexp): Rename from set-allout-regexp.
Keep old name as obsolete alias.
(allout-produce-mode-menubar-entries, allout-nullify-prefix-data)
(allout-solicit-char-in-string)
(allout-count-trailing-whitespace-region, allout-regexp-sans-escapes):
Rename to add an "allout-" prefix.

7 years ago* configure.ac (emacs_config_features): Add CANNOT_DUMP.
Glenn Morris [Wed, 8 Jun 2016 01:31:08 +0000 (21:31 -0400)]
* configure.ac (emacs_config_features): Add CANNOT_DUMP.

7 years agoMisc small webjump updates.
Glenn Morris [Wed, 8 Jun 2016 01:29:30 +0000 (21:29 -0400)]
Misc small webjump updates.

* lisp/net/webjump.el (webjump): Add custom group.
(webjump-sample-sites): Make it a constant.
Remove explicit, old list of GNU ftp mirrors.
(webjump-state-to-postal-alist): Make it a constant.
(webjump-sites): Make it a defcustom.
(webjump-to-iwin): Update for changed remote service.

7 years agoDo not hard-code port for package test server. (Bug#23708)
Glenn Morris [Wed, 8 Jun 2016 01:25:20 +0000 (21:25 -0400)]
Do not hard-code port for package test server.  (Bug#23708)

* test/lisp/emacs-lisp/package-resources/package-test-server.py:
Do not hard-code port.
* test/lisp/emacs-lisp/package-tests.el (package-test-update-archives-async):
Update for the above change.

7 years ago* lisp/ibuffer.el (ibuffer): Improve 'other-window' case. (Bug#23617)
Tino Calancha [Wed, 8 Jun 2016 00:35:24 +0000 (20:35 -0400)]
* lisp/ibuffer.el (ibuffer): Improve 'other-window' case.  (Bug#23617)

7 years agoDoc fixes re alist-get. (Bug#23548)
Glenn Morris [Tue, 7 Jun 2016 23:59:37 +0000 (19:59 -0400)]
Doc fixes re alist-get.  (Bug#23548)

* lisp/subr.el (alist-get): Doc fix.
* doc/lispref/lists.texi (Association Lists): Improve alist-get.
; * etc/NEWS: Related edit.

7 years ago* src/fileio.c (auto_save_error): Use display-warning. (Bug#23703)
Glenn Morris [Tue, 7 Jun 2016 23:31:29 +0000 (19:31 -0400)]
* src/fileio.c (auto_save_error): Use display-warning.  (Bug#23703)

7 years ago* lisp/ibuf-ext.el (ibuffer-do-shell-command-file):
Tino Calancha [Tue, 7 Jun 2016 23:24:51 +0000 (19:24 -0400)]
* lisp/ibuf-ext.el (ibuffer-do-shell-command-file):
Fix non-file-visiting-buffer case.  (Bug#22678)

7 years agoPort --enable-gcc-warnings to clang 3.7.0
Paul Eggert [Tue, 7 Jun 2016 23:18:02 +0000 (16:18 -0700)]
Port --enable-gcc-warnings to clang 3.7.0

* configure.ac: Add -Wno-tautological-compare to avoid bogus
warnings about 0 <= rlim.rlim_max.  Remove flags that no longer
seem to be needed, at least in Fedora 23 x86-64.

7 years agoUse __builtin_assume_aligned on untagged Lisp vals
Paul Eggert [Tue, 7 Jun 2016 22:41:51 +0000 (15:41 -0700)]
Use __builtin_assume_aligned on untagged Lisp vals

* src/conf_post.h (__has_builtin, __builtin_assume_aligned):
New macros, for compilers not already defining them.
(__has_builtin___builtin_assume_aligned): New macro.
* src/lisp.h (lisp_h_XUNTAG): Use __builtin_assume_aligned.
This shrinks text space by 0.2% on x86-64 with GCC 6.1.

7 years ago* lisp/progmodes/python.el (inferior-python-mode):
Glenn Morris [Tue, 7 Jun 2016 22:26:33 +0000 (18:26 -0400)]
* lisp/progmodes/python.el (inferior-python-mode):
Avoid tabs.  (Bug#23616)

7 years ago* src/syntax.c (syms_of_syntax) <comment-end-can-be-escaped>: Doc fix.
Glenn Morris [Tue, 7 Jun 2016 21:39:19 +0000 (17:39 -0400)]
* src/syntax.c (syms_of_syntax) <comment-end-can-be-escaped>: Doc fix.

7 years ago* lisp/help-fns.el (describe-function-1): Avoid reporting advised
Glenn Morris [Tue, 7 Jun 2016 20:44:48 +0000 (16:44 -0400)]
* lisp/help-fns.el (describe-function-1): Avoid reporting advised
aliases as the type of their targets.

7 years ago* lisp/help-fns.el (describe-function-1):
Tino Calancha [Tue, 7 Jun 2016 20:42:59 +0000 (16:42 -0400)]
* lisp/help-fns.el (describe-function-1):
Fix handling of file name for aliases.  (Bug#21950)

7 years ago* lisp/simple.el (process-menu-mode, list-processes--refresh):
Tino Calancha [Tue, 7 Jun 2016 19:06:38 +0000 (15:06 -0400)]
* lisp/simple.el (process-menu-mode, list-processes--refresh):
Include PID.  (Bug#21725)

7 years ago; * etc/NEWS: Fix a typo.
Glenn Morris [Tue, 7 Jun 2016 17:55:33 +0000 (13:55 -0400)]
; * etc/NEWS: Fix a typo.

7 years ago* lisp/emacs-lisp/cl-macs.el (cl-loop): Doc fix re "by".
Tino Calancha [Tue, 7 Jun 2016 17:48:11 +0000 (13:48 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl-loop): Doc fix re "by".

7 years ago* doc/misc/cl.texi (Mapping over Sequences): Fix cl-notevery.
Tino Calancha [Tue, 7 Jun 2016 17:46:33 +0000 (13:46 -0400)]
* doc/misc/cl.texi (Mapping over Sequences): Fix cl-notevery.

7 years agoMerge from origin/emacs-25
Paul Eggert [Tue, 7 Jun 2016 16:34:27 +0000 (09:34 -0700)]
Merge from origin/emacs-25

6e3adf8 Fix crash in syntax.c after GC
973ce5a Improve squiggly heredoc support in non-SMIE Ruby mode
9d5cceb Fix doc string quoting
0b33a23 Fix mouse dragging of vertical dividers with scroll bars on l...
a5d05f4 * etc/PROBLEMS: Mention the link-time problems on FreeBSD 11.

7 years ago; Merge from origin/emacs-25
Paul Eggert [Tue, 7 Jun 2016 16:34:27 +0000 (09:34 -0700)]
; Merge from origin/emacs-25

The following commit was skipped:

9c28e70 ; Auto-commit of loaddefs files.

7 years agoMerge from origin/emacs-25
Paul Eggert [Tue, 7 Jun 2016 16:34:27 +0000 (09:34 -0700)]
Merge from origin/emacs-25

604f656 * test/automated/viper-tests.el (viper-test-undo-kmacro): Del...
20eb531 * lisp/mail/footnote.el (footnote-mode): Fix doc typo.
a7a2244 * doc/misc/smtpmail.texi (Encryption): Fix 2012-12-22 typo.
07bd972 * lisp/emacs-lisp/lisp-mode.el (lisp--mode-syntax-table): Fix...

7 years agoFix crash in syntax.c after GC
Paul Eggert [Tue, 7 Jun 2016 16:28:49 +0000 (09:28 -0700)]
Fix crash in syntax.c after GC

Problem reported by Vincent Belaïche (Bug#23704).
* src/syntax.c (skip_chars): Recompute pointers into the
buffer after every call to update_syntax_table_forward,
as it can GC.

7 years agoImprove squiggly heredoc support in non-SMIE Ruby mode
Dmitry Gutov [Tue, 7 Jun 2016 01:06:33 +0000 (04:06 +0300)]
Improve squiggly heredoc support in non-SMIE Ruby mode

* lisp/progmodes/ruby-mode.el (ruby-parse-partial): Support
squiggly heredocs here, too (port from upstream).

7 years agoUse standard Unicode names for Thai, Lao
Paul Eggert [Mon, 6 Jun 2016 17:43:10 +0000 (10:43 -0700)]
Use standard Unicode names for Thai, Lao

* lisp/language/lao-util.el, lisp/language/thai-util.el:
Don’t override standard Unicode character name (Bug#23698).

7 years ago* lisp/man.el (Man-reference-regexp, Man-default-man-entry):
Glenn Morris [Mon, 6 Jun 2016 17:04:43 +0000 (13:04 -0400)]
* lisp/man.el (Man-reference-regexp, Man-default-man-entry):
Handle U+2010 hyphen at eol, as used when LANG=en_US.utf8.

7 years agoFix doc string quoting
Stephen Berman [Mon, 6 Jun 2016 16:29:17 +0000 (09:29 -0700)]
Fix doc string quoting

* lisp/files.el (shell-quote-wildcard-pattern):
* lisp/progmodes/vhdl-mode.el (vhdl-mode):
* lisp/subr.el (replace-regexp-in-string):
* lisp/view.el (view-mode):
* src/nsfns.m (syms_of_nsfns):
* src/syntax.c (Fbackward_prefix_chars):
Fix quoting problems in doc strings (Bug#23696).

7 years agoSome fixes in filenotify-tests.el for cygwin
Michael Albinus [Mon, 6 Jun 2016 16:25:28 +0000 (18:25 +0200)]
Some fixes in filenotify-tests.el for cygwin

* test/lisp/filenotify-tests.el (file-notify--test-timeout):
Reintroduce value for cygwin, it's needed on slow systems.
(file-notify--wait-for-events): Move up definition.
(file-notify--test-no-descriptors): Use `file-notify--wait-for-events'.
(file-notify--test-with-events-check, file-notify--test-with-events)
(file-notify-test08-watched-file-in-watched-dir):
Use :random rather than `random.
(file-notify-test06-many-events): Do not skip for cygwin.

7 years ago* src/casefiddle.c (Fupcase_region): Add arg ‘region-noncontiguous-p’.
Juri Linkov [Sun, 5 Jun 2016 21:23:21 +0000 (00:23 +0300)]
* src/casefiddle.c (Fupcase_region): Add arg ‘region-noncontiguous-p’.

If non-nil, operate on multiple chunks.  (Bug#23655)

* src/search.c (Freplace_match): Use Qnil for new arg of Fupcase_region.

7 years ago* lisp/wdired.el (wdired-next-line, wdired-previous-line): Add "^"
Juri Linkov [Sun, 5 Jun 2016 21:16:17 +0000 (00:16 +0300)]
* lisp/wdired.el (wdired-next-line, wdired-previous-line): Add "^"

to interactive spec to handle shift-selection.  (Bug#23642)

7 years agoImprove robustness of filenotify-tests.el (Bug#23618)
Michael Albinus [Sun, 5 Jun 2016 17:49:16 +0000 (19:49 +0200)]
Improve robustness of filenotify-tests.el (Bug#23618)

* test/lisp/filenotify-tests.el (file-notify--test-no-descriptors)
(file-notify--test-no-descriptors-explainer)
(file-notify--test-cleanup-p): New defuns.
(file-notify--test-cleanup): Don't check for
`file-notify--test-event' anymore, that's done in
`file-notify--test-no-descriptors'.
(file-notify--test-with-events-check)
(file-notify--test-with-events): Handle the `random' marker.
(file-notify--test-with-events-explainer): Improve readability.
(file-notify-test00-availability)
(file-notify-test01-add-watch, file-notify-test02-events)
(file-notify-test03-autorevert)
(file-notify-test04-file-validity)
(file-notify-test05-dir-validity)
(file-notify-test06-many-events, file-notify-test07-backup)
(file-notify-test08-watched-file-in-watched-dir)
(file-notify-test09-sufficient-resources): Check also
`file-notify--test-cleanup-p'.
(file-notify-test04-file-validity)
(file-notify-test05-dir-validity): Use `ignore' as handler.
(file-notify-test05-dir-validity)
(file-notify-test06-many-events): Delete directory finally.
(file-notify-test08-watched-file-in-watched-dir): Add `random' marker.

7 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
K. Handa [Sun, 5 Jun 2016 11:49:55 +0000 (20:49 +0900)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

7 years agoman.el: Fix links on hyphenated words (bug#23647)
Stephen Berman [Sun, 5 Jun 2016 11:14:44 +0000 (13:14 +0200)]
man.el: Fix links on hyphenated words (bug#23647)

* lisp/man.el (Man-bgproc-sentinel): Make links work on
hyphenated words.

7 years agoFix mouse dragging of vertical dividers with scroll bars on left (Bug#23690)
Martin Rudalics [Sun, 5 Jun 2016 09:50:47 +0000 (11:50 +0200)]
Fix mouse dragging of vertical dividers with scroll bars on left (Bug#23690)

* lisp/mouse.el (mouse-drag-line): With scroll bars on the left
adjust trailing edge of window on the left when dragging the
vertical divider of the mode line.  (Bug#23690)

7 years agoAdd category 'j' to more characters.
K. Handa [Sun, 5 Jun 2016 07:23:02 +0000 (16:23 +0900)]
Add category 'j' to more characters.

* lisp/international/characters.el: Add category 'j' (Japanese)
to characters in japanese-jisx0213.2004-1.

7 years agoisearch-edit-string resumes multi isearches
Tino Calancha [Sat, 4 Jun 2016 22:06:12 +0000 (01:06 +0300)]
isearch-edit-string resumes multi isearches

* lisp/isearch.el (with-isearch-suspended): Remember and restore
multi-isearch variables.  (Bug#21663)

7 years ago* etc/PROBLEMS: Mention the link-time problems on FreeBSD 11.
Eli Zaretskii [Sat, 4 Jun 2016 15:45:46 +0000 (18:45 +0300)]
* etc/PROBLEMS: Mention the link-time problems on FreeBSD 11.

(Bug#23641)

7 years agoFix Eshell display when RTL characters are involved
Eli Zaretskii [Sat, 4 Jun 2016 15:27:49 +0000 (18:27 +0300)]
Fix Eshell display when RTL characters are involved

* lisp/eshell/esh-mode.el (eshell-mode): Set
'bidi-paragraph-direction' to 'left-to-right'.  (Bug#23652)

7 years agoPort angle-bracket TZ settings to MS-Windows
Paul Eggert [Thu, 2 Jun 2016 04:00:58 +0000 (21:00 -0700)]
Port angle-bracket TZ settings to MS-Windows

* doc/lispref/os.texi (Time Zone Rules): Document MS-Windows
lack of support for numeric time zone abbreviations.
* src/w32.c (sys_putenv): Convert angle-bracket TZ syntax
to MS-compatible syntax if possible, and to "ZZZ" otherwise.
Problem reported by Kazuhiro Ito (Bug#23600).

7 years agoAvoid delving into Git internals for version
Paul Eggert [Wed, 1 Jun 2016 20:25:09 +0000 (13:25 -0700)]
Avoid delving into Git internals for version

* lisp/loadup.el (exec-path): Set it to nil later, so that
emacs-repository-get-version can invoke git commands in the PATH.
* lisp/version.el (emacs-repository--version-git-1): Remove.
(emacs-repository-get-version): Let Git do it rather than
delving into Git internals.

7 years ago* lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Expand less
Stefan Monnier [Wed, 1 Jun 2016 18:54:40 +0000 (14:54 -0400)]
* lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Expand less

7 years agoFix emacs-repository-get-version with packed .git
Paul Eggert [Wed, 1 Jun 2016 17:28:43 +0000 (10:28 -0700)]
Fix emacs-repository-get-version with packed .git

* lisp/version.el (emacs-repository-get-version):
Parse .git/packed-refs if it exists.
Problem reported by Martin Rudalics in:
http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00554.html

7 years agoMinor change in tramp.texi
Michael Albinus [Wed, 1 Jun 2016 14:43:20 +0000 (16:43 +0200)]
Minor change in tramp.texi

* doc/misc/tramp.texi (Password handling): Do not discuss
anymore how to get password-cache.el.  It is bundled with
Emacs.

7 years agoCorrect fontification and indentation of C++'s "constexpr" expressions
Alan Mackenzie [Wed, 1 Jun 2016 13:31:47 +0000 (13:31 +0000)]
Correct fontification and indentation of C++'s "constexpr" expressions

* lisp/progmodes/cc-langs.el (c-type-modifier-kwds): Remove "constexpr".
(c-modifier-kwds): Add "constexpr".