]> git.eshelyaron.com Git - emacs.git/log
emacs.git
23 months agoRevert "eglot.texi: Make example more realistic" feature/eglot-texi-manual
João Távora [Thu, 20 Oct 2022 10:42:25 +0000 (11:42 +0100)]
Revert "eglot.texi: Make example more realistic"

This quest for realism ignores the fact that a previous example for a
hypothetical language Foo and a language server "fools" already
exists.  It also undermines the intended generality of the
instructions.

This reverts commit 16986a9cc42ef4de580456f4acc5feba682ac8b1.

23 months agoFix Eglot manual's description of eglot-workspace-configuration
João Távora [Thu, 20 Oct 2022 10:20:30 +0000 (11:20 +0100)]
Fix Eglot manual's description of eglot-workspace-configuration

* doc/misc/eglot.texi (Customizing Eglot)
(eglot-workspace-configuration): Explain that plist may be
arbitrarily complex and correctly identify nil as the Elisp
equivalent to JSON null.

23 months agoeglot.texi: Explain where to find third-party packages
Stefan Kangas [Thu, 20 Oct 2022 09:43:08 +0000 (11:43 +0200)]
eglot.texi: Explain where to find third-party packages

* doc/misc/eglot.texi (Eglot Features): Improve description on
third-party packages.

23 months agoeglot.texi: Make example more realistic
Stefan Kangas [Thu, 20 Oct 2022 09:42:29 +0000 (11:42 +0200)]
eglot.texi: Make example more realistic

* doc/misc/eglot.texi (Eglot and Buffers): Prefer more realistic
*.c instead of *.foo in example.

23 months agoeglot.texi: Move sentence on LSP Servers earlier
Stefan Kangas [Thu, 20 Oct 2022 09:40:37 +0000 (11:40 +0200)]
eglot.texi: Move sentence on LSP Servers earlier

* doc/misc/eglot.texi (Setting Up LSP Servers): Move explanation
on the (lack of) need for customizing servers earlier.

23 months ago; eglot.texi: Fix typos and minor inconsistencies
Stefan Kangas [Thu, 20 Oct 2022 09:38:18 +0000 (11:38 +0200)]
; eglot.texi: Fix typos and minor inconsistencies

* doc/misc/eglot.texi: Fix typos and minor inconsistencies.

23 months ago* doc/misc/Makefile.in (INFO_COMMON): Add eglot.
Stefan Kangas [Thu, 20 Oct 2022 09:02:09 +0000 (11:02 +0200)]
* doc/misc/Makefile.in (INFO_COMMON): Add eglot.

23 months agoRemove spurious trailing ':' in doc/misc/eglot.texi
João Távora [Wed, 19 Oct 2022 12:23:14 +0000 (13:23 +0100)]
Remove spurious trailing ':' in doc/misc/eglot.texi

* doc/misc/eglot.texi (Customizing Eglot): Remove spurious ':'.

23 months agoTweak some node names in doc/misc/eglot.texi
João Távora [Wed, 19 Oct 2022 12:21:40 +0000 (13:21 +0100)]
Tweak some node names in doc/misc/eglot.texi

"Shutting Down LSP Server" -> "Shutting Down LSP Servers"
"Setting Up LSP Server" -> "Setting Up LSP Servers"

* doc/misc/eglot.texi: Rework node names.

23 months agoMore minor fixes to doc/misc/eglot.texi
João Távora [Tue, 18 Oct 2022 13:46:27 +0000 (14:46 +0100)]
More minor fixes to doc/misc/eglot.texi

Most, if not all of these, were previously discussed with Eli.

* doc/misc/eglot.texi (Setting Up LSP Server): Fix repetition of
"This variable".
(Setting Up LSP Server): Explain that single a running instance
supports multiple major modes.
(Starting Eglot, Eglot and Buffers): Correctly describe mode-line indication.
(Eglot Features): Suggest that company-mode is just one of the
possible packages.  Explain that Eglot arranges for the completion
package to "instantiate" snippets.  Could have used "expand".
Mention benefits of having the popular markdown-mode available.
(Eglot Commands): Explain how eglot-reconnect and
eglot-clear-status are useful.
(Eglot Variables): Clarify when eglot-autoreconnect is useful.
Clarify how eglot-sync-connect and eglot-connect-timeout relate to
each other.  Clarify semantics of
eglot-confirm-server-initiated-edits.

23 months agoMinor stylistic fixes to introduction of doc/misc/eglot.texi
João Távora [Tue, 18 Oct 2022 11:46:48 +0000 (12:46 +0100)]
Minor stylistic fixes to introduction of doc/misc/eglot.texi

* doc/misc/eglot.texi (title): Add "the".
(Top): Fix sentence structure in top-level
introduction.

23 months agoAdd new Texinfo manual for the Eglot LSP client
Eli Zaretskii [Tue, 18 Oct 2022 11:17:51 +0000 (12:17 +0100)]
Add new Texinfo manual for the Eglot LSP client

* doc/misc/eglot.texi: New file.

23 months ago* lisp/progmodes/cc-defs.el Remove setting of inhibit-point-motion-hooks
Alan Mackenzie [Tue, 18 Oct 2022 10:00:26 +0000 (10:00 +0000)]
* lisp/progmodes/cc-defs.el Remove setting of inhibit-point-motion-hooks

23 months agoRegenerate ldefs-boot.el
Lars Ingebrigtsen [Tue, 18 Oct 2022 09:18:16 +0000 (11:18 +0200)]
Regenerate ldefs-boot.el

23 months ago* Prevent potential native compilation infinite recursions
Andrea Corallo [Fri, 14 Oct 2022 22:59:55 +0000 (00:59 +0200)]
* Prevent potential native compilation infinite recursions

* lisp/emacs-lisp/comp.el (comp-no-spawn): New var.
(comp-subr-trampoline-install, comp-final, comp-run-async-workers)
(comp--native-compile): Update.

23 months ago; Fix some invalid Eshell syntax in an example
Jim Porter [Tue, 18 Oct 2022 04:25:37 +0000 (21:25 -0700)]
; Fix some invalid Eshell syntax in an example

* doc/misc/eshell.texi (Expansion):
* etc/NEWS: Fix invalid Eshell syntax.

23 months agoPrint the correct $PATH when Eshell's 'which' fails to find a command
Jim Porter [Thu, 15 Sep 2022 19:32:02 +0000 (12:32 -0700)]
Print the correct $PATH when Eshell's 'which' fails to find a command

* lisp/eshell/esh-cmd.el (eshell/which): Use 'eshell-get-path'
(bug#20008).

23 months agoImprove handling of $PATH in Eshell for remote directories
Jim Porter [Thu, 15 Sep 2022 19:24:37 +0000 (12:24 -0700)]
Improve handling of $PATH in Eshell for remote directories

* lisp/eshell/esh-util.el (eshell-path-env, eshell-parse-colon-path):
Make obsolete.
(eshell-path-env-list): New variable.
(eshell-connection-default-profile): New connection-local profile.
(eshell-get-path): Reimplement using 'eshell-path-env-list'; add
LITERAL-P argument.
(eshell-set-path): New function.

* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Add entry for
$PATH.
(eshell-var-initialize): Add 'eshell-path-env-list' to
'eshell-subcommand-bindings'.

* lisp/eshell/esh-ext.el (eshell-search-path): Use 'file-name-concat'
instead of 'concat'.
(eshell/addpath): Use 'eshell-get-path' and 'eshell-set-path'.

* lisp/net/tramp-integration.el: Only apply Eshell hooks when
'eshell-path-env-list' is unbound.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/path-var/local-directory)
(esh-var-test/path-var/remote-directory, esh-var-test/path-var/set)
(esh-var-test/path-var/set-locally)
(esh-var-test/path-var-preserve-across-hosts): New tests.

* test/lisp/eshell/esh-ext-tests.el: New file.

* test/lisp/eshell/eshell-tests-helpers.el
(with-temp-eshell): Set 'eshell-last-dir-ring-file-name' to nil.
(eshell-tests-remote-accessible-p, eshell-last-input)
(eshell-last-output): New functions.
(eshell-match-output, eshell-match-output--explainer): Use
'eshell-last-input' and 'eshell-last-output'.

* doc/misc/eshell.texi (Variables): Document $PATH.

* etc/NEWS: Announce this change (bug#57556).

23 months agoAllow setting the values of variable aliases in Eshell
Jim Porter [Mon, 26 Sep 2022 04:47:26 +0000 (21:47 -0700)]
Allow setting the values of variable aliases in Eshell

This makes commands like "COLUMNS=40 some-command" work as expected.

* lisp/eshell/esh-cmd.el (eshell-subcommand-bindings): Remove
'process-environment' from here...

* lisp/eshell/esh-var.el (eshell-var-initialize): ... and add to here,
along with 'eshell-variable-aliases-list'.
(eshell-inside-emacs): Convert to a 'defvar-local' to make it settable
in a particular Eshell buffer.
(eshell-variable-aliases-list): Make $?, $$, and $* read-only and
update docstring.
(eshell-set-variable): New function...
(eshell-handle-local-variables, eshell/export, eshell/unset): ... use
it.
(eshell/set, pcomplete/eshell-mode/set): New functions.
(eshell-get-variable): Get the variable alias's getter function when
appropriate and use a safer method for checking function arity.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/set/env-var)
(esh-var-test/set/symbol, esh-var-test/unset/env-var)
(esh-var-test/unset/symbol, esh-var-test/setq, esh-var-test/export)
(esh-var-test/local-variables, esh-var-test/alias/function)
(esh-var-test/alias/function-pair, esh-var-test/alias/string)
(esh-var-test/alias/string/prefer-lisp, esh-var-test/alias/symbol)
(esh-var-test/alias/symbol-pair, esh-var-test/alias/export)
(esh-var-test/alias/local-variables): New tests.

* doc/misc/eshell.texi (Built-ins): Add 'set' and update 'unset'
documentation.
(Variables): Expand documentation of how to get/set variables.

23 months ago; Obsolete 'eshell/define'
Jim Porter [Wed, 28 Sep 2022 16:34:38 +0000 (09:34 -0700)]
; Obsolete 'eshell/define'

* lisp/eshell/esh-var.el (eshell/define): Make obsolete, and explain
its current state.

* doc/misc/eshell.texi (Built-ins): Remove 'define'.

23 months ago; Allow ignoring errors when calling 'eshell-match-command-output'
Jim Porter [Sun, 25 Sep 2022 01:13:03 +0000 (18:13 -0700)]
; Allow ignoring errors when calling 'eshell-match-command-output'

* test/lisp/eshell/eshell-tests-helpers.el
(eshell-match-command-output): New argument IGNORE-ERRORS.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/last-status-var-lisp-command)
(esh-var-test/last-status-var-lisp-form)
(esh-var-test/last-status-var-lisp-form-2): Ignore errors when calling
'eshell-match-command-output'.

23 months agoAdd helpers to dynamically assign connection-local values
Jim Porter [Wed, 12 Oct 2022 05:11:04 +0000 (22:11 -0700)]
Add helpers to dynamically assign connection-local values

* lisp/files-x.el (connection-local-criteria)
(connection-local-profile-name-for-setq): New variables.
(with-connection-local-variables-1): ... let-bind them here.
(connection-local-update-profile-variables)
(connection-local-profile-name-for-criteria): New functions.
(with-connection-local-application-variables, setq-connection-local):
New macros.

* test/lisp/files-x-tests.el: Require 'tramp-integration'
(files-x-test--variable5, remote-lazy-var): New variables.
(files-x-test-hack-connection-local-variables-apply): Expand checks.
(files-x-test-with-connection-local-variables): Remove
'hack-connection-local-variables-apply' check (it belongs in the above
test), and expand some other checks.
(files-x-test--get-lazy-var, files-x-test--set-lazy-var): New
functions.
(files-x-test-connection-local-update-profile-variables)
(files-x-test-setq-connection-local): New tests.

* doc/lispref/variables.texi (Connection Local Variables): Split into
two subsections and document the new features.

* etc/NEWS: Announce 'setq-connection-local'.

23 months ago; Remove over-quoting of :application values in connection-local variables
Jim Porter [Wed, 12 Oct 2022 18:28:05 +0000 (11:28 -0700)]
; Remove over-quoting of :application values in connection-local variables

* test/lisp/files-x-tests.el (files-x-test--application)
(files-x-test--another-application):
* doc/lispref/variables.texi (Connection Local Variables): Remove
extra quotes.

23 months agoImprove ‘random’ doc re nonces
Paul Eggert [Mon, 17 Oct 2022 04:35:47 +0000 (21:35 -0700)]
Improve ‘random’ doc re nonces

* doc/lispref/numbers.texi (Random Numbers): Improve coverage of
random seed, entropy pools, and why one shouldn’t use ‘random’ for
nonces.  See Bug#58472.

23 months agoFix bug#58584
Po Lu [Tue, 18 Oct 2022 00:52:01 +0000 (08:52 +0800)]
Fix bug#58584

* src/xterm.c (x_handle_selection_monitor_event): Return if
selection event is one Emacs asked for.
(handle_one_xevent): In that case, drop the event and don't let
it reach GTK.

23 months ago; Fix comment
Dmitry Gutov [Mon, 17 Oct 2022 23:49:21 +0000 (02:49 +0300)]
; Fix comment

23 months agoFollow-up fixes for vc-default-checkin-patch
Dmitry Gutov [Mon, 17 Oct 2022 23:33:43 +0000 (02:33 +0300)]
Follow-up fixes for vc-default-checkin-patch

* lisp/vc/vc.el (vc-default-checkin-patch):
Call vc-revert-file on buffer-file-name (vc-backend failed on
relative name sometimes).  Delete the tmp dir after copying all
files back, not just the first one.  Bug#52349,
https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg01446.html.

23 months agoCC Mode: Don't fontify as types variables with the same names as struct tags
Alan Mackenzie [Mon, 17 Oct 2022 20:33:26 +0000 (20:33 +0000)]
CC Mode: Don't fontify as types variables with the same names as struct tags

This fixes bug #58534.

* lisp/progmodes/cc-engine.el (c-forward-type): Only regard "struct" keywords
which create self contained types (e.g. C++'s "typename") as creating found
types.

* lisp/progmodes/cc-langs.el (c-self-contained-typename-kwds
(c-self-contained-typename-key): New language consts and variable.

23 months agoPrefer defvar-keymap in fortran.el
Stefan Kangas [Mon, 17 Oct 2022 18:21:05 +0000 (20:21 +0200)]
Prefer defvar-keymap in fortran.el

* lisp/progmodes/fortran.el (fortran-mode-map): Prefer
defvar-keymap.

23 months agoUpdate version information in Gnus manual
Stefan Kangas [Mon, 17 Oct 2022 18:10:40 +0000 (20:10 +0200)]
Update version information in Gnus manual

* doc/misc/gnus.texi (Gnus Versions): Update with some information
from https://www.gnus.org/history.html
(Ma Gnus): Explain that Gnus is now developed together with
Emacs.  (Bug#58161)

23 months agoSilence recent comp-tests.el lexvar warnings
Basil L. Contovounesios [Mon, 17 Oct 2022 15:40:45 +0000 (18:40 +0300)]
Silence recent comp-tests.el lexvar warnings

* test/lisp/emacs-lisp/comp-tests.el: Mark used native-compile
variables as special to pacify unknown lexvar warnings in the
default build.
(with-test-native-compile-prune-cache): Instrument macro arguments
for debugging and indent conventionally.  Reindent all callers.
(test-native-compile-prune-cache/dont-delete-in-parent-of-cache):
Simplify file name expansion.

23 months agoImprove native-compile-prune-cache messages
Stefan Kangas [Mon, 17 Oct 2022 13:26:56 +0000 (15:26 +0200)]
Improve native-compile-prune-cache messages

* lisp/emacs-lisp/comp.el (native-compile-prune-cache): Quote name of
pruned directory.

23 months agoDon't prune *.eln files in parent of eln-load-path
Stefan Kangas [Mon, 17 Oct 2022 13:26:21 +0000 (15:26 +0200)]
Don't prune *.eln files in parent of eln-load-path

* lisp/emacs-lisp/comp.el (native-compile-prune-cache): Don't
prune *.eln files in parent directory of `native-comp-eln-load-path'.
* test/lisp/emacs-lisp/comp-tests.el
(test-native-compile-prune-cache/dont-delete-in-parent-of-cache):
New test.

23 months agoAdd tests for native-compile-prune-cache
Stefan Kangas [Mon, 17 Oct 2022 08:37:08 +0000 (10:37 +0200)]
Add tests for native-compile-prune-cache

* test/lisp/comp-tests.el: New file.

23 months agoFix pieces of code being too expensive over slow network connections
Po Lu [Mon, 17 Oct 2022 12:56:20 +0000 (20:56 +0800)]
Fix pieces of code being too expensive over slow network connections

* lisp/menu-bar.el (menu-bar-edit-menu): Test buffer-read-only
before gui-backend-selection-exists-p.  This places the less
expensive condition before the more expensive one.
* src/xfns.c (compute_tip_xy): Use cached monitor attributes
whenever available.
(Fx_show_tip): Remove code that really did nothing.
(Fx_backspace_delete_keys_p): Do not download the entire keymap
from the server upon creating a frame.
* src/xmenu.c (create_and_show_popup_menu): Use
x_translate_coordinates_to_root.
(x_menu_show): Use x_translate_coordinates_to_root.
* src/xselect.c (Fx_selection_exists_p): If a temporary
selection owner can be found, use it.
* src/xterm.c (x_translate_coordinates_to_root)
(x_handle_selection_monitor_event, x_find_selection_owner): New
functions.  These functions try to avoid downloading data from
the X server in places that are called very often (i.e. during
tool bar updates.)
(handle_one_xevent): Handle selection notify events.  Also catch
some mistakes found.  Fetch all kinds of key names as well.
(x_create_special_window): New function.
(x_term_init, x_delete_display): Ask for all key names.  Also,
passively monitor selections that are given to
`x-selection-exists-p' during redisplay, so we do not have to
ask the server about them upon each redisplay.
(syms_of_xterm): New variable `x-fast-selection-list'.
* src/xterm.h (struct x_monitored_selection): New structure.
(X_INVALID_WINDOW): New define.
(struct x_display_info): New fields for selection monitoring.
Also, record the fixes extension base.

23 months agoFix spurious "Compilation finished" native-comp messages
Lars Ingebrigtsen [Mon, 17 Oct 2022 12:30:54 +0000 (14:30 +0200)]
Fix spurious "Compilation finished" native-comp messages

* lisp/emacs-lisp/comp.el (native--compile-async): Don't start the
async compilation if we didn't add anything.  This avoids spurious
"Compilation finished" messages in the *Async* buffer when it
turned out that all the files we considered nativecomping were
skipped.

23 months agoAvoid having the async compile log saying it's compiling loaddefs
Lars Ingebrigtsen [Mon, 17 Oct 2022 08:48:12 +0000 (10:48 +0200)]
Avoid having the async compile log saying it's compiling loaddefs

* lisp/loadup.el (featurep): Define the hash table in nativecomp
builds (but not otherwise).  A more natural place to define this
would be in comp.el, but comp.el isn't loaded yet when we load the
.elc file that updates comp--no-native-compile.  We could change
the load order and move the definition to comp.el, though.

* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Allow
inhibiting nativecomp earlier (bug#57627).

* lisp/emacs-lisp/comp.el (native-compile-async-skip-p): Use the data.

23 months agoMake `message-canlock-generate' faster
Stefan Kangas [Mon, 17 Oct 2022 06:01:51 +0000 (08:01 +0200)]
Make `message-canlock-generate' faster

* lisp/gnus/message.el (message-canlock-generate): Improve performance
by several orders of magnitude.

23 months agoAdd default implementation for 'checkin-patch'
Dmitry Gutov [Sun, 16 Oct 2022 23:46:02 +0000 (02:46 +0300)]
Add default implementation for 'checkin-patch'

* lisp/vc/vc.el (vc-default-checkin-patch):
Add default implementation for 'checkin-patch' (bug#52349).
The first attempt was here:
https://lists.gnu.org/archive/html/emacs-devel/2022-08/msg01464.html

23 months agocl-generic: Fix `advertised-calling-convention` declarations
Stefan Monnier [Sun, 16 Oct 2022 16:01:47 +0000 (12:01 -0400)]
cl-generic: Fix `advertised-calling-convention` declarations

* lisp/emacs-lisp/cl-generic.el (cl-generic-define-method):
Preserve the `advertised-calling-convention`, if any (bug#58563).

* lisp/subr.el (declare): Warn when we hit this.

* lisp/emacs-lisp/byte-run.el (get-advertised-calling-convention): New fun.
* lisp/progmodes/elisp-mode.el (elisp-get-fnsym-args-string):
* lisp/help-fns.el (help-fns--signature):
* lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition): Use it.

* test/lisp/emacs-lisp/cl-generic-tests.el (cl-generic-tests--acc): New fun.
(cl-generic-tests--advertised-calling-convention-bug58563): New test.

23 months agoMove and rename Python completion ERTs
kobarity [Sun, 16 Oct 2022 13:26:29 +0000 (15:26 +0200)]
Move and rename Python completion ERTs

* test/lisp/progmodes/python-tests.el
(python-shell-completion-at-point-1)
(python-shell-completion-at-point-native-1)
(python-completion-at-point-1)
(python-completion-at-point-2, python-completion-at-point-pdb-1)
(python-completion-at-point-native-1)
(python-completion-at-point-native-2)
(python-completion-at-point-native-with-ffap-1)
(python-completion-at-point-native-with-eldoc-1): Renamed tests
(bug#58565).

23 months agoPrefer defvar-keymap in ansi-osc.el
Stefan Kangas [Sun, 16 Oct 2022 11:53:37 +0000 (13:53 +0200)]
Prefer defvar-keymap in ansi-osc.el

* lisp/ansi-osc.el (ansi-osc-hyperlink-map): Prefer defvar-keymap.

23 months agoMake help-for-help echo key on failure
Stefan Kangas [Sun, 16 Oct 2022 11:02:24 +0000 (13:02 +0200)]
Make help-for-help echo key on failure

* lisp/help-macro.el (make-help-screen): Echo key on failure.

23 months agoBind "home"/"end" in help-for-help
Stefan Kangas [Sun, 16 Oct 2022 11:01:00 +0000 (13:01 +0200)]
Bind "home"/"end" in help-for-help

* lisp/help-macro.el (make-help-screen): Bind "home"/"end" keys to
scrolling up/down.

23 months agoDon't ding when exiting help-for-help with C-g
Stefan Kangas [Sun, 16 Oct 2022 10:59:13 +0000 (12:59 +0200)]
Don't ding when exiting help-for-help with C-g

* lisp/help-macro.el (make-help-screen): Don't ding on "C-g".

23 months agoClear misleading message in help-quit-or-quick
Lars Ingebrigtsen [Sun, 16 Oct 2022 09:52:56 +0000 (11:52 +0200)]
Clear misleading message in help-quit-or-quick

* lisp/help.el (help-quit-or-quick): Clear misleading message
(bug#58542).

23 months ago; * lisp/vc/vc.el (vc-prepare-patch): Fix pluralisation
Philip Kaludercic [Sun, 16 Oct 2022 09:16:52 +0000 (11:16 +0200)]
; * lisp/vc/vc.el (vc-prepare-patch): Fix pluralisation

23 months ago; * lisp/vc/vc.el (vc-prepare-patch): Remove 'exit-recursive-edit'
Philip Kaludercic [Sun, 16 Oct 2022 09:10:34 +0000 (11:10 +0200)]
; * lisp/vc/vc.el (vc-prepare-patch): Remove 'exit-recursive-edit'

23 months agoFix invalid search bound error in python-shell-completion-at-point
kobarity [Sun, 16 Oct 2022 09:26:29 +0000 (11:26 +0200)]
Fix invalid search bound error in python-shell-completion-at-point

* lisp/progmodes/python.el (python-shell-completion-at-point): Add
check if point is before line-start.
* test/lisp/progmodes/python-tests.el (python-shell-completion-shell-buffer-1)
(python-shell-completion-shell-buffer-native-1): New tests
(bug#58548).

23 months agoSignal an error in dictionary lookup if there's no word at point
Daniel Martín [Sun, 16 Oct 2022 09:25:17 +0000 (11:25 +0200)]
Signal an error in dictionary lookup if there's no word at point

* lisp/net/dictionary.el (dictionary-lookup-definition): Signal an
error when there is no word at point (bug#58552).

23 months agoDisable completion when PDB is active in Python Shell buffer
kobarity [Sun, 16 Oct 2022 09:15:22 +0000 (11:15 +0200)]
Disable completion when PDB is active in Python Shell buffer

* lisp/progmodes/python.el (python-shell-completion-at-point): Disable
completion in Python buffer when PDB is active in Python Shell buffer.
* test/lisp/progmodes/python-tests.el (python-shell-completion-pdb-1):
New test (bug#58562).

23 months agoMerge from origin/emacs-28
Stefan Kangas [Sun, 16 Oct 2022 06:27:16 +0000 (08:27 +0200)]
Merge from origin/emacs-28

067361f3a2 ; Improve documentation of 'C-M-i'
fdb6f7cf26 ; Fix documentation of 'comp-enable-subr-trampolines'
be30369e01 ; Avoid incorrect indentation in an @example.
4bd3dd505e Document how to control where the *.eln files are written
b7d7c2d9e9 Add cross-reference to alternative syntaxes for Unicode

# Conflicts:
# doc/emacs/custom.texi

23 months agoExpand 'random' testsuite
Stefan Kangas [Sun, 16 Oct 2022 06:23:35 +0000 (08:23 +0200)]
Expand 'random' testsuite

* test/src/fns-tests.el (ert): Require.
(fns-tests-random): Expand test.

23 months agoAdapt last change to Haiku port
Po Lu [Sun, 16 Oct 2022 06:19:12 +0000 (06:19 +0000)]
Adapt last change to Haiku port

* src/haikuterm.c (haiku_frame_up_to_date):
(haiku_clear_frame):
(haiku_update_begin):
(haiku_flush):
(haiku_flush_dirty_back_buffer_on):
(haiku_read_socket):
* src/haikuterm.h (struct haiku_output):
(FRAME_COMPLETE_P): Synchronize logic with X.

23 months ago; Improve documentation of 'C-M-i'
Eli Zaretskii [Sun, 16 Oct 2022 06:10:14 +0000 (09:10 +0300)]
; Improve documentation of 'C-M-i'

* doc/emacs/programs.texi (Symbol Completion): Remove redundant
text, rephrase, and improve indexing and markup.

23 months agoFix multiple sources of flicker under X
Po Lu [Sun, 16 Oct 2022 06:02:31 +0000 (14:02 +0800)]
Fix multiple sources of flicker under X

Fix three kinds of flicker.  The first is if you do:

  (while t (sit-for 1) (redraw-display))

and press a key, the frame will turn blank until you C-g.  The
second is where handling async input happens in the middle of
drawing and causes a buffer flip to happen.  The third is where
unmapping the hourglass window causes exposures.

* src/dispnew.c (redraw_frame): Garbage the frame if it is a
window system frame.
* src/xterm.c (x_update_begin): Clear complete flag.
(x_flip_and_flush, XTframe_up_to_date): Set complete flag.
(x_show_hourglass): Fix hourglass window class.
(flush_dirty_back_buffer_on): Rename to
x_flush_dirty_back_buffer_on.
(x_flush_dirty_back_buffer_on): Check if the frame is complete
before trying to flip.
(handle_one_xevent): Flush frames in a more detailed fashion.
* src/xterm.h (struct x_output): New flag `complete'.
(FRAME_X_COMPLETE_P): New macro.

23 months agoFix ‘make bootstrap’ when the *.m4 files change
Paul Eggert [Sat, 15 Oct 2022 18:59:11 +0000 (11:59 -0700)]
Fix ‘make bootstrap’ when the *.m4 files change

This should help avoid problems like Bug#58535.
* Makefile.in (bootstrap-clean): Also remove autom4te.cache.

23 months agoMinor Tramp fixes
Michael Albinus [Sat, 15 Oct 2022 16:21:13 +0000 (18:21 +0200)]
Minor Tramp fixes

* lisp/net/tramp-sh.el (tramp-perl-id): Fix Perl script.
(tramp-sh-handle-expand-file-name):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-expand-file-name):
Check, that there's really a Tramp file name.

23 months ago* lisp/vc/vc-git.el (vc-git-symbolic-commit): Use --no-undefined
Philip Kaludercic [Fri, 14 Oct 2022 22:06:25 +0000 (00:06 +0200)]
* lisp/vc/vc-git.el (vc-git-symbolic-commit): Use --no-undefined

23 months ago* lisp/vc/vc-git.el (vc-git-symbolic-commit): Add argument FORCE
Philip Kaludercic [Thu, 13 Oct 2022 20:29:23 +0000 (22:29 +0200)]
* lisp/vc/vc-git.el (vc-git-symbolic-commit): Add argument FORCE

(Bug#57400)

23 months ago* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits
Philip Kaludercic [Tue, 11 Oct 2022 19:11:20 +0000 (21:11 +0200)]
* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits

* lisp/vc/vc-git.el (vc-git-working-revision): Use abbreviated comment
references.  (Bug#57400)

23 months agoHandle ;;;###theme-autoload comments in etc/themes
Philip Kaludercic [Thu, 13 Oct 2022 08:43:36 +0000 (10:43 +0200)]
Handle ;;;###theme-autoload comments in etc/themes

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--emacs-batch):
Extract the autoloads and have them loaded along with loaddefs.el.
* etc/NEWS: Mention the new feature.  (Bug#57639)

23 months agoTag themes with properties
Philip Kaludercic [Sat, 17 Sep 2022 18:11:42 +0000 (20:11 +0200)]
Tag themes with properties

* doc/emacs/custom.texi (Custom Themes): Document 'theme-choose-variant'.
* doc/lispref/customize.texi (Custom Themes): Document the new
optional argument to 'deftheme'.
(Autoload): Mention that 'deftheme' is not copied verbatim.
* etc/themes/adwaita-theme.el (adwaita): Add properties.
* etc/themes/deeper-blue-theme.el (deeper-blue): Add properties.
* etc/themes/dichromacy-theme.el (dichromacy): Add properties.
* etc/themes/light-blue-theme.el (light-blue): Add properties.
* etc/themes/manoj-dark-theme.el (manoj-dark): Add properties.
* etc/themes/misterioso-theme.el (misterioso): Add properties.
* etc/themes/tango-dark-theme.el (tango-dark): Add properties.
* etc/themes/tango-theme.el (tango): Add properties.
* etc/themes/tsdh-dark-theme.el (tsdh-dark): Add properties.
* etc/themes/tsdh-light-theme.el (tsdh-light): Add properties.
* etc/themes/wheatgrass-theme.el (wheatgrass): Add properties.
* etc/themes/whiteboard-theme.el (whiteboard): Add properties.
* etc/themes/wombat-theme.el (wombat): Add properties.
* etc/themes/modus-operandi-theme.el: Add properties.
* etc/themes/modus-vivendi-theme.el: Add properties.
* etc/themes/leuven-dark-theme.el (leuven-dark): Add properties.
* etc/themes/leuven-theme.el (leuven): Add properties.
* lisp/custom.el (deftheme): Allow for optional arguments to set the
property list.
(custom-declare-theme): Accept the same optional arguments as 'deftheme'.
(theme-list-variants): Add new function.
(theme-choose-variant): Add new command for switching between members
of a theme family.
(toggle-theme): Add an alias for 'theme-choose-variant'.
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload):
Handle 'defcustom's by extracting the properties.  (Bug#57639)

23 months ago; Fix message-server-alist :type (Bug#58546)
Mauro Aranda [Sat, 15 Oct 2022 13:56:43 +0000 (10:56 -0300)]
; Fix message-server-alist :type (Bug#58546)

23 months ago; Improve message text in xref.el
Eli Zaretskii [Sat, 15 Oct 2022 11:43:21 +0000 (14:43 +0300)]
; Improve message text in xref.el

* lisp/progmodes/xref.el (xref--query-replace-1): Improve text of
user-error.

23 months agoAdd no-byte-compile to the ".dir-locals.el" auto-insert template
Stefan Kangas [Sat, 15 Oct 2022 11:07:29 +0000 (13:07 +0200)]
Add no-byte-compile to the ".dir-locals.el" auto-insert template

* lisp/autoinsert.el (auto-insert-alist): Add the no-byte-compile
cookie to the ".dir-locals.el" template.

23 months ago; Prefer HTTPS to HTTP in many URLs
Stefan Kangas [Sat, 15 Oct 2022 09:17:51 +0000 (11:17 +0200)]
; Prefer HTTPS to HTTP in many URLs

23 months ago; Delete commented out reference to ancient org-mode
Stefan Kangas [Sat, 15 Oct 2022 10:32:11 +0000 (12:32 +0200)]
; Delete commented out reference to ancient org-mode

* doc/misc/remember.texi (Org): Delete commented out reference to an
ancient version of org-mode.

23 months agoDelete broken link to Network Theory Ltd.
Stefan Kangas [Sat, 15 Oct 2022 08:52:13 +0000 (10:52 +0200)]
Delete broken link to Network Theory Ltd.

Sadly, their website has been down for several months already.
I was unable to find a new link, but it seems like they haven't
published anything new for over a decade.
* doc/misc/org.org (Summary): Remove broken link to Network Theory Ltd.

23 months agoFix encoding and decoding of process I/O in Eshell on Windows
Eli Zaretskii [Sat, 15 Oct 2022 10:59:49 +0000 (13:59 +0300)]
Fix encoding and decoding of process I/O in Eshell on Windows

* lisp/eshell/esh-proc.el (eshell-gather-process-output): Set up
encoding and decoding of text to/from the subprocess for
MS-Windows.  (Bug#58281)

23 months ago; Fix documentation of ecomplete
Eli Zaretskii [Sat, 15 Oct 2022 09:52:49 +0000 (12:52 +0300)]
; Fix documentation of ecomplete

* lisp/ecomplete.el (ecomplete-sort-predicate)
(ecomplete-filter-regexp, ecomplete-edit, ecomplete-remove): Doc
fixes.

* etc/NEWS: Fix wording of the 'ecomplete-filter-regexp' entry.

23 months ago; Fix documentation of 'comp-enable-subr-trampolines'
Eli Zaretskii [Sat, 15 Oct 2022 09:15:17 +0000 (12:15 +0300)]
; Fix documentation of 'comp-enable-subr-trampolines'

* src/comp.c (syms_of_comp) <comp-enable-subr-trampolines>:
Explain better what it means to disable trampoline synthesis.

23 months agoRemove redundant call to expensive function XOpenDisplay
Po Lu [Sat, 15 Oct 2022 08:25:22 +0000 (16:25 +0800)]
Remove redundant call to expensive function XOpenDisplay

* src/xterm.c (x_term_init): Speed up opening Emacs over a slow
network connection by an order of magnitude on no toolkit builds
by avoiding a redundant call to XOpenDisplay.

23 months ago; Avoid incorrect indentation in an @example.
Eli Zaretskii [Sat, 15 Oct 2022 07:44:12 +0000 (10:44 +0300)]
; Avoid incorrect indentation in an @example.

* doc/lispref/modes.texi (Search-based Fontification): Avoid
incorrect indentation in an @example.  Reported by Akib Azmain
Turja <akib@disroot.org>.

23 months agoFix XDS file name expansion
Po Lu [Sat, 15 Oct 2022 05:27:05 +0000 (13:27 +0800)]
Fix XDS file name expansion

* lisp/x-dnd.el (x-dnd-handle-xds-drop): Expand file names
again.  That code was mistakenly removed.

23 months ago; improve test coverage of time-stamp-pattern parsing
Stephen Gildea [Sat, 15 Oct 2022 03:46:38 +0000 (20:46 -0700)]
; improve test coverage of time-stamp-pattern parsing

* test/lisp/time-stamp-tests.el (time-stamp-test-pattern-multiply,
time-stamp-test-pattern-sequential): broaden range of test data

23 months ago; Auto-commit of loaddefs files.
Stefan Kangas [Sat, 15 Oct 2022 03:07:35 +0000 (05:07 +0200)]
; Auto-commit of loaddefs files.

23 months agoUse file-size-human-readable in memory-report--format
Stefan Kangas [Sat, 15 Oct 2022 01:02:17 +0000 (03:02 +0200)]
Use file-size-human-readable in memory-report--format

* lisp/emacs-lisp/memory-report.el (memory-report--format): Use
file-size-human-readable.

23 months agoUpdate image-circular-tests.el
Basil L. Contovounesios [Mon, 3 Oct 2022 20:34:07 +0000 (23:34 +0300)]
Update image-circular-tests.el

* test/manual/image-circular-tests.el
(image-test-duplicate-keywords): Skip unless images are supported.
(image-test-circular-plist, image-test-:type-property-value): Ditto.
Wrap only failing forms in should[-error] rather than entire test
bodies.  Use simpler printed notation in place of function calls.
(image-test-circular-specs): Ditto.  Wrap overly wide docstring.
Mark as failing since shortly after its introduction (bug#36403#63).

23 months agoRename `file-attribute-file-number' to `file-attribute-file-identifier'
Michael Albinus [Fri, 14 Oct 2022 19:32:15 +0000 (21:32 +0200)]
Rename `file-attribute-file-number' to `file-attribute-file-identifier'

* doc/lispref/files.texi (File Attributes):
* etc/NEWS:
* lisp/files.el (find-buffer-visiting, find-file-noselect)
(set-visited-file-name, basic-save-buffer)
(file-attribute-file-identifier):
* lisp/startup.el (normal-top-level-add-subdirs-to-load-path):
* lisp/eshell/em-unix.el (eshell-shuffle-files):
* src/dired.c (Ffile_attributes):
Rename `file-attribute-file-number' to `file-attribute-file-identifier'.

23 months agoDocument how to control where the *.eln files are written
Eli Zaretskii [Fri, 14 Oct 2022 18:57:18 +0000 (21:57 +0300)]
Document how to control where the *.eln files are written

* doc/lispref/compile.texi (Native Compilation): Document the
trick of pointing $HOME to a non-existent directory.
(Native-Compilation Variables): Document the role of
'native-comp-eln-load-path' in determining where *.eln files are
written.

23 months agoCorrectly fontify C++'s operator"" _tag (...)
Alan Mackenzie [Fri, 14 Oct 2022 17:40:26 +0000 (17:40 +0000)]
Correctly fontify C++'s operator"" _tag (...)

Give both the "" and _tag font-lock-function-name-face.  Also correct the
fontification of an inherited class name when there is an attribute between
the class name being declared and the colon introducing the inheritance.

* lisp/progmodes/cc-engine.el (c-forward-over-colon-type-list): New function.
(c-forward-keyword-clause): Use the above new function instead of a
looking-at.
(c-forward-name, c-forward-declarator): Accept both the "" and the tag as part
of the name.

* lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Fontify the "" (which
already has font-lock-string-face) and the tag with
font-lock-function-name-face.

* lisp/progmodes/cc-langs.el (c-overloadable-operators): Add "" to this list.
(c-sub-colon-type-list-re): New lang-const and lang-var.

23 months agoAdd a quick-help menu
Philip Kaludercic [Sat, 17 Sep 2022 14:52:01 +0000 (16:52 +0200)]
Add a quick-help menu

* lisp/help.el (help-map): Bind 'help-quit-or-quick' instead of 'help-quit'.
(help-quick-sections): Add variable.
(help-quick): Add main command.
(cheat-sheet): Add alias for 'help-quick'.
(help-quit-or-quick): Add auxiliary command.
lisp/help.el (help-for-help):  Mention 'help-quit-or-quick'.
* etc/NEWS (https): Mention 'help-quit'.

23 months ago* lisp/net/rcirc.el (rcirc-bridged-nick): Inherit from highlight
Philip Kaludercic [Fri, 14 Oct 2022 07:39:45 +0000 (09:39 +0200)]
* lisp/net/rcirc.el (rcirc-bridged-nick): Inherit from highlight

23 months agoAllow filtering what items are added to Ecomplete
Philip Kaludercic [Thu, 13 Oct 2022 10:02:02 +0000 (12:02 +0200)]
Allow filtering what items are added to Ecomplete

* etc/NEWS: Mention new option.
* lisp/ecomplete.el (ecomplete-filter-regexp): Add new option.
(ecomplete-add-item): Respect new option.  (bug#58487)

23 months agoPrevent .dir-locals.el from being byte-compiled
Philip Kaludercic [Wed, 5 Oct 2022 17:45:27 +0000 (19:45 +0200)]
Prevent .dir-locals.el from being byte-compiled

* lisp/files-x.el (modify-dir-local-variable): Add a 'no-byte-compile'
file local variable when generating a .dir-locals.el
file.
* .dir-locals.el:  Add 'no-byte-compile'.  (Bug#58486)

23 months ago* lisp/net/rcirc.el (rcirc-generate-log-filename): Append ".log"
Philip Kaludercic [Thu, 6 Oct 2022 12:03:04 +0000 (14:03 +0200)]
* lisp/net/rcirc.el (rcirc-generate-log-filename): Append ".log"

(Bug#54718)

23 months ago; * lisp/vc/vc.el (vc-default-prepare-patch): Add missing argument
Philip Kaludercic [Tue, 11 Oct 2022 19:23:26 +0000 (21:23 +0200)]
; * lisp/vc/vc.el (vc-default-prepare-patch): Add missing argument

23 months agoPrepare all inline patches at once
Philip Kaludercic [Tue, 11 Oct 2022 18:46:15 +0000 (20:46 +0200)]
Prepare all inline patches at once

* lisp/vc/vc.el (vc-prepare-patch): Remove the usage of
'recursive-edit' when 'vc-prepare-patches-separately' is non-nil.

23 months agoAllow reordering commits in 'vc-prepare-patch' prompt
Philip Kaludercic [Tue, 11 Oct 2022 18:43:40 +0000 (20:43 +0200)]
Allow reordering commits in 'vc-prepare-patch' prompt

* lisp/vc/vc.el (vc-prepare-patch): Use marked log-view commits as
initial input.

23 months agoMention that vc-prepare-patch can interact with a log-view
Philip Kaludercic [Tue, 11 Oct 2022 16:09:58 +0000 (18:09 +0200)]
Mention that vc-prepare-patch can interact with a log-view

; * doc/emacs/vc1-xtra.texi (Preparing Patches): Extend documentation.

23 months ago* lisp/play/zone.el (zone): Allow selecting a program
Philip Kaludercic [Tue, 11 Oct 2022 10:28:45 +0000 (12:28 +0200)]
* lisp/play/zone.el (zone): Allow selecting a program

23 months agoAdd cross-reference to alternative syntaxes for Unicode
Robert Pluim [Fri, 14 Oct 2022 15:12:02 +0000 (17:12 +0200)]
Add cross-reference to alternative syntaxes for Unicode

These alternative syntaxes allow you to specify Unicode codepoints
using only ASCII, which helps avoid decoding issues.

* doc/emacs/custom.texi (Init Non-ASCII): Add cross reference to
"General Escape Syntax" in the Emacs Lisp Reference Manual.

23 months agoDo perl documentation lookups case-insensitively, like man
Reuben Thomas [Fri, 14 Oct 2022 11:30:43 +0000 (13:30 +0200)]
Do perl documentation lookups case-insensitively, like man

* lisp/progmodes/cperl-mode.el (cperl-perldoc): add -i to the perldoc
command.

23 months agoFix bug#56153
Po Lu [Fri, 14 Oct 2022 11:04:44 +0000 (19:04 +0800)]
Fix bug#56153

* src/nsterm.m (get_keysym_name)
(ns_draw_glyphless_glyph_string_foreground): Fix new Mac OS
deprecations.

([EmacsApp terminate:]): Use kbd_buffer_store_event instead
of emacs_event.  (bug#56153)
([EmacsView windowDidChangeBackingProperties:]): Fix new Mac
OS deprecation.

23 months agoAvoid redundant creation of XRender pictures
Po Lu [Fri, 14 Oct 2022 07:52:16 +0000 (15:52 +0800)]
Avoid redundant creation of XRender pictures

* src/xterm.c (x_composite_image): Take arg DESTINATION.  Do not
create a picture if it is set.
(x_draw_image_foreground, x_draw_image_foreground_1): Pass
destination where appropriate.

23 months ago; Fix recent change in documentation of "device number"
Eli Zaretskii [Fri, 14 Oct 2022 07:12:03 +0000 (10:12 +0300)]
; Fix recent change in documentation of "device number"

* src/dired.c (Ffile_attributes):
* lisp/files.el (buffer-file-number, file-attribute-file-number):
Fix wording of the doc strings.

* etc/NEWS:
* doc/lispref/buffers.texi (Buffer File Name):
* doc/lispref/files.texi (File Attributes): Fix a typo and
wording.  (Bug#58446)

23 months agoMerge from origin/emacs-28
Stefan Kangas [Fri, 14 Oct 2022 04:31:49 +0000 (06:31 +0200)]
Merge from origin/emacs-28

85e47d9a9e ; Continued cleanup of "-hooks"

23 months agoClarify structure of file-attribute's device number
Michael Albinus [Thu, 13 Oct 2022 19:13:45 +0000 (21:13 +0200)]
Clarify structure of file-attribute's device number

* doc/lispref/buffers.texi (Buffer File Name): Fix description of
buffer-file-number.

* doc/lispref/files.texi (File Attributes): Clarify type of device
number.  Describe file-attribute-file-number.  (Bug#58446)

* etc/NEWS: Mention file-attribute-file-number.

* lisp/files.el (buffer-file-number, file-attribute-device-number)
(file-attribute-collect): Fix docstring.
(file-attribute-file-number): New defsubst.
(find-buffer-visiting, find-file-noselect)
(set-visited-file-name, basic-save-buffer):
* lisp/startup.el (normal-top-level-add-subdirs-to-load-path):
* lisp/eshell/em-unix.el (eshell-shuffle-files): Use it.

* src/dired.c (Ffile_attributes): Fix docstring.

23 months ago; Continued cleanup of "-hooks"
Bill Wohler [Thu, 13 Oct 2022 16:49:55 +0000 (09:49 -0700)]
; Continued cleanup of "-hooks"

* doc/misc/mh-e.texi: Replace mh-kill-folder-suppress-prompt-hook with
mh-kill-folder-suppress-prompt-functions.