Paul Eggert [Wed, 18 Mar 2020 21:48:52 +0000 (14:48 -0700)]
Omit timestamp optimization invalid on 387 FPU
* src/timefns.c (frac_to_double): Omit optimization that is
invalid on machines with excess precision (e.g., gcc x86 with 387
FPU), because it double-rounds. Found via ‘gcc -m32’ on x86-64.
Glenn Morris [Wed, 18 Mar 2020 14:50:37 +0000 (07:50 -0700)]
Merge from origin/emacs-27
e92b8e535a (origin/emacs-27) Remove raw carriage return characters fr... 5747a59a88 Recalculate default font when switching font backend a2dd8c4234 * lisp/tab-line.el: Fix tab-line-format and tab-line-forma... a7b8291b6c * etc/NEWS: Make the `--eval` example slightly more precise f8254aad14 * lisp/image/image-converter.el: Support more ImageMagick ... 5beb269505 Support Unicode 13.0 3a671ad7ed Fix regression in wisent-total-conflicts
Don't generate useless range table entries for ASCII chars
In multibyte regexps, each ASCII char or range in a character
alternative produces a nonsense range table entry in addition to the
correct bits in the ASCII bitmap. Those entries do not match anything
but waste space and time.
Robert Pluim [Mon, 16 Mar 2020 16:21:02 +0000 (17:21 +0100)]
Recalculate default font when switching font backend
This is an updated version of the patch by Dmitry Antipov
<dmantipov@yandex.ru> in
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386#43>.
Fixes Bug#23386
* src/dispextern.h (struct redisplay_interface): New member
default_font_parameter.
* src/xterm.h: Add prototype for x_default_font_parameter.
* src/xterm.c (x_redisplay_interface): Initialize
default_font_parameter member.
* src/xfns.c (x_default_font_parameter): Make non-static.
* src/w32term.h: Add prototype for w32_default_font_parameter
* src/w32fns.c (w32_default_font_parameter): Make non-static.
* src/w32term.c (w32_redisplay_interface): Initialize
default_font_parameter member.
* src/nsterm.m (ns_redisplay_interface): Add dummy
ns_default_font_parameter (there is currently only one possible font
backend on macOS). Initialize default_font_parameter member.
* src/frame.c (gui_set_font_backend): Recalculate default font using
RIF default_font_parameter to avoid crash when changing font backend.
Juri Linkov [Mon, 16 Mar 2020 23:11:27 +0000 (01:11 +0200)]
* lisp/tab-line.el: Fix tab-line-format and tab-line-format-template.
* lisp/tab-line.el (tab-line-format): Use buffer-name in the cache key
instead of just buffer object to invalidate the cache on buffer renaming.
(tab-line-format-template): Always leave the separator after the last tab
like tab-bar.el already does.
Yuan Fu [Sun, 15 Mar 2020 15:47:43 +0000 (16:47 +0100)]
Add store/restore window configuration feature for gdb-mi
Add a feature that allows a user to save a gdb window
configuration (window layout) to a file with
'gdb-save-window-configuration' and load it back with
'gdb-load-window-configuration'. Set a default window configuration
by setting 'gdb-default-window-configuration-file'.
Add an option to make gdb preserve the window configuration
that the user had before starting gdb. In window.el, add
'with-window-non-dedicated'.
* lisp/progmodes/gdb-mi.el (top/level): Require 'pcase' and 'cl-seq'.
(gdb--window-configuration-before): New variable.
(gdb-restore-window-configuration-after-quit): New option.
(gdb-window-configuration-directory,
gdb-default-window-configuration-file): New variables.
(gdb): Save configuration on startup.
(gud-menu-map): Add "Load Layout" and "Save Layout" to menu. Add
"Restore Layout After Quit" button to menu. Rename "Restore Window
Layout" to "Restore Default Layout", add some help echo, and move it
from "GDB-MI" menu to "GDB-WINDOWs" menu.
(gdb-toggle-restore-window-configuration): New function.
(gdb-get-source-buffer): New function, extracted out of
'gdb-restore-window'.
(gdb-setup-windows): Add a condition branch that loads default window
configuration when available. Fix docstring.
(gdb-buffer-p, gdb-function-buffer-p, gdb--buffer-type,
gdb-save-window-configuration, gdb-load-window-configuration): New
functions.
(gdb-restore-windows): Edit docstring to mention
'gdb-default-window-configuration-file'.
(gdb-reset): Restore window configuration after quit.
* lisp/window.el (with-window-non-dedicated): New macro.
Eli Zaretskii [Sun, 15 Mar 2020 14:47:54 +0000 (16:47 +0200)]
Reverse the meaning of 2nd arg to 'live_buffer_holding'
* src/alloc.c (live_buffer_holding): Rename ALL_BUFFERS ti
IGNORE_KILLED, and reverse the condition for returning killed
buffers.
(live_buffer_p): Add commentary.
(live_buffer_p, mark_maybe_object, mark_maybe_pointer): Reverse
the 2nd argument to live_buffer_holding. (Bug#39962)
Juri Linkov [Sat, 14 Mar 2020 23:58:58 +0000 (01:58 +0200)]
* lisp/image/image-converter.el: Support more ImageMagick versions (bug#39994)
* lisp/image/image-converter.el (image-converter--probe): Match
a possible additional second column in some ImageMagick versions
of "convert -list format".
Stefan Monnier [Sat, 14 Mar 2020 19:39:31 +0000 (15:39 -0400)]
* lisp/progmodes/sql.el: Try and avoid `eval`; use define-derived-mode
Remove redundant `:group` args.
(sql-interactive-mode-map): `set-keymap-parent` is always fboundp.
(sql-get-product-feature): Prefer `symbol-value` over `eval`.
(sql--adjust-interactive-setup): New function, extracted from
`sql-interactive-mode`.
(sql-interactive-mode): Use it and `define-derived-mode`.
(sql-connect, sql-connection-menu-filter): Prefer `cl-progv` over `eval`.
* admin/unidata/blocks.awk: Add "Symbols for Legacy Computing" to
known aliases.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Add new scripts.
* lisp/international/characters.el: Set syntax for Symbols for
Legacy Computing characters. Update setting of char-width-table.
* lisp/international/mule-cmds.el (ucs-names): Update ranges of
characters for which we want names in 'ucs-names'.
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1)
(ucs-normalize-tests--failing-lines-part2): Update according to
'ucs-normalize-check-failing-lines'.
* lisp/cedet/semantic/wisent/comp.el (wisent-total-conflicts):
There may not be a current source file. In that case, don't try
to keep track of the number of expected conflicts (bug#39911).
Make previous mml-expand-html-into-multipart-related fix more general
* lisp/gnus/mml.el (mml-expand-html-into-multipart-related): This is
function is now called by a recursive
engine (mml-expand-all-html-into-multipart-related). The structure of
the returned value should be identical between an untouched part and a
expanded multipart (bug#39230).
Stefan Kangas [Sat, 14 Mar 2020 09:03:09 +0000 (10:03 +0100)]
Improve Package Menu hiding docstrings
* lisp/emacs-lisp/package.el (package-menu-toggle-hiding): Add
reference to 'package-menu-hidden-regexps'.
* lisp/emacs-lisp/package.el (package-menu-hide-package): Improve
docstring to say that hiding is saved in a user option. Fix a
typo. (Bug#39436)
Avoid regexp stack overflow in GDB string matching (bug#22149)
* lisp/progmodes/gdb-mi.el (gdb--string-regexp):
Swap the or-clauses so that the rarely matching one comes first.
This avoids a build-up of backtrack points on the regexp stack.
Glenn Morris [Fri, 13 Mar 2020 14:50:33 +0000 (07:50 -0700)]
Merge from origin/emacs-27
a2b07f9f11 (origin/emacs-27) ; * etc/NEWS: Explain how to get back ol... b468b3d1ff Fix a recent documentation change 1ab766fd58 Fix last change ecfe633993 * lisp/tab-bar.el: Last-minute changes. c1ce9fa7f2 * lisp/subr.el (cancel-change-group): Fix bug#39680 ef5744a988 Improve docs for horizontal scrolling with mouse and touch... 1bc3fa0bd0 * lisp/emacs-lisp/package.el (package-install): Fix typo i... 4537976afd Port .gdbinit to clang with -gdwarf-4 0883c800a0 Simplify rx example in manual a695189248 ; * etc/NEWS: Fix typo.
Noam Postavsky [Fri, 13 Mar 2020 01:07:56 +0000 (21:07 -0400)]
Make cl-equalp a bit more efficient at comparing strings
* lisp/emacs-lisp/cl-extra.el (cl-equalp): Use compare-strings with
the IGNORE-CASE argument, rather than creating downcased copies of the
strings to be compared.
Noam Postavsky [Fri, 13 Mar 2020 01:03:45 +0000 (21:03 -0400)]
rcirc: Match NickServ messages case-insensitively (Bug#39345)
Reported by Jake Nelson <jake.nelson@gmail.com>.
* lisp/net/rcirc.el (rcirc-check-auth-status): NickServ will response
will show the nick in the same case used during registration, but
it allows case-insensitive matches when logging in. Therefore, we
should accept response messages regardless of case.
Juri Linkov [Fri, 13 Mar 2020 00:10:55 +0000 (02:10 +0200)]
* lisp/tab-bar.el: Last-minute changes.
* lisp/tab-bar.el (tab-bar-mode): Check for non-nil
tab-bar-new-button and tab-bar-close-button.
(tab-bar-new-button-show): New defcustom.
(tab-bar-make-keymap-1): Check for tab-bar-new-button-show.
(tab-bar-separator): Add docstring.
Fix NS child frame in native fullscreen (bug#36672)
* lisp/frame.el (toggle-frame-fullscreen): Don't sleep on cocoa.
Fullscreen animation waiting is moved to src/nsterm.m.
* src/nsterm.h (EmacsView): Add in_fullscreen_transition,
inFullScreenTransition, waitFullScreenTransition.
(NSWindowCollectionBehaviorFullScreenAuxiliary): New define.
* src/nsterm.m (ns_make_frame_visible): Wait for fullscreen animation.
(ns_set_parent_frame): Set frame collection behavior; make child frames
non-fullscreen; make non-child frames fullscreen if parent was fullscreen.
([EmacsView initFrameFromEmacs]): Set in_fullscreen_transition; set frame
collection behavior according to parent frame.
([EmacsView windowDidMove]): Remove code by commenting with "fixme".
([EmacsView windowWillEnterFullScreen], [EmacsView windowDidEnterFullScreen])
([EmacsView windowWillExitFullScreen], [EmacsView windowDidExitFullScreen]):
Set in_fullscreen_transition.
([EmacsView inFullScreenTransition], [EmacsView waitFullScreenTransition]):
New methods.
([EmacsView updateCollectionBehavior]): Set collection behavior according to
parent frame.
([EmacsView toggleFullScreen]): Wait for fullscreen animation.
Don't re-use an existing `pending-undo-list` even if (eq last-command 'undo)
since there might have been changes to the buffer since that `undo` command
and the `pending-undo-list` can hence be invalid for the current
buffer contents.
Stefan Monnier [Tue, 10 Mar 2020 22:23:41 +0000 (18:23 -0400)]
* lisp/emacs-lisp/cl-macs.el: More care with `eval` and with `cl-typep`
(cl-eval-when, cl--compile-time-too, cl-load-time-value):
Obey lexical-binding.
(cl-check-type): Prefer the predicate rather than the type in the
error signal when it's easy to do (as is done outside of CL).
(cl-deftype-satisfies): Add definitions for standard types.
Daniel Gröber [Sun, 8 Mar 2020 18:04:13 +0000 (14:04 -0400)]
* lisp/term/rxvt.el: Enable backeted paste and window title
rxvt-unicode uses the same escape sequences as xterm so just re-use
the xterm functions to enable them. The `xterm-rxvt-function-map`
keymap already has
(define-key map "\e[200~" [xterm-paste])
so we're already handling the paste sequence and only need to enable it.
Tested on rxvt-unicode version 9.22.
(rxvt-set-window-title): New var.
(terminal-init-rxvt): Use it; enable bracketed paste mode;
run terminal-init-rxvt-hook.
Eli Zaretskii [Sun, 8 Mar 2020 15:00:10 +0000 (17:00 +0200)]
Fix the MinGW build as followup to recent "nofollow" changes
* src/w32.c (fdutimens): Call utimensat instead of utime.
(set_file_times): Function deleted.
(convert_from_timespec): Renamed from convert_from_time_t and
modified to accept 'struct timespec' argument instead of 'time_t'.
(utimensat): Renamed from utime and modified to accept 'struct
timespec [2]' argument and an additional argument FLAG. Emulate
Posix 'utimensat'. Call 'convert_from_timespec'.
(w32_copy_file): Call 'utimensat' instead of 'set_file_times'.
* src/fileio.c (Fcopy_file) [WINDOWSNT]: Make the error message be
identical to that on Posix platforms.
Stefan Monnier [Sun, 8 Mar 2020 04:28:12 +0000 (23:28 -0500)]
* lisp/emacs-lisp/bytecomp.el: Drop warning for loading into Emacs<23
Stash the major version of the compiling Emacs such that the loading
Emacs can later detect when loading a file compiled by a too-new Emacs.
(byte-compile-fix-header): Remove.
(byte-compile-from-buffer): Don't call it any more.
(byte-compile-insert-header): Stash the emacs-major-version in it.
Don't leave space for `byte-compile-fix-header`.
Fixes (Bug#39761) by making cl-extra dependent on seq rather than
vice versa.
* lisp/emacs-lisp/seq.el (seq-concatenate): Move cl-concatenate's
code here instead of calling it.
* lisp/emacs-lisp/cl-extra.el (cl-concatenate): Use cl-concatenate.
Paul Eggert [Sat, 7 Mar 2020 20:04:05 +0000 (12:04 -0800)]
Add ‘nofollow’ flag to set-file-times
This is a companion to the recent set-file-modes patch.
It adds support for a ‘nofollow’ flag to set-file-times (Bug#39773).
Like the set-file-modes patch, it needs work in the w32 port.
* admin/merge-gnulib (GNULIB_MODULES): Add futimens, utimensat.
Remove utimens.
* doc/lispref/files.texi (Changing Files):
* etc/NEWS: Mention the change.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lisp/files.el (copy-directory):
* lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file):
* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file):
* lisp/tar-mode.el (tar-copy):
* test/lisp/filenotify-tests.el (file-notify-test03-events):
* test/lisp/files-tests.el:
(files-tests-file-name-non-special-set-file-times):
* test/lisp/net/tramp-tests.el (tramp-test22-file-times):
When setting file times, avoid following symbolic links
when the file is not supposed to be a symbolic link.
* lib/futimens.c, lib/utimensat.c, m4/futimens.m4, m4/utimensat.m4:
New files, copied from Gnulib.
* lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file):
When creating a file that is not supposed to exist already,
use the excl flag to check this.
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-times):
Accept an optional FLAG arg that is currently ignored,
and add a FIXME comment for it.
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-times):
* src/fileio.c (Fset_file_times):
Support an optional FLAG arg.
* src/fileio.c (Fcopy_file): Use futimens instead of set_file_times,
as it’s simpler and is a POSIX API.
* src/sysdep.c (set_file_times): Move from here ...
* src/w32.c (set_file_times): ... to here, and make it static,
since it is now used only in w32.c. Presumably w32.c should also
add support for futimens and utimensat (the POSIX APIs, which
Emacs now uses) and it can remove fdutimens (the Gnulib API,
which Emacs no longer uses).
Glenn Morris [Sat, 7 Mar 2020 15:50:28 +0000 (07:50 -0800)]
Merge from origin/emacs-27
72f87f8873 (origin/emacs-27) NS port documentation updates 5b19db98ad ; * etc/NEWS: correctly describe what fido-mode is fc47e3ad99 Let fido-mode users force a minibuffer-exit e734961d4c icomplete-fido-exit: New command for the M-j binding 335a9bd215 minibuffer-force-complete-and-exit: Allow input with no ma... 34132d4bf6 ; * etc/NEWS: Mark 2 entries as fully documented. d28b73841b ; * etc/NEWS: Fix the 'mml-secure-openpgp-sign-with-sender... d1d56a9fd9 ; * etc/NEWS: 'thunk-let' and 'thunk-let*' are fully docum... fc4f4efabf ; * etc/NEWS: No need to document vc-hg and mergebase chan... 9e8456cf0f ; * etc/NEWS: No need to document changes in Octave mode. 25b4d6fa28 ; * etc/NEWS: No need to document changes in map.el and se... fc4d0f86da ; * etc/NEWS: No need to document Ido news. d4ac478cb3 ; * etc/NEWS: No need to document news of doc-view.el. 08c042bd26 Document that 'byte-compile-dynamic' is obsolete 512b66abd7 ; * etc/NEWS: No need to document 'goto-address-uri-scheme... 3103c01c3e ; * etc/NEWS: Formatting fixes. 98306fdfb8 ; * etc/NEWS: No need to document deprecation of 'cl'. 6281ed58be ; * etc/NEWS: No need to document the change in 'list-proc... e252341e11 ; * etc/NEWS: 'backup-by-copying-when-privileged-mismatch'... ec5a267ddc ; * etc/NEWS: Mark 'byte-count-to-string-function' as undo... 89307ebccd ; * etc/NEWS: Mark 'completion-common-part' face entry as ... fdbe7cacfb Document the changes in 'read-answer' 10c58356e4 Document changes in lexical-binding 5cb312b5b9 Update ERC mailing list address cb1877321b Use regexp-opt to define bibtex-autokey-transcriptions. (... 3f9c340de0 Improve documentation of 'table-generate-source' 33b31dc314 Attempt to avoid rare segfaults in show_mouse_face 88c6db9196 Avoid crashes when a fontset has strange entries 1814c7e158 Fix rx error with ? and ?? 40fb20061e * lisp/emacs-lisp/rx.el (rx--string-to-intervals): Fix err... 08d7d28d35 Fix args in 'window-text-pixel-size' call in 'fit-window-t... cb1e30910e Have pulse.el preserve existing overlay priorities
Alan Third [Sat, 7 Mar 2020 14:39:05 +0000 (14:39 +0000)]
NS port documentation updates
* doc/emacs/macos.texi (Mac / GNUstep Customization): Document some
more of the ns- variables and remove incorrect font back-end
information.
* etc/NEWS: Update the documentation status of macOS news entries.
Dmitry Gutov [Wed, 4 Mar 2020 23:52:58 +0000 (01:52 +0200)]
minibuffer-force-complete-and-exit: Allow input with no matches
* lisp/minibuffer.el (minibuffer--require-match): New variable.
(completing-read-default): Bind it to the REQUIRE-MATCH value.
(minibuffer-force-complete-and-exit): Consult it to allow input
with no matches when a match is not required (bug#38992).
* lisp/icomplete.el (icomplete-exhibit): Use it to render the
correct parens around matches.
Amin Bandali [Fri, 6 Mar 2020 17:54:23 +0000 (12:54 -0500)]
Update ERC mailing list address
* lisp/erc/erc.el (erc-official-location): As part of bringing ERC
under the Emacs umbrella, erc-discuss has been renamed to emacs-erc,
and will be *the* mailing list for discussions and announcements about
ERC going forward. The other two lists, erc-announce and erc-commit,
are now retired. For more details, see the announcement at
<https://lists.gnu.org/archive/html/emacs-erc/2020-03/msg00001.html>.