João Távora [Wed, 25 Oct 2023 12:45:01 +0000 (13:45 +0100)]
Allow completion frontends to fontify results just-in-time
bug#48841, bug#47711
This allows completion-pcm--hilit-commonality to be sped up
substantially.
Introduce a new variable completion-lazy-hilit that allows for
completion frontends to opt-in an time-saving optimization by some
completions styles, such as the 'flex' and 'pcm' styles.
The variable must be bound or set by the frontend to a unique value
around a completion attempt/session. See completion-lazy-hilit
docstring for more info.
* lisp/minibuffer.el (completion-lazy-hilit): New variable.
(completion-lazy-hilit)
(completion-lazy-hilit-fn): New variable.
(completion--flex-score-1): New helper.
(completion-pcm--hilit-commonality): Use completion-lazy-hilit.
Po Lu [Thu, 26 Oct 2023 11:37:58 +0000 (11:37 +0000)]
Enable DND handlers to receive more than one URI at a time
* doc/lispref/frames.texi (Drag and Drop): Illustrate the effect
of the dnd-multiple-handler property and how convergent handlers
are reconciled.
* etc/NEWS (Lisp Changes in Emacs 30.1): Announce this change.
* lisp/dnd.el (dnd-protocol-alist): Bring doc string up to date.
(dnd-handle-one-url): Obsolete this function.
(dnd-handle-multiple-urls): New function.
* lisp/x-dnd.el (x-dnd-handle-uri-list, x-dnd-handle-file-name):
Reimplement in terms of `dnd-handle-multiple-uris'.
* lisp/term/pgtk-win.el (pgtk-drag-n-drop)
(pgtk-drag-n-drop-other-frame, pgtk-drag-n-drop-as-text): Efface
detritus that remained after the removal of the old PGTK drag
and drop implementation.
Harald Jörg [Thu, 26 Oct 2023 10:06:12 +0000 (12:06 +0200)]
cperl-mode.el: Make commands and options for Perl info pages obsolete.
The Perl documentation in info format is no longer distributed with Perl,
nor is it available from CPAN. Point to cperl-perldoc instead.
* lisp/progmodes/cperl-mode.el (cperl-info-page): Make obsolete.
(cperl-tips): Remove outdated instructions to get Perl info
sources from the docstring.
(cperl-praise): Remove advertising the info interface in the
docstring.
(cperl-mode-map): Replace bindings to `cperl-info-on-command' and
`cperl-info-on-current-command' by `cperl-perldoc'.
(cperl-menu): Remove menu entries pointing to the Perl info page.
(cperl-mode): Remove explanation of the Perl info commands from
the docstring.
(cperl-info-on-command, cperl-info-on-current-command),
(cperl-imenu-info-imenu-search, cperl-imenu-on-info): Declare the
commands obsolete.
* etc/NEWS: Describe the obsoletion of Perl info commands.
john muhl [Tue, 10 Oct 2023 19:39:30 +0000 (14:39 -0500)]
Improve imenu support in lua-ts-mode
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Include require
statements and remove anonymous entries.
(lua-ts--named-function-p, lua-ts--require-name-function)
(lua-ts--require-p): New functions.
* lisp/speedbar.el (speedbar-supported-extension-expressions):
Add Lua to the list of supported file types. (Bug#66465)
Spencer Baugh [Sat, 19 Aug 2023 20:01:54 +0000 (16:01 -0400)]
Add toggle-window-dedicated command and mode-line-window-dedicated
It's sometimes useful to interactively make certain windows dedicated.
This allows a level of interactive control over which window
display-buffer uses.
Additionally, when a window is dedicated (even without this new
command) it can affect display-buffer behavior in ways which may be
unexpected for users. Let's display the window dedicated status in
the mode-line to help indicate what's going on.
* doc/emacs/windows.texi (Displaying Buffers): Add information about
dedicated windows and toggle-window-dedicated.
* doc/emacs/screen.texi (Mode Line): Add information about the window
dedicated indicator.
* etc/NEWS: Announce mode-line-window-dedicated and
toggle-window-dedicated.
* lisp/window.el (toggle-window-dedicated): Add. (bug#64619)
(window-prefix-map): Add C-x w d binding.
* lisp/bindings.el (mode-line-window-control): Add.
(mode-line-window-dedicated): Add.
(standard-mode-line-format): Insert mode-line-window-dedicated.
Stefan Kangas [Wed, 25 Oct 2023 10:27:31 +0000 (12:27 +0200)]
Prefer HTTPS in `M-x webjump´
* lisp/net/webjump.el (webjump-url-fix): Prefer HTTPS to HTTP.
(webjump-sites): Document the above change.
(webjump-sample-sites): Change some links to HTTP only.
Po Lu [Wed, 25 Oct 2023 02:19:36 +0000 (10:19 +0800)]
Correct computation of intermediate axis coordinates
* src/sfnt.c (sfnt_compute_tuple_scale, sfnt_vary_simple_glyph)
(sfnt_vary_compound_glyph): Correct typos involving
intermediate_end (or something of the like) being set to
intermediate_start.
Jim Porter [Tue, 10 Oct 2023 03:25:28 +0000 (20:25 -0700)]
Add a new Eshell special reference type for markers
* lisp/eshell/esh-arg.el (eshell-get-marker, eshell-insert-marker)
(eshell-complete-marker-ref): New functions...
(eshell-special-ref-alist): ... Add them to the new "marker" entry.
* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Fix edge
case when 'end' is at beginning of (possibly-narrowed) buffer.
* lisp/eshell/esh-arg.el (eshell-special-ref-alist) New variable...
(eshell-special-ref-default): ... New option...
(eshell--special-ref-function): ... New function...
(eshell-parse-special-reference): ... use them.
(eshell-insert-special-reference): New function.
(eshell-complete-special-reference): Reimplement to use a nested call
to Pcomplete.
(eshell-complete-buffer-ref): New function.
* lisp/eshell/esh-proc.el (eshell-proc-initialize): Add "process"
special ref type here.
(eshell-complete-process-ref): New function.
* doc/misc/eshell.texi (Bugs and ideas): Remove now-implemented idea.
Jim Porter [Tue, 22 Aug 2023 20:13:45 +0000 (13:13 -0700)]
Support arbitrary Eshell arguments inside special references
* lisp/eshell/esh-arg.el (eshell-current-argument-plain): New variable.
(eshell-parse-special-reference): Use 'eshell-parse-arguments'.
(eshell-get-buffer): New function.
(eshell-insert-buffer-name): Properly quote the buffer name.
* lisp/eshell/esh-proc.el (eshell-read-process-name): Move to "Special
references" section.
(eshell-insert-process): Properly quote the process name.
* lisp/eshell/em-extpipe.el (eshell-parse-external-pipeline):
* lisp/eshell/esh-io.el (eshell-parse-redirection): Don't do anything
when 'eshell-argument-plain' is non-nil.
Harald Jörg [Tue, 24 Oct 2023 15:54:39 +0000 (17:54 +0200)]
; cperl-mode.el: Remove functions using mode-compile.el
mode-compile.el is no longer available from any maintained repository,
its archived version does not work since Emacs 27. The menu options
tested for availability of mode-compile and therefore were disabled,
the function was not documented.
* lisp/progmodes/cperl-mode.el (cperl-tips): Remove reference to
mode-compile.el.
(cperl-menu): Remove defunct entries requiring mode-compile.
(cperl-check-syntax): Remove function.
(cperl-extra-perl-args): Remove user option only used by cperl-check-syntax.
Stefan Kangas [Tue, 24 Oct 2023 15:28:51 +0000 (17:28 +0200)]
Make NSM warn if DH key exchange has less than 2048 bit primes
The previous default was to warn when servers supported only 1024 bit
primes in Diffie-Hellman key exchanges. This highly conservative
number was based on the observation that, in November 2018, no less
than 12.7% of servers still only supported 1024 bit primes (less than
0.1% supported only 768 and 512 bits).
Five years later, in October 2023, only 3.7 % of servers remain with
only 1024 bit support. SSL Labs summarizes: "At this time, 2048 bits
is the minimum expected strength." Therefore, it is reasonable to
start warning users about this in Emacs 30.1, at which time even fewer
servers with such poor capabilities will remain.
Note that key exchanges based on 1024 bit prime number were considered
broken for security purposes already in 2015 (see Logjam below).
For more information:
https://www.ssllabs.com/ssl-pulse/
https://en.wikipedia.org/wiki/Logjam_(computer_security)
* lisp/net/nsm.el (nsm-protocol-check--dhe-prime-kx): Bump expected
minimum number of prime bits to 2048.
Po Lu [Tue, 24 Oct 2023 13:12:32 +0000 (21:12 +0800)]
Introduce an option which controls touch screen hscroll
* doc/emacs/input.texi (Touchscreens): Document this new
function and revise this node for clarity and pithiness.
* lisp/touch-screen.el (touch-screen): New custom group.
(touch-screen-display-keyboard, touch-screen-delay)
(touch-screen-precision-scroll, touch-screen-word-select)
(touch-screen-extend-selection, touch-screen-preview-select):
Move such options to that group.
(touch-screen-enable-hscroll): New user option.
(touch-screen-handle-scroll): If it is disabled, maintain the
hscroll accumulators but refrain from scrolling the window.
Instead of modifying `frame-format` to be entirely machine-readable,
keep the original human-readable format and append a second,
machine-readable line that we remove after parsing.
* lisp/progmodes/gud.el
(gud-lldb-marker-filter): Parse the new line format and filter it out.
* lisp/progmodes/gud.el
(gud-lldb-def-python-completion-function): Rename to...
(gud--lldb-python-init-string): ...this and add modification
of `frame-format`, which seems easiest done from Python.
(gud-lldb-frame-format): Remove.
(gud-lldb-initialize): Update, remove no longer needed parts.
Po Lu [Tue, 24 Oct 2023 07:32:25 +0000 (07:32 +0000)]
Correct documentation of selection-coding-system
* doc/lispref/frames.texi (Window System Selections): Don't
assert that selection-coding-system functions everywhere or that
its default value is always utf-16le-dos.
(Drag and Drop): Fix a typo.
Po Lu [Tue, 24 Oct 2023 03:04:51 +0000 (03:04 +0000)]
Rewrite first two sections of the drag-and-drop documentation
* doc/lispref/frames.texi (Accessing Selections): Refine
wording.
(Drag and Drop): Rewrite for clarity and enter into detail upon
various function arguments.
Stefan Kangas [Mon, 23 Oct 2023 22:21:20 +0000 (00:21 +0200)]
Remove gmane.org support from nnweb
* lisp/gnus/nnweb.el (nnweb-type, nnweb-type-definition): Remove gmane.
(nnweb-gmane-create-mapping, nnweb-gmane-wash-article)
(nnweb-gmane-search, nnweb-gmane-identity): Make obsolete.
(nnweb-definition, nnweb-init): Raise user-error when 'nnweb-type' is
'gmane'.
* doc/misc/gnus.texi (Registry Article Refer Method): Update
example to not use gmane.org.
Ref: https://gmane.io/
More robust control sequence handling in LLDB output (bug#66604)
* lisp/progmodes/gud.el (gud-lldb-marker-filter):
Slightly more elaborate interpretation of CHA and ED sequences
in LLDB output, allowing edits to previously emitted characters
on the same line.
* doc/lispref/variables.texi (Variable Scoping)
(Lexical Binding, Dynamic Binding):
Alter the presentation order from the point of view that lexical
binding is the standard discipline (if not always the default) and
dynamic binding an alternative, which corresponds better to Elisp
today. Modernise parts of the text.
* doc/lispref/elisp.texi (Top): Update menu.
Po Lu [Mon, 23 Oct 2023 11:11:30 +0000 (11:11 +0000)]
Rewrite Yank Media node in the Emacs Lisp manual
* doc/lispref/frames.texi (Other Selections): Introduce a
reference to Accessing Selections, then rewrite for clarity and
to stop mentioning MIME types by name, for selection data types
are not confined to those.
john muhl [Thu, 5 Oct 2023 01:46:15 +0000 (20:46 -0500)]
Various improvements to lua-ts-mode (Bug#66159)
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Improve movement.
(lua-ts--simple-indent-rules): Improve indentation rules.
(lua-ts-mode-map): Add key bindings and menus.
(lua-ts-mode-hook): Make hook available in Customize.
(lua-ts-inferior-history, lua-ts-inferior--write-history): Add option
to read/write an input history file.
(lua-ts-inferior-lua, lua-ts-send-buffer, lua-ts-send-file)
(lua-ts-send-region, lua-ts-inferior-prompt)
(lua-ts-inferior-prompt-continue): Support for sending buffer,
file or region to the inferior process.
(lua-ts-show-process-buffer, lua-ts-hide-process-buffer)
(lua-ts-kill-process): New functions.
(lua-ts-inferior-prompt-regexp): Remove option.
* test/lisp/progmodes/lua-ts-mode-resources/indent.erts:
* test/lisp/progmodes/lua-ts-mode-resources/movement.erts: Add
tests.
Po Lu [Mon, 23 Oct 2023 02:32:09 +0000 (02:32 +0000)]
Further improve documentation concerning selections
* doc/lispref/frames.texi (Window System Selections): Replace
incomplete attempts to address selection data types in this node
with references to Accessing Selections.
(Accessing Selections, X Selections): Revise for clarity and
pithiness.
Mauro Aranda [Sat, 21 Oct 2023 14:02:36 +0000 (11:02 -0300)]
Allow specifying the dir locals file to edit (Bug#66663)
* lisp/files-x.el (modify-dir-local-variable): Take a 5th optional
argument, the filename of the dir locals file to modify.
(read-dir-locals-file): New function.
(add-dir-local-variable, delete-dir-local-variable)
(copy-file-locals-to-dir-locals): Optionally read the filename to
modify, and pass it to modify-dir-local-variable.
* etc/NEWS: Announce the change.
* doc/emacs/custom.texi (Directory Variables): Document the new
functionality.
Po Lu [Sun, 22 Oct 2023 07:54:50 +0000 (07:54 +0000)]
Revise documentation concerning selections outside X
* doc/lispref/frames.texi (Accessing Selections, X Selections):
Correct markup, averting the recognition of X followed by a
sentence stop as an acronym.
(Other Selections): Relate the nature of the MS-Windows
selection emulation, how it functions, and its deficiencies.
Clarify paragraphs concerning PGTK and Nextstep.
* doc/misc/efaq.texi (Emacs in a Linux console):
* doc/misc/use-package.texi (Conditional loading): Correct
markup, averting the recognition of X followed by a sentence
stop as an acronym.
Po Lu [Sun, 22 Oct 2023 01:06:28 +0000 (09:06 +0800)]
Enumerate default UVS glyphs
* src/sfnt.c (sfnt_compare_unicode_value_range)
(sfnt_is_character_default): New functions.
(sfnt_test_uvs): Print and verify the default UVS table.
* src/sfnt.h: Update prototypes.
* src/sfntfont.c (sfntfont_get_variation_glyphs): Index the cmap
with the default glyph, and insert it within VARIATIONS if
character is present within a selector record's default UVS
table.
Move lexical-binding warning from checkdoc to byte-compiler
This warning is much more appropriate for the compiler, since lexical
binding affects what it can reason and warn about, than for checkdoc
as the warning has no bearing to documentation at all.
The move also improves the reach of the warning.
Eli Zaretskii [Sat, 21 Oct 2023 12:06:08 +0000 (08:06 -0400)]
; Merge from origin/emacs-29
The following commits were skipped:
62920dcb0de Update Tramp version (don't merge with master) d963bc6c6b6 ; * lisp/ldefs-boot.el: Regenerated for Emacs 29.1.90. 0cbc91f29ae Bump Emacs version
Move and edit text about lexical environment representation
It's only relevant for the second argument to `eval`; the actual
internal representation is an implementation matter and usually
different from what was described here.
* doc/lispref/variables.texi (Lexical Binding): Move the relevant
part of the description of the internal representation of
lexical environments from here...
* doc/lispref/eval.texi (Eval): ...to here, where it belongs.
Eli Zaretskii [Sat, 21 Oct 2023 10:53:21 +0000 (13:53 +0300)]
Fix mouse clicks on links under 'global-display-line-numbers-mode'
* src/indent.c (line_number_display_width): No longer static.
* src/lisp.h (line_number_display_width): Add prototype.
* src/keyboard.c (save_line_number_display_width)
(line_number_mode_hscroll): New functions.
(make_lispy_event): Call 'save_line_number_display_width' and
'line_number_mode_hscroll' to avoid interpreting up-event as drag
event when redisplay scrolls the text horizontally between the
down- and up-event to account for the changed width of the
line-number display. (Bug#66655)
Huan Nguyen [Sat, 7 Oct 2023 10:03:55 +0000 (12:03 +0200)]
New keyword :default-language in treesit-font-lock-rules function.
* lisp/treesit.el (treesit-font-lock-rules): Keyword :default-language
LANGUAGE will be chosen for every :feature. Using :language will
override the :default-language for the next :feature.
Stefan Monnier [Sat, 21 Oct 2023 00:42:04 +0000 (20:42 -0400)]
(buffer-match-p): Replace `&optional` with `&rest` (bug#65797)
* lisp/subr.el (buffer-match-p--past-warnings): New var.
(buffer-match-p): Use it. Replace `&optional arg` with `&rest args`.
(match-buffers): Replace `&optional arg` with `&rest args`.
* lisp/window.el (display-buffer-alist): Fix out of date docstring.
* doc/lispref/buffers.texi (Buffer List): Document new calling convention.
F. Jason Park [Sun, 15 Oct 2023 20:20:07 +0000 (13:20 -0700)]
Prefer erc-target to erc-default-target
* etc/ERC-NEWS: Mention `erc-target' and new `erc-server-buffer-p'
alias.
* lisp/erc/erc-backend.el (erc-process-sentinel): Set `joined-p' slot
of `erc--target-channel' object to nil when applicable.
(erc-server-JOIN): Mark `erc--target-channel' object as being joined.
* lisp/erc/erc-common.el (erc--target-channel): Add `joined-p' slot.
Use hyphenated name so accessor function's name ends in "joined-p"
rather than "joinedp". Note that this will always be nil when
disconnected.
(erc--target): Relocate here from erc.el.
(erc-target): New public API function to return the current buffer's
target as a string, even in channels that have been unjoined.
* lisp/erc/erc-networks.el (erc--default-target): Remove forward
declaration.
(erc-networks--id-reload): Use `erc-target' instead of
`erc--default-target' as predicate for visiting target buffers.
* lisp/erc/erc.el (erc-remove-channel-users): Set channel "joinedness"
to nil in `erc--target-channel' object, when applicable.
(erc--target): Move to erc-common.
(erc--default-target): Remove, replaced by new function `erc-target'.
(erc-query-buffer-p): Use `erc-target'.
(erc-after-connect): Revise doc string.
(erc-connection-established): Revise doc string and move
`erc-unhide-query-prompt' business before hook.
(erc--current-buffer-joined-p): Remove comment and use new `joined-p'
slot of `erc--target-channel' for determining "joinedness" of channel.
(erc-kill-buffer-function): Use `erc--target-channel-p' for detecting
whether the buffer is a channel buffer.
* test/lisp/erc/erc-networks-tests.el
(erc-networks--shrink-ids-and-buffer-names--hook-collapse-target):
Remove comment.
* test/lisp/erc/erc-scenarios-base-reuse-buffers.el
(erc-scenarios-common--base-reuse-buffers-channel-buffers):
Clarify assertion.
* test/lisp/erc/erc-tests.el (erc-with-all-buffers-of-server):
Replace `erc-default-recipients' with `erc--target'.
(erc--target-from-string): Update expected shape of
`erc--target-channel' struct with new `joined-p' slot.
(erc-message): Set `erc--target' in buffer "#chan". (Bug#66578)