Ross Donaldson [Mon, 25 Dec 2017 20:51:19 +0000 (12:51 -0800)]
New customization variable for python-mode indentation (Bug#28475)
* lisp/progmodes/python.el (python-indent-def-block-scale): New variable.
(python-indent--calculate-indentation): Let it control how many indent
levels are inserted for multi-line function signatures.
Alan Third [Fri, 22 Dec 2017 12:27:05 +0000 (12:27 +0000)]
Fix menu keyboard shortcuts on macOS (Bug#29595)
* src/nsmenu.m (addItemWithWidgetValue)[NS_IMPL_COCOA]: It looks like
macOS 10.13 no longer ignores long modifier strings, so explicitly use
an empty string.
Paul Eggert [Mon, 1 Jan 2018 01:19:57 +0000 (01:19 +0000)]
Merge from Gnulib
This incorporates:
2018-01-01 maint: Run 'make update-copyright'
2017-12-29 Add cross-compilation results for GNU/Hurd.
2017-12-12 explicit_bzero: port to macOS + Clang 9.0.0
Eli Zaretskii [Sun, 31 Dec 2017 16:20:12 +0000 (18:20 +0200)]
Allow customization of decoding of "man" command
* lisp/man.el (Man-coding-system): New defcustom.
(Man-start-calling): Use it, and also pay attention to user
overriding coding-system-for-read. (Bug#29872)
Eli Zaretskii [Fri, 29 Dec 2017 21:41:20 +0000 (23:41 +0200)]
Fix subtle problem with scroll-down when scroll-margin is nonzero
* src/window.c (window_scroll_pixel_based): Account for
scroll-margin when scrolling down, i.e. moving window-start
towards the beginning of the buffer. Reported by zhang cc
<ccsmile2008@outlook.com> in
http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00894.html.
Eli Zaretskii [Thu, 28 Dec 2017 17:23:34 +0000 (19:23 +0200)]
Improve documentation of 'inhibit-modification-hooks' and friends
* src/buffer.c (Fset_buffer_modified_p)
(Frestore_buffer_modified_p): Doc fixes.
* src/insdel.c (syms_of_insdel) <inhibit-modification-hooks>:
Document in the doc string that this variable also inhibits file
locks and active region handling. (Bug#29846)
Eli Zaretskii [Wed, 27 Dec 2017 18:23:10 +0000 (20:23 +0200)]
Fix documentation of delsel and of killing text
* doc/emacs/killing.texi (Appending Kills): Make sure the text
with 2 spaces is not broken between 2 lines.
* doc/emacs/mark.texi (Using Region): Remove the sentence about
delsel mode that describes behavior which exists even without
delsel mode turned on. Suggested by Petteri Hintsanen
<petterih@iki.fi> in emacs-manual-bugs@gnu.org.
Eli Zaretskii [Sun, 24 Dec 2017 18:47:06 +0000 (20:47 +0200)]
Adjudicate review comments for the "Text" chapter of user manual
* doc/emacs/text.texi (Text): Rearrange text for clarity. Add
cross-reference to the Org manual. Make the cross-reference to
Outline Mode appear in online manuals as well (the conditional was
a forgotten remnant from time immemoriam).
(Paragraphs): Add a note that 'paragraph-start' and
'paragraph-separate' should not be anchored.
(Auto Fill): Remove redundant text. Suggested by Petteri
Hintsanen <petterih@iki.fi> in emacs-manual-bugs@gnu.org.
Alan Mackenzie [Sun, 24 Dec 2017 10:29:52 +0000 (10:29 +0000)]
In C-h k <mouse-n>, alert user to existence of any matching down-mouse-event
, and instruct her to hold the mouse button to display its documentation.
* lisp/help.el (help-downify-mouse-event-type): New function.
(help-read-key-sequence, describe-key): handle double-click-time being nil or
t.
(describe-key): Print out instructions for displaying documentation of
matching mouse down key sequence command when such exists.
Alan Mackenzie [Sat, 23 Dec 2017 18:00:10 +0000 (18:00 +0000)]
Make C-h c/k S-mouse-1 display message for mouse-appearance-menu, etc.
Currently, C-h c/k for S-mouse-1 reports that S-mouse-1 is unbound, ignoring
that S-down-mouse-1 is bound. We fix this by reporting on the "latest" mouse
event of a sequence which is bound.
* lisp/help.el (help-read-key-sequence): Save all encountered mouse events in
a list. Return the latest one which has a binding.
Tak Kunihiro [Sat, 23 Dec 2017 09:16:40 +0000 (11:16 +0200)]
Fix scrolling up in pixel-scroll.el
* lisp/pixel-scroll.el (pixel-scroll-up): Do not try to move cursor
down when EOB is shown at the top. This function is reverted to
commit 1bda71ec3b11eeb4d06c3da094a3cb21bac18d5c. (bug#29737)
Eli Zaretskii [Fri, 22 Dec 2017 10:18:12 +0000 (12:18 +0200)]
Improve documentation of selecting windows
* doc/lispref/windows.texi (Basic Windows, Selecting Windows):
Clarify what selecting a window means for keyboard input, and that
input focus may need to be considered when selecting windows on
other frames. See
http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00372.html
for more details.
Eli Zaretskii [Fri, 22 Dec 2017 10:04:23 +0000 (12:04 +0200)]
Improve documentation of records
* doc/lispref/Makefile.in (srcs): Add the forgotten records.texi.
* doc/lispref/records.texi (Records): Recommend that record type
names use package-naming conventions.
* etc/NEWS: Add the naming convention recommendation for record
types.
Eli Zaretskii [Fri, 22 Dec 2017 09:19:56 +0000 (11:19 +0200)]
Fix documentation of 'mouse-drag-and-drop-region' and friends
* doc/emacs/frames.texi (Drag and Drop): Index
'mouse-drag-and-drop-region-cut-when-buffers-differ',
'mouse-drag-and-drop-region-show-tooltip', and
'mouse-drag-and-drop-region-show-cursor'.
* etc/NEWS: Fix the format of the related entries.
Eli Zaretskii [Fri, 22 Dec 2017 09:11:29 +0000 (11:11 +0200)]
Improve detection of speller version in ispell.el
* lisp/textmodes/ispell.el (ispell-check-version): Accept more
general forms of version numbers for Aspell, Hunspell, and
Enchant, to include various beta and prereleases. (Bug#29801)
Alan Mackenzie [Thu, 21 Dec 2017 17:49:14 +0000 (17:49 +0000)]
Fontify a CPP construct correctly when a comment follows without spaces
Do this by removing a broken optimization in the state cache which put
category text properties on a character between the end of the CPP construct
and the beginning of the comment. This can't work when there's no such
character.
* lisp/progmodes/cc-engine.el (c-no-comment-end-of-macro): Return the comment
start position rather than one character before it.
(c-invalidate-state-cache, c-parse-state): Remove the invocations of
c-with-all-but-one-cpps-commented-out and c-with-cpps-commented-out.
* lisp/progmodes/cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): Rename to
c-neutralize-syntax-in-CPP and remove the bits which applied category
properties.
* lisp/progmodes/cc-langs.el (c-before-font-lock-functions): Incorporate the
new name of the function c-neutralize-syntax-in-CPP.
Alan Mackenzie [Thu, 21 Dec 2017 17:18:40 +0000 (17:18 +0000)]
Fix loss of documentation face in certain CC Mode doc comment situations
* lisp/progmodes/cc-fonts.el (c-font-lock-doc-comments): Take into account
the possibility of font-lock-comment-delimiter-face. Test rigorously for
"/**" (etc.) being itself inside a literal, rather than just depending on the
face of the previous character.
Andy Moreton [Thu, 21 Dec 2017 01:07:54 +0000 (20:07 -0500)]
Work around GnuTLS version issues with %DUMBFW (tiny change)
* src/gnutls.c: Introduce HAVE_GNUTLS_EXT_GET_NAME and use it.
(init_gnutls_functions): Use it.
(Fgnutls_available_p): Use it (Bug#25061). Fix Vlibrary_cache bug.
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)