Alan Mackenzie [Sun, 31 Jan 2021 17:24:23 +0000 (17:24 +0000)]
Minimise the time Vminibuffer_list is in an inconsistent state (src/minibuf.c)
src/minibuf.c (get_minibuffer): Move the XSETCAR which writes the new
minibuffer into Vminibuffer_list to immediately after the MB's creation, so
that the list is in a consistent state before calling fundamental-mode or
minibuffer-inactive-mode.
* lisp/subr.el (operating-system-release): Make obsolete
(bug#39940). There are no in-tree usages any more, and the data
doesn't seem all that interesting on its own.
Doc string improvements around `default-korean-keyboard'
* lisp/language/korea-util.el (default-korean-keyboard): Mention
"Hangul" here for easier discoverability.
(toggle-korean-input-method, quail-hangul-switch-symbol-ksc)
(quail-hangul-switch-hanja): Mention the variable.
Alan Mackenzie [Sat, 30 Jan 2021 21:16:35 +0000 (21:16 +0000)]
With minibuffer-follows-selected-frame `hybrid', preserve recursive Mbuffers
...when enable-recursive-minibuffers is non-nil, and several minibuffers are
activated from different frames. Also set the major mode of a reused active
minibuffer to `fundamental-mode' - up till now it's been
minibuffer-inactive-mode.
* src/minibuf.c (read_minibuf): with the indicated settings of variables,
"stack up" all containing minibuffers on the mini-window of the current
frame. Delete another, now superfluous such stacking up.
(set_minibuffer_mode): New function.
(get_minibuffer): Call the above new function (twice), in place of inline
code, ensuring active minibuffers are never left in minibuffer-inactive-mode.
Juri Linkov [Sat, 30 Jan 2021 19:12:37 +0000 (21:12 +0200)]
Allow the caller to specify own face on suffix in annotation-function
* lisp/minibuffer.el (completion--insert-strings):
Don't add 'completions-annotations' face when the caller
specified own face in annotation-function.
Remove no-op code for 'unless prefix' branch.
(completion-metadata, completion-extra-properties):
Update docs of affixation-function.
Suggested by Clemens <clemera@posteo.net> (bug#45780)
* test/lisp/minibuffer-tests.el: Rename package name from
completion-tests.el to minibuffer-tests.el.
Add new test completion--insert-strings-faces.
* doc/lispref/minibuf.texi (Completion Variables)
(Programmed Completion): Update descriptions of
annotation-function and affixation-function.
Augusto Stoffel [Wed, 27 Jan 2021 15:09:38 +0000 (16:09 +0100)]
Reduce flicker in Isearch mode
Lazy highlighting now happens immediately when the search string is at
least as long as the value of the new custom variable
`lazy-highlight-no-delay-length`. Also avoid updating the lazy
count in the echo area too often.
* isearch.el (lazy-highlight-no-delay-length): New defcustom.
* isearch.el (lazy-lazy-count-format): Avoid a momentarily incorrect
count when reversing search direction.
* isearch.el (isearch-lazy-highlight-new-loop): Avoid a call to
`isearch-message` that is quickly succeed by a second echo area
update, thus causing flicker.
* isearch.el (isearch-lazy-highlight-new-loop):
Start lazy highlight immediately if appropriate.
* etc/NEWS: Announce the change.
* doc/emacs/search.texi: Document `lazy-highlight-no-delay-length'.
Eli Zaretskii [Sat, 30 Jan 2021 09:26:07 +0000 (11:26 +0200)]
New Rmail option 'rmail-show-message-set-modified'
* lisp/mail/rmail.el (rmail-show-message-set-modified): New
option.
(rmail-show-message-1): If 'rmail-show-message-set-modified' is
non-nil, don't reset the buffer's modified state. (Bug#45941)
Jeff Spencer [Sat, 30 Jan 2021 07:12:57 +0000 (08:12 +0100)]
Fix interaction between two dired cleanup variables
* lisp/dired.el (dired-clean-up-after-deletion): Kill the buffers
if you have `dired-clean-up-buffers-too' set and
`dired-clean-confirm-killing-deleted-buffers' nil (bug#38037).
Dmitry Gutov [Sat, 30 Jan 2021 01:56:27 +0000 (03:56 +0200)]
vc-dir-mode-map: Remove the mouse-2 binding
* lisp/vc/vc-dir.el (vc-dir-mode-map):
Remove the mouse-2 binding (bug#13692).
(vc-dir-mode): Update the docstring accordingly.
(vc-dir-status-mouse-map): New variable.
(vc-default-dir-printer): Use it on the state buttons.
Eli Zaretskii [Fri, 29 Jan 2021 11:52:31 +0000 (13:52 +0200)]
Support 'operating-system-release' on MS-Windows
* src/w32fns.c (w32_version_string) [WINDOWSNT]: New function.
* src/w32common.h (w32_version_string) [WINDOWSNT]: Add prototype.
* src/editfns.c (init_editfns) [WINDOWSNT]: Produce a non-nil
string with the OS version.
* simple.el (shell-command, shell-command-on-region): Set
revert-buffer-function buffer-locally, not globally. Also, avoid an
unnecessary call to (current-buffer) by taking advantage of the
closure (bug#46151).
Stefan Kangas [Thu, 28 Jan 2021 20:55:31 +0000 (21:55 +0100)]
; Fix my previous commit
* lisp/generic-x.el (generic-mode-ini-file-find-file-hook): Fix my
previous commit; for some reason 'function' produces a warning here
while 'quote' does not.
Stefan Monnier [Thu, 28 Jan 2021 19:42:21 +0000 (14:42 -0500)]
Use lexical-binding in all of `lisp/emacs-lisp`
* lisp/emacs-lisp/bindat.el: Use lexical-binding.
(bindat--unpack-group, bindat--length-group, bindat--pack-group):
Declare `last` and `tag` as dyn-scoped.
(bindat-unpack, bindat-pack): Bind `bindat-raw` and `bindat-idx` via
`let` rather than via the formal arglist.
* lisp/emacs-lisp/helper.el: Use lexical-binding.
(Helper-help-map): Move initialization into declaration.
* lisp/emacs-lisp/regi.el: Use lexical-binding.
(regi-interpret): Remove unused var `tstart`.
Declare `curframe`, `curentry` and `curline` as dyn-scoped.
* lisp/emacs-lisp/shadow.el: Use lexical-binding.
(load-path-shadows-find): Remove unused var `file`.
Tighten a regexp, use `push`.
* lisp/emacs-lisp/tcover-ses.el: Use lexical-binding. Require `ses`.
Remove correspondingly redundant declarations.
(ses--curcell-overlay): Declare.
(ses-exercise): Use `dlet` and use a properly-prefixed var name.
Fix name of `curcell-overlay` variable.
* lisp/emacs-lisp/unsafep.el: Use lexical-binding.
(unsafep): Bind `unsafep-vars` via `let` rather than via the formal arglist.
Juri Linkov [Thu, 28 Jan 2021 19:27:26 +0000 (21:27 +0200)]
Use isearch-tmm-menubar when tmm-menubar is called in isearch-mode (bug#43966)
* lisp/isearch.el (isearch-menu-bar-commands): Add tmm-menubar to defaults.
(isearch-mode-map): Remove remapping of tmm-menubar to isearch-tmm-menubar.
* lisp/tmm.el (tmm-menubar): Call isearch-tmm-menubar in isearch-mode.
Stefan Monnier [Thu, 28 Jan 2021 17:13:29 +0000 (12:13 -0500)]
* test/Makefile.in (emacs): Use the C locale
This fixes spurious test failures in my environment for
`diff-mode-test-font-lock-syntax-one-line` (where my `diff` otherwise
returns "No newline at end of file" in French) and for
various tests in `emacs-module-tests` because errors signal
"Abandon" instead of "Abort".
Michael Albinus [Thu, 28 Jan 2021 14:09:18 +0000 (15:09 +0100)]
Simplify auto-revert buffer list by watch descriptor (Bug#44639)
* lisp/autorevert.el (auto-revert--buffer-by-watch-descriptor):
Rename from `auto-revert--buffers-by-watch-descriptor'. Make it
an assoc list.
(auto-revert-notify-rm-watch, auto-revert-notify-add-watch)
(auto-revert-notify-handler): Adapt accordingly. Based on a
patch provided by Spencer Baugh <sbaugh@catern.com>. (Bug#44639)
Mattias M [Thu, 28 Jan 2021 06:34:10 +0000 (07:34 +0100)]
Fix fill-paragraph in asm-mode
* lisp/progmodes/asm-mode.el: The value of fill-prefix ought to be nil
not "\t" so that fill-context-prefix can do its thing. In fact,
fill-prefix does not have to be set at all becuase asm-mode derives
from prog-mode and fill-prefix is set in simple.el.
* test/lisp/progmodes/asm-mode-tests.el: Add relevant test (bug#41064).
Harald Jörg [Thu, 28 Jan 2021 03:22:21 +0000 (04:22 +0100)]
perl-mode.el: Eliminate keywords which are not in Perl.
* lisp/progmodes/perl-mode.el (perl-imenu-generic-expression):
Remove keywords which are not part of Perl.
(perl-font-lock-keywords-2): Remove keywords which are not part of
Perl (bug#46024). (These keywords are part of Raku; aka. Perl 6.)
Juri Linkov [Wed, 27 Jan 2021 18:08:43 +0000 (20:08 +0200)]
Support multi-line prompt and contents in previous-line-or-history-element.
* lisp/simple.el (previous-line-or-history-element): Move to the
beginning of minibuffer contents if there is editable minibuffer contents
on the same line after moving point to the prompt (bug#46033).
Fix minimal old-column from 0 to 1 to put point at the beginning of
minibuffer contents after going to the previous history element.
Stefan Monnier [Wed, 27 Jan 2021 17:25:52 +0000 (12:25 -0500)]
* lisp/international/titdic-cnv.el: Revert to utf-8 encoding
While it's true that using the iso-2022-jp encoding on the file does
allow Emacs to render the two strings differently, this only applies to
the source file. The .elc files all use `utf-8-emacs` encoding anyway,
so that info is lost. And the difference is even lost before we write
the .elc file because when Emacs byte-compiles that code the
byte-compiler considers those two strings as "equal" and emits only one
string in the byte-code (so the two branches return `eq` strings).
So, I think using `iso-2022-jp` is a bad idea here: it gives the
illusion that the the `charset` info exists, even it will be lost.
Eli discussed it with Handa-san a year ago, and they arrived at the
conclusion that the charset information is indeed no longer important.