*src/dispnew.c:
*src/frame.c:
*src/frame.h:
*src/keyboard.c:
*src/menu.c:
*src/menu.h:
*src/window.c:
*src/window.h:
*src/xdisp.c:
*src/xfns: Use the new macros.
Eli Zaretskii [Sat, 16 Mar 2019 11:59:03 +0000 (13:59 +0200)]
Improve locale and language environment setting at startup
* lisp/international/mule-cmds.el (locale-language-names): Add
more locales and their language environments.
(set-locale-environment): Use w32-multibyte-code-page, if
non-zero, as locale-coding-system. (Bug#34684)
* src/w32fns.c (globals_of_w32fns) <w32-multibyte-code-page>:
New variable.
Paul Eggert [Sat, 16 Mar 2019 01:31:31 +0000 (18:31 -0700)]
Bring back Emacs 26 compatibility to flymake.el
* lisp/progmodes/flymake.el (flymake--schedule-timer-maybe):
Revert to using seconds-to-time, since this file is part
of ELPA and needs to work on Emacs 26 too.
This was introduced in 662bee7d70ccd3903e123b08c7ec9108a1a2ce0b
2018-09-24T01:30:46Z!eggert@cs.ucla.edu.
* doc/lispref/files.texi (File Attributes): Fix typo referring to
wrong file attribute accessor.
Stefan Monnier [Wed, 13 Mar 2019 17:40:36 +0000 (13:40 -0400)]
* lisp/progmodes/python.el (python-rx-constituents): Fix ordering in `or`
The previous code worked earlier because of a bug in `rx` (which used
`regexp-opt` without passing it to `keep-order` argument), but now that `rx`
has been fixed the underlying bug here reared its ugly head.
Eli Zaretskii [Wed, 13 Mar 2019 16:53:08 +0000 (18:53 +0200)]
Avoid gratuitous errors in 'url-retrieve-synchronously'
* lisp/url/url-http.el (url-http-debug):
* lisp/url/url-util.el (url-debug): Don't signal an error if
quit-flag is non-nil, but not t. This could happen because
some unrelated code is running inside while-no-input.
(Bug#34763)
Alan Mackenzie [Tue, 12 Mar 2019 18:33:31 +0000 (18:33 +0000)]
Correct the indentation of CC Mode brace lists
while preserving the indentation of nested C++ uniform initialization.
* lisp/progmodes/cc-align.el (c-lineup-2nd-brace-entry-in-arglist)
(c-lineup-class-decl-init-+, c-lineup-class-decl-init-after-brace): New
indentation functions.
* lisp/progmodes/cc-engine.el (c-forward-class-decl): New function.
(c-do-declarators): New function, partially extracted from
c-font-lock-declarators, which now calls the new function.
(c-inside-bracelist-p): Amend the introductory comment.
(c-add-stmt-syntax): Add code to prevent the spurious recognition of a
'defun-block-intro when a brace pair is used as an initializer.
(c-evaluate-offset): No longer ignore vectors of length >= 2.
(c-calc-offset): Refactor clumsily nested `if'/`or' into a cond form.
* lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Replace the bulk of
this function by a call to the new c-forward-class-decl.
* lisp/progmodes/cc-langs.el (c-type-decl-prefix-key): Recognize "~" as a
type decl operator.
* lisp/progmodes/cc-mode.el (c-fl-decl-start): While searching backward for a
"}" at an EOD, deal with actually finding the end of a brace list.
* doc/misc/cc-mode.texi (List Line-Up): document
c-lineup-2nd-brace-entry-in-arglist, c-lineup-class-decl-init-+, and
c-lineup-class-decl-init-after-brace.
* lisp/progmodes/cc-styles.el (c-style-alist): In styles "gnu", "bsd",
"stroustrup", "python", and "java", change the offset for brace-list-intro
from the default value or c-lineup-arglist-intro-after-paren to a list
beginning with the symbol first, followed by two of the new alignment
functions, followed by +.
* lisp/progmodes/cc-vars.el (c-offset-alist): Change the default value of
brace-list-entry from c-lineup-under-anchor back to 0.
Eli Zaretskii [Mon, 11 Mar 2019 15:32:38 +0000 (17:32 +0200)]
Fix show-trailing-whitespace in R2L text
* src/xdisp.c (highlight_trailing_whitespace): Allow for
stretch glyphs at the left edge of R2L lines, when skipping
glyphs inserted by the display engine. This unbreaks
show-trailing-whitespace in R2L lines.
Paul Eggert [Mon, 11 Mar 2019 15:20:54 +0000 (08:20 -0700)]
Fix a small pdumper memory leak
* src/pdumper.c (dump_mmap_reset): Free the private area here ...
(dump_mm_heap_cb_release): ... instead of here.
(dump_mmap_release_heap): Simplify by avoiding a local.
(dump_mmap_contiguous): Reindent GNU style.
Martin Rudalics [Mon, 11 Mar 2019 08:57:23 +0000 (09:57 +0100)]
Rewrite minibuffer window resizing code
* src/frame.c (resize_mini_frames): New variable.
* src/window.c (resize_mini_window_apply): New function.
(grow_mini_window, shrink_mini_window): Remove PIXELWISE
argument. Call resize_mini_window_apply to apply changes.
(Fresize_mini_window_internal): Call resize_mini_window_apply
to apply changes.
(Qwindow__resize_mini_frame): New symbol.
* src/window.h (grow_mini_window, shrink_mini_window): Adjust
external declarations.
* src/xdisp.c (resize_mini_window): For minibuffer-only frames
call 'window--resize-mini-frame' if resize_mini_frames is
non-nil. Offload parts of logic to grow_mini_window and
shrink_mini_window which are now called without the PIXELWISE
argument.
(Vresize_mini_windows): Mention 'resize-mini-frames' in
doc-string.
* lisp/cus-start.el (resize-mini-frames): Add customization
support.
* lisp/window.el (window--resize-mini-window): Simplify code.
(window--resize-mini-frame): New function.
* doc/lispref/minibuf.texi (Minibuffer Windows): Describe new
option 'resize-mini-frames'.
* etc/NEWS: Mention new option 'resize-mini-frames'.
Paul Eggert [Mon, 11 Mar 2019 06:39:48 +0000 (23:39 -0700)]
Improve binary-as-unsigned treatment (Bug#34792)
* etc/NEWS:
* src/editfns.c (Fformat, binary_as_unsigned):
Update now that we always have bignums.
(syms_of_editfns) [!defined lisp_h_FIXNUMP]: Remove now-obsolete
code, since lisp_h_FIXNUMP is always defined now.
* test/src/editfns-tests.el (read-large-integer): Simplify,
now that we can assume binary-as-unsigned defaults to nil.
Michael Albinus [Sun, 10 Mar 2019 14:56:24 +0000 (15:56 +0100)]
Changes in Tramp adb process handling
* lisp/net/tramp-adb.el (tramp-methods) <adb>: Add `tramp-remote-shell'
and `tramp-remote-shell-args'.
(tramp-adb-file-name-handler-alist): Use `tramp-handle-shell-command'
rather than `tramp-adb-handle-shell-command'.
(tramp-adb-handle-shell-command): Remove.
(tramp-adb-handle-make-process): Use a proper prompt.
(tramp-adb-wait-for-output): Simplify.
Stefan Monnier [Sun, 10 Mar 2019 07:54:46 +0000 (03:54 -0400)]
* lisp/speedbar.el: Minor tweaks
(speedbar-directory-buttons-follow): Use file-name-as-directory.
(speedbar-ignored-directory-expressions)
(speedbar-supported-extension-expressions): Use `sym` in the setter.
(speedbar-frame-mode): Use with-current-buffer.
(speedbar-item-info-tag-helper): Use 'cond'.
(speedbar-highlight-one-tag-line): Don't use position beyond EOB.
Tassilo Horn [Sat, 9 Mar 2019 20:27:24 +0000 (21:27 +0100)]
Name buffer according to attachment filename (bug#34478).
* lisp/gnus/mm-decode.el (mm-display-external): Name buffer showing
the attachment according to the attachment's filename, i.e. "*mm*
<filename>" instead of " *mm*12345".
Glenn Morris [Sat, 9 Mar 2019 18:07:46 +0000 (10:07 -0800)]
Merge from origin/emacs-26
0589de5 (origin/emacs-26) Fix markup of fake keys in the ELisp manual 82d4b98 Avoid errors in Auto Revert mode a3b1935 Mention empty strings in file name expansion, emacs lisp refe... a38da0d cc-mode.texi: Work around makeinfo alignment bug. Fix proble... 464ee80 Warn against recursive invocations of 'buffer-list-update-hoo... 60b5c10 Provide more details in doc-string of 'delete-windows-on' (Bu... f0be0f1 Improve documentation of 'delete-windows-on' f1bddc7 * lisp/frame.el (make-frame-command): Doc fix. (Bug#34715) 2848623 Avoid undefined behavior in gdb-mi.el dbf1837 * lisp/window.el (fit-frame-to-buffer): Make doc-string more ... 099ef44 Minor spelling and grammar fixes (bug#34756) 52fd400 Minor improvement of documentation of '(when CONDITION . SPEC)' f872b65 Improve documentation of 'auto-coding-functions' 04cad5e Fix visiting XML files with non-Unix EOL format a89fabe Update example major mode code in Elisp manual
* lisp/shell.el (shell): Use `with-connection-local-variables'.
* lisp/subr.el (start-file-process-shell-command):
* lisp/progmodes/compile.el (compilation-start):
Use `with-connection-local-variables'. Do not set "/bin/sh" for
remote buffers, trust settings of `shell-file-name'. (Bug#24338),
(Bug#29723)
* lisp/net/ange-ftp.el (ange-ftp-compress, ange-ftp-uncompress):
Use `shell-command-switch'.
* lisp/net/tramp-adb.el (tramp-adb-connection-local-default-profile):
New defvar. Add it to connection-local profiles after loading "shell".
* lisp/net/tramp-integration.el (tramp-compat): Require tramp-compat.
(tramp-compat-exec-path): Do not declare anymore.
(tramp-connection-local-safe-shell-file-names): New defvar.
(tramp-connection-local-default-profile): New defconst. Activate
it after loading "shell".
(shell-file-name, shell-command-switch): Add safe-local-variable
property.
* test/lisp/files-x-tests.el (remote-shell-file-name):
Add safe-local-variable property to remote-* variables.
(tramp-connection-local-default-profile): Declare.
(files-x-test-with-connection-local-variables):
Rename from `files-x-test-with-connection-local-profiles'. Adapt
implementation.
* test/lisp/net/tramp-tests.el
(tramp-test34-connection-local-variables): New test.
(tramp-test34-explicit-shell-file-name): Run it also for tramp-adb.
Bind connection-local-{profile,criteria}-alist. Use tramp-adb
specific `shell-file-name'. Add safe-local-variable property to
`explicit-shell-file-name' and `explicit-sh-args'.
Eli Zaretskii [Sat, 9 Mar 2019 10:51:33 +0000 (12:51 +0200)]
Avoid errors in Auto Revert mode
* lisp/autorevert.el (auto-revert-buffers): Cancel
auto-revert-timer only if it is non-nil. This avoids errors
on first invocation of Auto-Revert mode.
Eli Zaretskii [Sat, 9 Mar 2019 10:41:48 +0000 (12:41 +0200)]
Import Unicode 12.0 data files
* admin/unidata/copyright.html:
* admin/unidata/UnicodeData.txt:
* admin/unidata/SpecialCasing.txt:
* admin/unidata/NormalizationTest.txt:
* admin/unidata/Blocks.txt:
* admin/unidata/BidiMirroring.txt:
* admin/unidata/BidiBrackets.txt: New versions from Unicode 12.0.
* admin/unidata/unidata-gen.el (unidata-gen-file):
* admin/unidata/blocks.awk (name2alias): Adapt to changes in
new data files.
* admin/notes/unicode: Update and improve instructions for
importing a new Unicode Standard.
* lisp/international/characters.el (char-width-table): Update
lists of characters according to Unicode 12.0.
* lisp/international/fontset.el (script-representative-chars):
Add characters from new scripts to 'script-representative-chars'.
(otf-script-alist): Update according to data on the MS site.
* lisp/international/mule-cmds.el (ucs-names): Update unused
ranges of codepoints according to Unicode 12.0.
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1)
(ucs-normalize-tests--failing-lines-part2): Update for the new
NormalizationTest.txt file.
* test/manual/BidiCharacterTest.txt: Update with the new
version from Unicode 12.0.
Martin Rudalics [Sat, 9 Mar 2019 10:13:18 +0000 (11:13 +0100)]
Further redesign of window change functions
* doc/lispref/windows.texi (Window Hooks): Revise description
of window change functions. Add documentation for
'window-state-change-hook' and window state change flag.
* etc/NEWS: Update entry for window change functions.
* src/frame.c (Fframe_window_state_change)
(Fset_frame_window_state_change): New functions.
* src/frame.h (struct frame): New boolean window_state_change.
(FRAME_WINDOW_STATE_CHANGE): New macro.
* src/window.c (window_change_record_frames): New static
boolean.
(window_change_record_frame): Remove function - code moved to
window_change_record.
(window_change_record): Record frame changes here taking
window_change_record_frames into account.
(run_window_change_functions_1): Set window_change_record_frames
whenever we run one of our hooks.
(run_window_change_functions): Run hooks also when
FRAME_WINDOW_STATE_CHANGE has been set. Run
Vwindow_state_change_hook. Leave decision whether to record
changes for all frames to window_change_record.
(Vwindow_state_change_functions): Update doc-string.
(Vwindow_state_change_hook): New normal hook.
Arash Esbati [Fri, 8 Mar 2019 21:01:01 +0000 (22:01 +0100)]
; Improve matching of key-val labels yet more (bug#34629)
* lisp/textmodes/reftex-vars.el (reftex-label-regexps): Match
explicitly for key-val labels in optional arguments of
environments provided by "listings" and "breqn" packages and the
macro "\ctable" from the package of the same name.
Update docstring.
More specifically, don't add a useless '(fn)' to the docstring for
functions which take no arguments.
This should fix the 'No docstring slot for pcase--make-docstring'
warning during bootstrap.
Stefan Monnier [Fri, 8 Mar 2019 22:20:58 +0000 (17:20 -0500)]
* lisp/emacs-lisp/cursor-sensor.el: Fix sensor behavior with overlays
(cursor-sensor--detect): Also consult overlay properties when checking
to see if we just moved inside the same "element" as opposed to
changing from one to another of the same type.
Alan Mackenzie [Fri, 8 Mar 2019 18:07:48 +0000 (18:07 +0000)]
cc-mode.texi: Work around makeinfo alignment bug. Fix problem with ss index
* doc/misc/cc-mode.texi (top level): Using txicommandconditionals to
differentiate between the C and perl versions of Texinfo, create an "ss
index" unless we are both using the C Texinfo and are building the .dvi output
format.
(Config Basics): Work around a perl Texinfo alignment bug by writing a
separate version of an item list structure for this version, simplifying it
considerably.
Mark Diekhans [Sun, 24 Feb 2019 18:27:09 +0000 (10:27 -0800)]
Improve ispell.el diagnostics if Hunspell dictionaries aren't found
* lisp/textmodes/ispell.el (ispell-set-spellchecker-params):
Set ispell-last-program-name only at the end, so as to produce
useful diagnostics when Hunspell dictionaries are not found.
(Bug#34640)
Rename regexp-opt argument noreorder to keep-order
* doc/lispref/searching.texi (Regular Expression Functions):
* lisp/emacs-lisp/regexp-opt.el (regexp-opt):
Rename newly added `noreorder' argument to `keep-order', to avoid a
negative in the name. Suggested by Phil Sainty (Bug#34641).
* test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax)
(tramp-test01-file-name-syntax-simplified)
(tramp-test01-file-name-syntax-separate): Use neutral IPv4 address.
(tramp-test05-expand-file-name): Check also "." and "".
Martin Rudalics [Wed, 6 Mar 2019 09:11:08 +0000 (10:11 +0100)]
Fix handling of 'window-combination-resize' with fixed-size windows
* lisp/window.el (window-combinations): New optional argument
IGNORE-FIXED.
(window--combination-resizable): New function.
(split-window): Fix handling of 'window-combination-resize'
in the presence of fixed-size windows.
Glenn Morris [Wed, 6 Mar 2019 06:27:35 +0000 (22:27 -0800)]
* doc/misc/gnus-coding.texi: Remove no longer relevant sections.
; The whole remaining file is probably no longer relevant.
; It's just some basic info from 15 years ago.
Glenn Morris [Wed, 6 Mar 2019 06:15:02 +0000 (22:15 -0800)]
Remove etc/GNUS-NEWS (bug#34662)
It is not relevant since Gnus stopped being distributed separately.
* etc/GNUS-NEWS: Remove this generated file.
* etc/NEWS.26: Relocate an entry mistakenly added to GNUS-NEWS.
* doc/misc/gnus-coding.texi (Gnus Maintenance Guide):
No longer mention GNUS-NEWS.
* doc/misc/gnus-news.el: Remove.
* doc/misc/gnus-news.texi: Update a comment.
* lisp/Makefile.in (update-gnus-news): Remove this phony target.
Eli Zaretskii [Tue, 5 Mar 2019 16:25:23 +0000 (18:25 +0200)]
Remove unreliable assertion in buf_bytepos_to_charpos
* src/marker.c (buf_bytepos_to_charpos): Remove the assertion
regarding bytepos always at the head byte of a multibyte
sequence. For the reasons, see
http://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00100.html
http://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00102.html
Wilson Snyder [Tue, 5 Mar 2019 14:46:36 +0000 (09:46 -0500)]
Fix regular-expression glitches and typos. Update verilog-mode from upstream.
* lisp/progmodes/verilog-mode.el (verilog-read-decls): Fix AUTO vectors with
double brackets, msg2839.
(verilog-read-auto-template-middle): Fix AUTO_TEMPLATE with regexp
capture group reference, but1379. Reported by David Rogoff.
Martin Rudalics [Tue, 5 Mar 2019 09:46:19 +0000 (10:46 +0100)]
Fix handling of minibuffer-only child frames (Bug#33498)
* doc/lispref/frames.texi (Buffer Parameters): Describe how to
make a minibuffer-only child frame.
(Child Frames): Describe how minbuffer child frames are
deleted.
* src/frame.c (delete_frame): Handle deletion of minibuffer
child frames (Bug#33498). In the course, fix reassigning of
'default-minibuffer-frame' with minibuffer-only frames.
* lisp/frame.el (frame-notice-user-settings): Handle creation of
initial minibuffer-only child frame.
(make-frame): Handle creation of frame with a minibuffer-only
child frame.
Fix diff-mode tests after renaming diff-font-lock-refine
This fixes tests broken in my last change, "Merge
diff-font-lock-refine and diff-auto-refine-mode into diff-refine" from
2019-02-24.
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock):
Bind diff-refine to symbol 'font-lock' instead of binding
diff-font-lock-refine to t.
(diff-mode-test-font-lock-syntax-one-line): Bind diff-refine
to nil instead of binding diff-font-lock-refine to nil.