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.
Martin Rudalics [Mon, 4 Mar 2019 09:28:56 +0000 (10:28 +0100)]
Prevent introducing invalid scroll bar width/height values (Bug#34569)
* src/frame.c (store_frame_param): Don't store invalid values
for scroll_bar_width/height.
(x_report_frame_params): Don't report invalid values for
scroll_bar_width/height.
(x_set_scroll_bar_width, x_set_scroll_bar_height): Don't set
invalid values for scroll_bar_width/height.
Martin Rudalics [Mon, 4 Mar 2019 09:11:53 +0000 (10:11 +0100)]
Fix minibuffer resizing with temporarily selected frames (Bug#34317)
* src/keyboard.c (command_loop_1): Resize echo area exactly
only if the echo area window is the minibuffer window of the
selected frame (Bug#34317).
* src/xdisp.c (x_consider_frame_title): Inhibit redisplay also
when restoring the selected window/frame to avoid that
resize_mini_window sizes back the minibuffer window of a
temporarily selected frame (Bug#34317).
Paul Eggert [Mon, 4 Mar 2019 08:00:39 +0000 (00:00 -0800)]
Simplify list creation in C code
The main new thing here is that C code can now say
‘list (a, b, c, d, e, f)’ instead of
‘listn (CONSTYPE_HEAP, 6, a, b, c, d, e, f)’,
thus relieving callers of the responsibility of counting
arguments (plus, the code feels more like Lisp). The old
list1 ... list5 functions remain, as they’re probably a bit
faster for small lists.
* src/alloc.c (cons_listn, pure_listn): New functions.
(listn): Omit enum argument.
All callers changed to use either new ‘list’ or ‘pure_list’ macros.
* src/charset.c (Fdefine_charset_internal):
* src/coding.c (detect_coding_system)
(Fset_terminal_coding_system_internal):
* src/frame.c (frame_size_history_add, adjust_frame_size):
* src/gtkutil.c (xg_frame_set_char_size):
* src/keyboard.c (command_loop_1):
* src/nsfns.m (frame_geometry):
* src/widget.c (set_frame_size):
* src/xfaces.c (Fcolor_distance):
* src/xfns.c (frame_geometry):
* src/xterm.c (x_set_window_size_1):
* src/xwidget.c (Fxwidget_size_request):
Prefer list1i, list2i, etc. to open-coding them.
* src/charset.c (Fset_charset_priority):
* src/nsterm.m (append2):
* src/window.c (window_list):
* src/xfaces.c (Fx_list_fonts):
Use nconc2 instead of open-coding it.
* src/eval.c (eval_sub, backtrace_frame_apply):
* src/kqueue.c (kqueue_generate_event):
* src/nsterm.m (performDragOperation:):
* src/pdumper.c (Fpdumper_stats):
* src/w32.c (init_environment):
Prefer list1, list2, etc. to open-coding them.
* src/font.c (font_list_entities):
Parenthesize to avoid expanding new ‘list’ macro.
* src/gtkutil.c (GETSETUP): Rename from MAKE_FLOAT_PAGE_SETUP
to get lines to fit. Move outside the ‘list’ call, since it’s
now a macro.
* src/keymap.c (Fmake_keymap): Simplify.
* src/lisp.h (list, pure_list): New macros.
(list1i): New function.
Merge diff-font-lock-refine and diff-auto-refine-mode into diff-refine
This change was discussed in Bug#32991.
* admin/gitmerge.el (gitmerge-resolve): Bind 'diff-refine'
instead of 'diff-auto-refine-mode' to nil.
* doc/emacs/files.texi (Diff Mode): Explain 'diff-refine'
instead of 'diff-auto-refine-mode' in the documentation of
'diff-hunk-next' and 'diff-hunk-prev'. Mention in the
documentation of 'diff-refine-hunk' that refining is already
done by default.
* etc/NEWS (Diff mode): Explain renamed 'diff-refine' variable
and mention deprecation and disabling of
'diff-auto-refine-mode'.
* lisp/vc/diff-mode.el (diff-font-lock-refine): Rename to
'diff-refine' and allow choices nil, 'font-lock' and 'navigation'.
(diff-auto-refine-mode): Disable it by default, make it
obsolete and make it set 'diff-refine' appropriately to keep
backward compatibility.
(diff-hunk-next, diff-hunk-prev): Adapt to rename of
diff-auto-refine-mode and ensure that refining only happens
when calling these commands interactively.
(diff--font-lock-refined): Adapt to rename of
diff-font-lock-refine.
* lisp/vc/smerge-mode.el (smerge-next, smerge-prev): Check
that 'diff-refine' is set instead of checking
'diff-auto-refine-mode' when deciding whether to refine a
conflict.
Eli Zaretskii [Sun, 3 Mar 2019 17:02:34 +0000 (19:02 +0200)]
Fix starting temacs interactively
* src/dispnew.c (init_display_interactive): Don't call
init_faces_initial if we aren't initialized, since
tty-set-up-initial-frame-faces is not available then. This
restores the ability to start "temacs -nw" and also avoids
bad crashes in "emacs -nw" if the pdumper file is not found.
(Bug#34707)
Paul Eggert [Sun, 3 Mar 2019 07:02:01 +0000 (23:02 -0800)]
Fix typo in previous change
* src/alloc.c (memory_full_cons_threshold):
Move to after definition of struct cons_block.
Problem reported by Basil L. Contovounesios in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00067.html
Paul Eggert [Sat, 2 Mar 2019 19:05:40 +0000 (11:05 -0800)]
Avoid staticvec duplicates
* src/alloc.c (staticpro) [ENABLE_CHECKING]: Check for duplicates.
* src/keyboard.c (syms_of_keyboard): Define
while-no-input-ignore-events and inhibit--record-char here ...
(syms_of_keyboard_for_pdumper): ... instead of here.
This avoids duplicates in staticvec.
Eli Zaretskii [Sat, 2 Mar 2019 18:07:36 +0000 (20:07 +0200)]
Fix DND on MS-Windows with files from UNC directories
* lisp/dnd.el (dnd-get-local-file-uri): Always return nil on
MS-Windows, as this method cannot possibly work there: URIs
that begin with the local system's name are UNCs, where the
//SERVER part cannot be removed. (Bug#34675)
rx: fix `or' ordering by adding argument to regexp-opt
The rx `or' form may reorder its arguments in an unpredictable way,
contrary to user expectation, since it sometimes uses `regexp-opt'.
Add a NOREORDER option to `regexp-opt' for preventing it from
producing a reordered regexp (Bug#34641).
* doc/lispref/searching.texi (Regular Expression Functions):
* etc/NEWS (Lisp Changes in Emacs 27.1):
Describe the new regexp-opt NOREORDER argument.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt): Add NOREORDER.
Make no attempt at regexp improvement if the set of strings contains
a prefix of another string.
(regexp-opt--contains-prefix): New.
* lisp/emacs-lisp/rx.el (rx-or): Call regexp-opt with NOREORDER.
* test/lisp/emacs-lisp/rx-tests.el: Test rx `or' form match order.
Eli Zaretskii [Sat, 2 Mar 2019 10:17:47 +0000 (12:17 +0200)]
Fix 'end-of-visual-line' with overlay strings with newlines
* src/indent.c (Fvertical_motion): Get out of overlay strings
with embedded newlines even if moving within the same screen
line. See https://github.com/emacs-lsp/lsp-mode/issues/677
for more details.
Fix test for IT_CHARPOS being at the beginning of the
accessible portion of the buffer.
Eli Zaretskii [Sat, 2 Mar 2019 08:42:29 +0000 (10:42 +0200)]
Improve documentation of 'auto-coding-functions'
* doc/lispref/nonascii.texi (Default Coding Systems): Clarify
that the functions in 'auto-coding-functions' are called both
for decoding and for encoding.
Eli Zaretskii [Sat, 2 Mar 2019 08:32:06 +0000 (10:32 +0200)]
Fix visiting XML files with non-Unix EOL format
* lisp/international/mule.el (sgml-xml-auto-coding-function)
(sgml-html-meta-auto-coding-function): Don't use
'buffer-file-coding-system' if the buffer is unibyte.
(Bug#34704)
* doc/lispref/modes.texi (Example Major Modes): Update code examples
to reflect current state of lisp/textmodes/text-mode.el and
lisp/emacs-lisp/lisp-mode.el. (bug#34671)