* lisp/net/shr.el (shr-image-from-data): Don't bug out on
image data: URLs that have no base64 encoding like
(shr-image-from-data
"text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E").
Paul Eggert [Sun, 3 Dec 2017 05:31:24 +0000 (21:31 -0800)]
Fix bug in i18n/l10n optimization
This fixes a off-by-one buffer overrun bug introduced in
2017-06-04T15:39:37Z!eggert@cs.ucla.edu. Problem uncovered by an
experimental version of Emacs built with -fcheck-pointer-bounds
and running on Intel MPX hardware.
* src/editfns.c (styled_format): Avoid overrunning internal buffers.
Noam Postavsky [Mon, 27 Nov 2017 00:16:16 +0000 (19:16 -0500)]
Improve edit-kbd-macro prompting in case of remapped keys (Bug#29399)
* lisp/edmacro.el (edit-kbd-macro): Use substitute-command-keys to
present the current bindings in the prompt. Check the the
non-remapped binding of the entered key sequence as well.
Eli Zaretskii [Sat, 2 Dec 2017 11:29:39 +0000 (13:29 +0200)]
Fix byte compilation of files with leading directories
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Pass basename
of target-file to make-temp-file, in case target-file includes a
leading directory that might not exist under TMPDIR. See
http://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00680.html
for the details.
Michael Albinus [Sat, 2 Dec 2017 11:09:57 +0000 (12:09 +0100)]
Revert Tramp commit from 2017-11-20
* lisp/net/tramp.el (tramp-drop-volume-letter)
(tramp-handle-find-backup-file-name): Revert change from
2017-11-20. Emacs' `make-backup-file-name-1' handles this
case now.
Eli Zaretskii [Sat, 2 Dec 2017 10:56:45 +0000 (12:56 +0200)]
Improve documentation of buffer-list commands and features
* doc/emacs/buffers.texi (List Buffers): Add a cross-reference to
"Several Buffers", to establish a relation between the two
sections.
(Buffer Menus): Expand on customizability of alternative buffer
menu offered by bs.el. Mention IBuffer.
Suggested by Alex Branham <alex.branham@gmail.com> in
emacs-manual-bugs@gnu.org.
Eli Zaretskii [Sat, 2 Dec 2017 08:57:15 +0000 (10:57 +0200)]
Fix backing up remote files in local directories on MS-Windows
* lisp/files.el (make-backup-file-name-1): Support remote file
names correctly when they are backed up into a local directory on
MS-Windows and MS-DOS. (Bug#29440)
Eli Zaretskii [Fri, 1 Dec 2017 10:40:26 +0000 (12:40 +0200)]
Fix backing up remote files in local directories on MS-Windows
* lisp/files.el (make-backup-file-name-1): Support remote file
names correctly when they are backed up into a local directory on
MS-Windows and MS-DOS. (Bug#29440)
Tak Kunihiro [Fri, 1 Dec 2017 08:54:37 +0000 (10:54 +0200)]
Fix vertical cursor motion in pixel-scroll.el
* lisp/pixel-scroll.el (pixel-scroll-up): Move cursor down
regardless of whether EOB is shown at the top.
(pixel-scroll-down) Move cursor up regardless of whether BOB
is shown at the top. (Bug#29374)
Paul Eggert [Thu, 30 Nov 2017 23:22:46 +0000 (15:22 -0800)]
Port better to QNX
Problem reported by Elad Lahav on emacs-devel.
* configure.ac: On QNX, default CC to qcc (a GCC wrapper),
and default LDFLAGS to -N2MB so that the initial stack size
is not too small. Also, fix misspelling of ‘qnxnto’.
* test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name):
Extend test.
(tramp-test17-insert-directory): Make check more robust.
(tramp-test42-auto-load): Combine several let forms.
(tramp-test42-delay-load, tramp-test42-recursive-load)
(tramp-test42-remote-load-path, tramp-test43-unload): Rename.
Glenn Morris [Wed, 29 Nov 2017 00:58:32 +0000 (19:58 -0500)]
Remove some bogus definition-prefixes from loaddefs
* lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads):
Don't register a definition prefix from define-erc-module,
which adds an erc- prefix to its argument.
Kaushal Modi [Tue, 28 Nov 2017 17:17:48 +0000 (19:17 +0200)]
Update documentation of '.dir-locals-2.el'
See https://lists.gnu.org/r/emacs-devel/2017-11/msg00649.html
for more details.
* lisp/files.el (dir-locals-file-2): Remove unused constant.
* lisp/files.el (dir-locals-file): Mention ".dir-locals-2.el" in
the doc string.
* doc/lispref/variables.texi (Directory Local Variables): Mention
".dir-locals-2.el".
* etc/NEWS: Replace `dir-locals-file-2' mention with
`dir-locals-file'.
Michael Albinus [Mon, 27 Nov 2017 12:31:53 +0000 (13:31 +0100)]
Fix Bug#29163
* lisp/net/tramp.el (tramp-autoload-file-name-regexp):
Do not use "\\'" in regexp. (Bug#29163)
(top) Do not run (tramp-register-autoload-file-name-handlers)
when loading tramp.el.
* test/lisp/net/tramp-tests.el (tramp--test-mock-p): New defun.
(tramp-test32-environment-variables-and-port-numbers)
(tramp-test41-asynchronous-requests): Use it.
(tramp-test42-auto-load): New test.
(tramp-test43-recursive-load, tramp-test44-remote-load-path)
(tramp-test45-delay-load, tramp-test46-unload): Rename.
Paul Eggert [Mon, 27 Nov 2017 03:15:14 +0000 (19:15 -0800)]
Harden exec_byte_code against redefining 'error'
Problem discovered by configuring with --enable-gcc-warnings on
Ubuntu 17.10 x86-64 with gcc (Ubuntu 7.2.0-8ubuntu3).
* src/bytecode.c (exec_byte_code): Call the C error function
instead of the Lisp one, so that the Emacs interpreter does not go
haywire if the user redefines the Lisp error function.
Gemini Lasswell [Mon, 6 Nov 2017 05:36:58 +0000 (21:36 -0800)]
Fix Edebug specs for if-let* and and-let* (Bug#29236)
* test/lisp/emacs-lisp/subr-x.el (if-let*, if-let): Change Edebug
spec to cause Edebug to instrument tests the results of which are
not bound to symbols (the (VALUEFORM) case).
(and-let*): Change Edebug spec to allow empty body.
*test/lisp/emacs-lisp/subr-x-tests.el:
(subr-x-and-let*-test-group-1): Add missing quote to erroneous
form so Edebug will work on this test.
Gemini Lasswell [Thu, 2 Nov 2017 04:13:02 +0000 (21:13 -0700)]
Fix Edebug's handling of dotted specs (bug#6415)
* lisp/emacs-lisp/cl-macs.el (cl-destructuring-bind): Use
cl-macro-list1 instead of cl-macro-list in Edebug spec.
* lisp/emacs-lisp/edebug.el (edebug-after-dotted-spec): Delete
unused variable.
(edebug-dotted-spec): Add docstring.
(edebug-match-specs): Allow &optional and &rest specs to
match nothing at the tail of a dotted form. Handle matches of
dotted form tails which return non-lists.
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-dotted-forms):
New test.
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el:
(edebug-test-code-use-destructuring-bind): New function.
Eli Zaretskii [Sun, 26 Nov 2017 18:23:15 +0000 (20:23 +0200)]
Improve documentation of "constant" symbols
* src/font.c (syms_of_font) <font-weight-table, font-slant-table>
<font-width-table>:
* src/data.c (syms_of_data) <most-positive-fixnum>
<most-negative-fixnum>:
* src/buffer.c (syms_of_buffer) <enable-multibyte-characters>:
Mention in the doc strings that these variables are read-only.
* doc/lispref/variables.texi (Creating Buffer-Local): Document
that making a constant variable buffer-local signals an error.
* doc/lispref/variables.texi (Constant Variables):
* doc/lispref/errors.texi (Standard Errors): More accurate and
up-to-date documentation of which symbols cannot be assigned
values.
Paul Eggert [Sun, 26 Nov 2017 00:11:43 +0000 (16:11 -0800)]
Work around GCC bug 80776 on Fedora 27 x86
* src/buffer.c (Fgenerate_new_buffer_name): Pacify GCC 7.2.1 20170915 (Red Hat 7.2.1-2) on i686 with -Wformat-overflow -O2 by
using XINT rather than XFASTINT and by adding an eassume. This
works around GCC bug 80776.
Paul Eggert [Sat, 25 Nov 2017 21:04:30 +0000 (13:04 -0800)]
Tweak copy-file, rename-file doc
* src/fileio.c (Fcopy_file, Frename_file): Tweak the recent change
slightly, as NEWNAME is treated as a directory name depending only
on the contents of the NEWNAME string, and independently of
whether NEWNAME names a directory (i.e., whether the directory
exists) (Bug#29362).
Eli Zaretskii [Sat, 25 Nov 2017 10:35:09 +0000 (12:35 +0200)]
Make sure 'dired-filename' property is always put by ls-lisp
* lisp/ls-lisp.el (ls-lisp-classify): Do not put the
'dired-filename' text property on the file name here...
(ls-lisp-classify-file): ...put it here instead. (Bug#29423)
Eli Zaretskii [Fri, 24 Nov 2017 14:36:33 +0000 (16:36 +0200)]
Improve discoverability of 'defvar' for suppressing warnings
* doc/lispref/compile.texi (Compiler Errors): Add index entries.
* doc/lispref/variables.texi (Defining Variables): Mention that
defvar with no value is used for suppressing compiler warnings.
(Bug#29400)
Eli Zaretskii [Fri, 24 Nov 2017 10:49:04 +0000 (12:49 +0200)]
Improve documentation of self-insert-uses-region-functions
* lisp/simple.el (self-insert-uses-region-functions): Clarify the
doc string.
* lisp/delsel.el (delete-selection-uses-region-p): Mention
'self-insert-command' in the doc string. (Bug#29373)
* doc/lispref/text.texi (Commands for Insertion): Mention
'self-insert-uses-region-functions'.
* doc/lispref/modes.texi (Keymaps and Minor Modes): Add a
cross-reference to "Commands for Insertion".
Dmitry Gutov [Tue, 21 Nov 2017 23:44:52 +0000 (01:44 +0200)]
Extract the common part of ruby-flymake-simple and ruby-flymake-rubocop
* lisp/progmodes/ruby-mode.el (ruby-flymake-simple)
(ruby-flymake-rubocop):
Extract the common part as ruby-flymake--helper.
(ruby--rubocop-flymake-proc): Remove. Use the first proc
variable instead.
Dmitry Gutov [Tue, 21 Nov 2017 23:04:27 +0000 (01:04 +0200)]
Add Rubocop Flymake backend
* lisp/progmodes/ruby-mode.el (ruby-flymake-command):
Inline the value. There are no known substitutes.
(ruby-flymake): Rename to `ruby-flymake-simple' and simplify
the docstring.
(ruby-flymake-use-rubocop-if-available): New option.
(ruby--rubocop-flymake-proc): New variable.
(ruby-rubocop-config): New option.
(ruby-flymake-rubocop, ruby-flymake-auto): New functions.
(ruby-mode): Use `ruby-flymake-auto'.
Noam Postavsky [Tue, 7 Nov 2017 23:01:01 +0000 (18:01 -0500)]
Update nt/INSTALL.W64 (Bug#28601)
* nt/INSTALL.W64 (Download and install MinGW-w64 and MSYS2): Move
suggestion about modifying PATH to...
(Test Emacs): ... here.
(Run configure): Remove the unnecessary setting of PKG_CONFIG_PATH.
(Troubleshooting): New section, includes suggestion to check
PKG_CONFIG_PATH.
Remove incorrect NEWS item about VC state indicator (Bug#28817)
* etc/NEWS (VC and related modes): Remove news item about the VC
state indicator. This should have been done with commit 7882dc6
of 2016-03-06 'Revert "Use colors in the VC mode lines"'.
Alan Mackenzie [Tue, 21 Nov 2017 18:06:11 +0000 (18:06 +0000)]
Make c-defun-name analyze more thoroughly a function type which is a struct
This fixes bug #29293.
* lisp/progmodes/cc-cmds.el (c-defun-name): When a struct (etc.) type is
encountered, check whether it is the return type of a function rather than a
declaration of the struct itself. Similarly adapt the cond arm which deals
with functions properly to recognize struct return types.
Jay Kamat [Tue, 21 Nov 2017 07:31:40 +0000 (08:31 +0100)]
Fix erc keep-place module with new defaults (Bug#29111)
* lisp/erc/erc-goodies.el (erc-keep-place): Allow erc
keep-place to continue working with
switch-to-buffer-preserve-window-point set to t, the new default.
Michael Albinus [Mon, 20 Nov 2017 13:28:22 +0000 (14:28 +0100)]
Fix Bug#29149
* lisp/net/tramp.el (tramp-drop-volume-letter): Handle also
backup file names.
(tramp-handle-find-backup-file-name):
Call `tramp-drop-volume-letter' on the results. (Bug#29149)
Mike Kupfer [Sun, 19 Nov 2017 00:49:10 +0000 (16:49 -0800)]
MH-E: don't automatically download external-body parts
* lisp/mh-e/mh-mime.el (mh-mime-display-single): Use
mm-automatic-display-p to verify that a part should be
displayed before doing the inline checks (SF#475).