Glenn Morris [Wed, 20 Dec 2017 21:05:46 +0000 (16:05 -0500)]
Fix some more aliases to user options
* lisp/cus-edit.el (custom-mode-hook):
* lisp/erc/erc.el (erc-default-coding-system):
* lisp/progmodes/python.el (python-indent, python-guess-indent)
(python-shell-virtualenv-path)
(python-shell-completion-module-string-code)
(python-shell-completion-pdb-string-code, python-use-skeletons):
Define aliases to user options before the options are defined.
Glenn Morris [Wed, 20 Dec 2017 19:31:03 +0000 (14:31 -0500)]
Fix some flymake aliases
* lisp/progmodes/flymake-proc.el (flymake-xml-program)
(flymake-compilation-prevents-syntax-check, flymake-master-file-dirs)
(flymake-master-file-count-limit, flymake-allowed-file-name-masks):
* lisp/progmodes/flymake.el (flymake-start-syntax-check-on-find-file):
Define aliases to user options before the options are defined.
Glenn Morris [Wed, 20 Dec 2017 19:28:04 +0000 (14:28 -0500)]
Unbreak a fileio test on non-Mac OS X systems
* test/src/fileio-tests.el (fileio-tests--symlink-failure):
Don't use an undefined coding system.
; No need to merge to master, since breaking commit wasn't merged.
Robert Pluim [Wed, 20 Dec 2017 08:24:17 +0000 (09:24 +0100)]
Fix updating scrollbar sizes when scaling is in effect
* src/gtkutil.c (xg_update_scrollbar_pos): Update width of
scrollbar when scaling is in effect.
(xg_update_horizontal_scrollbar_pos): Update scrollbar size
when scaling is in effect.
Ted Zlatanov [Tue, 19 Dec 2017 17:43:56 +0000 (12:43 -0500)]
Collect GnuTLS extensions and use them to set %DUMBFW if supported
* lisp/net/gnutls.el (gnutls-boot-parameters): Use it to set %DUMBFW
only when it's supported as "ClientHello Padding" (Bug#25061).
* src/gnutls.c (Fgnutls_available_p): Get extension names and
put them in the GnuTLS capabilities, using a hard-coded limit
of 100 since GnuTLS MAX_EXT_TYPES is not exported.
Stefan Monnier [Mon, 18 Dec 2017 16:39:17 +0000 (11:39 -0500)]
* lisp/subr.el (delayed-after-hook-functions): Rename from ...-forms
(run-mode-hooks): `funcall` the functions instead of `eval`ing the forms.
* lisp/emacs-lisp/derived.el (define-derived-mode): Push functions
rather than forms (bug#29679).
Tak Kunihiro [Sun, 17 Dec 2017 10:19:19 +0000 (11:19 +0100)]
Make 'mouse-drag-and-drop-region' more robust and customizable
* lisp/mouse.el
(mouse-drag-and-drop-region-cut-when-buffers-differ): New option
to permit 'mouse-drag-and-drop-region' to cut text also when source
and destination buffers differ.
(mouse-drag-and-drop-region-show-tooltip): New option to toggle
display of tooltip during mouse dragging on graphic displays.
(mouse-drag-and-drop-region-show-cursor): New option to toggle
moving point with mouse cursor during mouse dragging of region.
(mouse-drag-and-drop-region): New face to highlight original
text while dragging.
(mouse-drag-and-drop-region): Make use of new options and face.
Ignore errors during tracking.
Noam Postavsky [Fri, 15 Dec 2017 02:25:13 +0000 (21:25 -0500)]
Don't mess up syntax-ppss cache in electric-pair (Bug#29710)
In Emacs 25 and above, calling `scan-sexps', `parse-partial-sexp', or
similar may update the syntax-ppss cache if
`parse-sexp-lookup-properties' is non-nil. Therefore, when calling
any of these functions with a different than normal syntax-table, the
cache must be cleaned afterwards.
* lisp/elec-pair.el (electric-pair--with-uncached-syntax): New macro.
(electric-pair--syntax-ppss, electric-pair--balance-info): Use it.
Michael Albinus [Sat, 16 Dec 2017 15:40:03 +0000 (16:40 +0100)]
Improve fix for Bug#29712
* test/lisp/net/tramp-tests.el
(tramp-test32-environment-variables-and-port-numbers):
Adapt check for systems which do not support "echo -n". (Bug#29712)
Aaron Jensen [Sat, 16 Dec 2017 08:36:35 +0000 (09:36 +0100)]
Save and restore text-pixel height and width of frames (Bug#28442)
* lisp/frameset.el (frameset--record-relationships): Record
text-pixel-height and text-pixel-width of frame.
(frameset--restore-frame): Restore text-pixel-height and
text-pixel-width of frame if available. (Bug#28442)
Noam Postavsky [Sat, 16 Dec 2017 04:20:25 +0000 (23:20 -0500)]
Partially revert "Mention new strictness for &optional, &rest..."
The changes to cl argument parsing are not backwards compatible, and
cause inconvenience when writing macros (e.g., instead of doing '&aux
,@auxargs', some more complicated conditionals would be required).
The `cl-defstruct' macro makes use of this convenience when defining
empty structs (Bug#29728).
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
(cl--do-&aux, cl--do-arglist): Undo strict checking of &rest, &key,
and &aux.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-bad-arglist): Remove
test.
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.