Paul Eggert [Fri, 15 Dec 2017 17:07:52 +0000 (09:07 -0800)]
FOR_EACH_FRAME no longer assumes frame-list
This cleans up a recent fix related to Bug#29661.
Suggested by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2017-12/msg00544.html
* src/frame.c (next_frame, prev_frame, delete_frame):
Restore debugging checks that Vframe_list is non-nil,
as FOR_EACH_FRAME no longer has these checks.
(delete_frame): Remove no-longer-needed checks that Vframe_list is
non-nil, as FOR_EACH_FRAME no longer assumes that.
* src/frame.h (FOR_EACH_FRAME): Do not assume Vframe_list is non-nil.
Allen Li [Fri, 15 Dec 2017 09:30:25 +0000 (11:30 +0200)]
Add option to configure comint TERM
* lisp/comint.el (comint-terminfo-terminal): New defcustom.
(comint-term-environment): New function for setting terminal options
(comint-exec-1): Use comint-term-environment. (Bug#29583)
* lisp/progmodes/compile.el (compilation-start): Use comint-term-environment.
* etc/NEWS:
* doc/emacs/misc.texi (Shell Options): Document the new option.
Eli Zaretskii [Fri, 15 Dec 2017 09:06:07 +0000 (11:06 +0200)]
Better support utf-8-with-signature and utf-8-hfs in XML/HTML
* lisp/international/mule.el (sgml-xml-auto-coding-function):
Support UTF-8 with BOM and utf-8-hfs as variants of UTF-8, and
obey the buffer's encoding if it is one of these variants, instead
of re-encoding in UTF-8 proper. (Bug#20623)
Alan Mackenzie [Thu, 14 Dec 2017 21:04:39 +0000 (21:04 +0000)]
Fix fontification of first declaration within a C++ lambda form.
* lisp/progmodes/cc-engine.el (c-looking-at-or-maybe-in-bracelist): Cease
spuriously recognizing the braces of a lambda form as a brace list when there
is an "=" preceding the introductory brackets.
Alan Mackenzie [Thu, 14 Dec 2017 17:55:59 +0000 (17:55 +0000)]
Fix misfontification of C++ member initialization list after "throw"
* lisp/progmodes/cc-engine.el (c-forward-type): Stop recognizing a "type"
starting with "throw", by using c-opt-type-modifier-prefix-key.
* lisp/progmodes/cc-langs.el (c-type-modifier-prefix-kwds): New lang const
which, in C++, doesn't contain "throw", otherwise like c-type-modifier-kwds.
(c-opt-type-modifier-prefix-key): New lang const and var, a regexp matching
any keyword in the previous lang const.
Noam Postavsky [Mon, 13 Nov 2017 17:46:13 +0000 (12:46 -0500)]
Mention new strictness for &optional, &rest in arglists (Bug#29165)
* etc/NEWS: Explain that '&optional' not followed by a variable is now
an error.
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda, cl--do-&aux)
(cl--do-arglist): Also reject '&optional', '&rest', or '&aux' not
followed by a variable for consistency.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-bad-arglist): New
test.
Alan Mackenzie [Wed, 13 Dec 2017 20:55:03 +0000 (20:55 +0000)]
Don't misfontify "foo ()" inside C++ initialization parentheses as a type
Also recognize and handle function names introduced by "extern" inside a
function.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Add a new element to
the result list which is t when our declaration is, or is to be treated as,
being at top level.
* lisp/progmodes/cc-fonts.el (c-get-fontification-context): Detect being
inside a C++ uniform initialization and return (not-decl nil) for this case.
(c-font-lock-declarations): Use the new element 4 of the result of
c-forward-decl-or-cast-1.
* lisp/progmodes/cc-langs.el (c-make-top-level-kwds, c-make-top-level-key):
New lang consts/vars.
Max [Tue, 31 Oct 2017 23:33:59 +0000 (02:33 +0300)]
Fix dired-do-compress when tar doesn't default to stdin (Bug#29094)
* lisp/dired-aux.el (dired-compress-file-suffixes): Use argument '-f-'
to write to stdout rather than relying on the default (the choice of
default is decided when compiling tar, BSD systems usually set it to a
tape drive). Drop '-v', since the output is not used anywhere.
Noam Postavsky [Tue, 5 Dec 2017 01:01:40 +0000 (20:01 -0500)]
Suppress warnings during elisp completion macroexpansion
Errors are already suppressed, therefore it is logical to suppress
warnings as well. Some macros (e.g., use-package) may produce
warnings when given the `elisp--witness--lisp' symbol.
* lisp/progmodes/elisp-mode.el (elisp--local-variables): Let-bind
warning-minimum-log-level to :emergency.
Eli Zaretskii [Sun, 10 Dec 2017 08:42:34 +0000 (10:42 +0200)]
Avoid crashes in 'font-at' after 'set-fontset-font'
* src/fontset.c (free_realized_fontsets): Call
recompute_basic_faces, so that the basic faces are available to
any Lisp that calls this function, e.g. via set-fontset-font.
(Bug#29632)
Eli Zaretskii [Sat, 9 Dec 2017 20:06:19 +0000 (22:06 +0200)]
Fix tool-tip display when display margins are non-zero by default
* src/buffer.h (bset_left_margin_cols, bset_right_margin_cols):
New inline functions.
* src/xfns.c (Fx_show_tip):
* src/w32fns.c (Fx_show_tip): Force display margins of the tip
buffer to zero, as it will be displayed in a pseudo-window, which
doesn't support display margins. (Bug#29627)
Eric Abrahamsen [Tue, 5 Dec 2017 22:41:50 +0000 (14:41 -0800)]
Handle hash tables and vectors when reading/writing EIEIO objects
* lisp/emacs-lisp/eieio.el (eieio-override-prin1): EIEIO objects
printed with `prin1' can no longer be read with `read'. Make sure
they are printed with object-write instead, even when they're inside
hash tables and vectors.
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
Check for written representations of objects inside hash tables and
vectors, and reconstruct them.
Eli Zaretskii [Sat, 9 Dec 2017 11:43:29 +0000 (13:43 +0200)]
Improve documentation of 'save-abbrevs'.
* doc/emacs/abbrevs.texi (Saving Abbrevs): Document the 'silently'
value of 'save-abbrevs'. Suggested by Alex Branham
<alex.branham@gmail.com> in emacs-manual-bugs@gnu.org.
Eli Zaretskii [Sat, 9 Dec 2017 11:29:11 +0000 (13:29 +0200)]
Improve documentation of Dired
* doc/emacs/dired.texi (Dired): Mention that the Dired buffer can
be made modifiable in Wdired. Suggested by Alex Branham
<alex.branham@gmail.com> in emacs-manual-bugs@gnu.org.
Michael Albinus [Wed, 6 Dec 2017 19:49:30 +0000 (20:49 +0100)]
Fix Bug#29579
* lisp/files.el (file-name-non-special):
Inhibit `file-name-handler-alist' only for some operations.
Add missing operations. (Bug#29579)
* lisp/net/tramp-compat.el (tramp-compat-file-name-quote):
Do not quote if it is quoted already.
* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Use `copy-tree' but `copy-sequence'.
* lisp/net/tramp.el (tramp-handle-file-truename): Handle several
trailing slashes correctly.
* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test24-file-acl)
(tramp-test25-file-selinux, tramp--test-check-files):
Handle also quoted file names.
(tramp-test21-file-links): Fix file name quoting test.
(tramp-test24-file-acl): Be more robust for "smb" method.
(tramp-test35-make-auto-save-file-name): Enable hidden test cases.
* 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'.