1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00
Commit Graph

161455 Commits

Author SHA1 Message Date
Wamm K. D
c6ec08e49a Allow Hierarchy to delay computation of children
This adds an option to allow callers to specify that computing
the children of the hierarchy should be delayed to when the
user calls for them, by utilizing the tree-widget :expander
property.
* lisp/emacs-lisp/hierarchy.el (hierarchy-add-tree)
(hierarchy-add-trees): Add parameter 'delay-children-p'.
* lisp/emacs-lisp/hierarchy.el
(hierarchy--create-delayed-tree-widget): Add function.
* lisp/emacs-lisp/hierarchy.el (hierarchy-convert-to-tree-widget):
Utilize ':expander' if delaying children.  (Bug#55900)

* test/lisp/emacs-lisp/hierarchy-tests.el: Add tests for
delayed-children functionality.
2022-10-27 20:12:24 +03:00
Eli Zaretskii
d53febbd21 ; * lisp/subr.el (keyboard-translate): Doc fix. (Bug#58805) 2022-10-27 19:57:33 +03:00
kobarity
7ac3d91eb2 Disable completion/ElDoc/FFAP when Python program is running
* lisp/progmodes/python.el (python-completion-at-point)
(python-ffap-module-path, python-eldoc--get-doc-at-point): Add check
using `python-util-comint-end-of-output-p'.
(python-util-comint-end-of-output-p): New function.
* test/lisp/progmodes/python-tests.el (python-tests-shell-wait-for-prompt):
Use `python-util-comint-end-of-output-p'.
(python-completion-at-point-while-running-1)
(python-ffap-module-path-1)
(python-ffap-module-path-while-running-1)
(python-eldoc--get-doc-at-point-1)
(python-eldoc--get-doc-at-point-while-running-1): New tests.
(Bug#58713)
2022-10-27 19:04:14 +03:00
Eli Zaretskii
d820c39bd1 ; (rmail-summary-apply-filters-consecutively): Add :version. 2022-10-27 18:45:28 +03:00
Andrea Monaco
8728da58ab Allow applying Rmail summary filters consecutively
* lisp/mail/rmailsum.el (rmail-summary-currently-displayed-msgs):
New variable.
(rmail-summary-apply-filters-consecutively): New user option.
(rmail-summary-fill-displayed-messages, rmail-summary-negate): New
functions.
(rmail-summary-by-labels, rmail-summary-by-recipients)
(rmail-summary-by-regexp, rmail-summary-by-topic)
(rmail-summary-by-senders): Obey
'rmail-summary-apply-filters-consecutively'.
KEEP-FILTERING, to narrow the existing filtered summary.

* etc/NEWS: Announce the change.
2022-10-27 17:25:16 +03:00
Eli Zaretskii
582eaadde7 Revert "Allow applying filters to summary consecutively"
This reverts commit c8b9ba5fa1.
2022-10-27 17:15:51 +03:00
Andrea Monaco
c8b9ba5fa1 Allow applying filters to summary consecutively
* lisp/mail/rmailsum.el (rmail-summary-currently-displayed-msgs):
New variable.
(rmail-summary-fill-displayed-messages, rmail-summary-negate): New
functions.
(rmail-summary-by-labels, rmail-summary-by-recipients)
(rmail-summary-by-regexp, rmail-summary-by-topic)
(rmail-summary-by-senders): Accept an additional argument
KEEP-FILTERING, to narrow the existing filtered summary.

* etc/NEWS: Announce the change.
2022-10-27 16:56:12 +03:00
Eli Zaretskii
877f706c86 ; * src/keyboard.c (command_loop_1): Remove unused variable. 2022-10-27 15:29:46 +03:00
Eli Zaretskii
93fb14d0c8 Avoid recentering when point enters invisible text at BOL
* src/xdisp.c (try_cursor_movement): Don't say we must scroll when
point is inside invisible text at beginning of a glyph row.
(Bug#58793)
2022-10-27 15:24:53 +03:00
Po Lu
af46d8a7ec Fix reporting of iconic state on old window managers
* src/xterm.c (x_handle_wm_state): Handle IconicState if the
window manager does not support _NET_WM_STATE_HIDDEN.
2022-10-27 19:15:50 +08:00
Stefan Kangas
8deb797897 ; Fix quoting of non-nil in texinfo sources 2022-10-27 13:11:47 +02:00
Stephen Leake
e16ee5fde6 Fix auto-insert-alist ada-mode entry to match current ELPA ada-mode 2022-10-27 03:29:20 -07:00
Eli Zaretskii
37bde3d36c ; Simplify wording in Eglot manual
* doc/misc/eglot.texi (Customizing Eglot): Simplify wording.
Reported by Pedro Andres Aranda Gutierrez <paaguti@gmail.com>.
2022-10-27 09:21:04 +03:00
Stefan Kangas
db2ed9f333 ; Fix several symbol name typos 2022-10-26 23:04:23 +02:00
Stefan Kangas
c716d0cf56 ; Use auto-generated docstring in gnus-custom-mode
* lisp/gnus/gnus-cus.el (gnus-custom-mode): Change docstring to prefer
text auto-generated by 'define-derived-mode' instead.
2022-10-26 23:04:23 +02:00
Stefan Kangas
4b9e2f8080 ; * lisp/textmodes/table.el: Delete reference to ancient version. 2022-10-26 23:04:18 +02:00
Stefan Kangas
d73b86a90a Fix typo in textsec-restriction-level
* lisp/international/textsec.el (textsec-restriction-level):
* test/lisp/international/textsec-tests.el (test-restriction-level):
Fix typo in symbol name `moderately-restrictive'.
2022-10-26 23:02:30 +02:00
Stefan Kangas
68548af68a Declare variable Info-minibuf-history
* lisp/info.el (Info-minibuf-history): Declare variable.
(Bug#58786)
2022-10-26 21:09:14 +02:00
Filipp Gunbin
56706c6946 Compare addresses case-insensitively in message-update-smtp-method-header
* lisp/gnus/message.el (message-update-smtp-method-header): Compare
addresses case-insensitively.
2022-10-26 21:13:16 +03:00
Alan Mackenzie
b7e59b9e19 c-find-decl-spots: Replace an arbitrary search limit by a parameter
The old arbitrary limit led to errors thrown whilst fontifying large areas of
syntactic whitespace containing "#undef", as in src/comp.c.

* lisp/progmodes/cc-engine.el (c-find-decl-spots): Replace the limit argument
to two calls of c-forward-syntactic-ws by the parameter `cfd-limit'.
2022-10-26 16:02:49 +00:00
Mauro Aranda
5d46c0e329 Make completion-category-overrides choices dynamic
See https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg01969.html

* lisp/minibuffer.el (completion--update-styles-options): New internal
function.

(completion--styles-type): Use it.
2022-10-26 11:28:54 -03:00
Eli Zaretskii
d6e08ff459 Fix rare problems with current-column when text is invisible
* src/indent.c (scan_for_column, compute_motion): Don't miss
compositions when the position to check for composition happens to
be inside invisible text.  (Bug#58791)
2022-10-26 17:21:45 +03:00
Po Lu
4a1e77ced6 Prevent gui_consider_frame_title from restoring dead top frames
* src/xdisp.c (unwind_format_mode_line): Check that
old_top_frame is live before selecting it.  It could have been
deleted, which leads to signals when the post-command-hook
installed by xterm-set-window-title runs upon the last frame of
a terminal being deleted.
(gui_consider_frame_title): Rearrange code to be more
understandable.
2022-10-26 21:46:58 +08:00
Basil L. Contovounesios
38bcad5451 Pacify recent unused/ignored lexvar warnings
Lexvars with special names like 'ignored' or 'unused' are no longer
treated specially.

* lisp/ansi-color.el (ansi-color-process-output):
* lisp/cus-edit.el (customize-apropos-options):
* lisp/cus-theme.el (customize-create-theme):
* lisp/dired-aux.el (dired-hide-all):
* lisp/emacs-lisp/crm.el (crm--choose-completion-string):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-revert):
* lisp/ido.el (ido-choose-completion-string):
* lisp/international/mule-diag.el (describe-font-internal):
* lisp/mail/sendmail.el (sendmail-user-agent-compose):
* lisp/progmodes/fortran.el (fortran-uncomment-region):
* lisp/progmodes/prolog.el (prolog-inferior-guess-flavor):
* lisp/progmodes/ruby-mode.el (ruby-indent-line, ruby-indent-exp):
* lisp/url/url.el (url-mm-callback):
* lisp/xwidget.el (xwidget-webkit-history-reload): Prepend an
underscore to unused function parameter names.
* lisp/emacs-lisp/cconv.el (cconv--dummy-var): Remove unused
constant.
* lisp/files.el (hack-local-variables-filter): Remove unused lexvar.
2022-10-26 16:35:59 +03:00
Po Lu
32dd769ca4 Clean up some event handling code
* src/xterm.c (handle_one_xevent): Use dpyinfo where
FRAME_DISPLAY_INFO could be substituted for it.
2022-10-26 20:38:05 +08:00
Michael Albinus
0fbafe6511 ; Tramp copyedit 2022-10-26 13:59:37 +02:00
Michael Albinus
2468b819e2 Modernize `auto-revert-notify-exclude-dir-regexp'
* lisp/autorevert.el (auto-revert-notify-exclude-dir-regexp): Use `rx'
and `mounted-file-systems'.
2022-10-26 13:58:42 +02:00
Mattias Engdegård
e54c395982 Dynamic validation of styles in completion-category-overrides
The type of the defcustom completion-category-overrides must be able
to accommodate dynamic changes to completion-styles-alist, because
some packages (eglot) make their own additions.

This change fixes a failure in test-custom-opts.  See discussion at:
https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg01969.html

* lisp/minibuffer.el (completion--styles-type):
Add an "Other" case that accepts any symbol which is then validated
dynamically against completion-styles-alist.
2022-10-26 10:51:51 +02:00
Philip Kaludercic
0367208e6e
Allow nil as a valid value for 'ecomplete-filter-regexp'
* lisp/ecomplete.el (ecomplete-filter-regexp): Replace user option type.

Reported by Mattias Engdegård.
2022-10-26 09:33:48 +02:00
Po Lu
832bd2dfe5 Fix Haiku build for recent changes to system headers
* src/callproc.c (emacs_posix_spawn_init_actions): Do not use
posix_spawn_file_actions_addchdir on Haiku; it links but does
not work.
2022-10-26 15:00:35 +08:00
Andrea Corallo
5ad5b797f7 Set `comp-no-spawn' earlier using -no-comp-spawn
* src/emacs.c (standard_args): Add '-no-comp-spawn' cmd line option.
* lisp/startup.el (command-line): Parse '-no-comp-spawn' cmd line
option.
* lisp/emacs-lisp/comp.el (comp-run-async-workers, comp-final):
Use '-no-comp-spawn'.
2022-10-26 08:30:09 +02:00
Dmitry Gutov
d062482c3f vc-hg-checkin-patch: Add implementation for Hg
* lisp/vc/vc-hg.el (vc-hg-checkin-patch): Add Hg-specific
implementation (bug#52349), like suggested in
https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg01533.html.
(vc-hg--extract-headers): Extract from vc-hg-checkin.
2022-10-26 00:09:29 +03:00
Andreas Schwab
33647b6d63 Ignore non-base64 junk when decoding MIME
* src/fns.c (Fbase64_decode_region): Add optional argument
IGNORE-INVALID and pass down to base64_decode_1.
(Fbase64_decode_string): Likewise.
(base64_decode_1): Add argument IGNORE_INVALID.
* doc/lispref/text.texi (Base 64): Document them.
* lisp/gnus/mm-bodies.el (mm-decode-content-transfer-encoding):
Ignore any junk when decoding base64.
2022-10-25 21:47:18 +02:00
João Guerra
e5cb66c046 * lisp/tab-line.el (tab-line-auto-hscroll): Set word-wrap to nil (bug#58740).
Copyright-paperwork-exempt: yes
2022-10-25 21:49:39 +03:00
Stefan Monnier
1b1ffe0789 (Ffunction): Make interpreted closures safe for space
Interpreted closures currently just grab a reference to the complete
lexical environment, so (lambda (x) (+ x y)) can end up looking like

    (closure ((foo ...) (y 7) (bar ...) ...)
             (x) (+ x y))

where the foo/bar/... bindings are not only useless but can prevent
the GC from collecting that memory (i.e. it's a representation that is
not "safe for space") and it can also make that closure "unwritable"
(or more specifically, it can cause the closure's print
representation to be u`read`able).

Compiled closures don't suffer from this problem because `cconv.el`
actually looks at the code and only stores in the compiled closure
those variables which are actually used.

So, we fix this discrepancy by letting the existing code in `cconv.el` tell
`Ffunction` which variables are actually used by the body of the
function such that it can filter out the irrelevant elements and
return a closure of the form:

    (closure ((y 7)) (x) (+ x y))

* lisp/loadup.el: Preload `cconv` and set
`internal-filter-closure-env-function` once we have a usable `cconv-fv`.

* lisp/emacs-lisp/bytecomp.el (byte-compile-preprocess): Adjust to new
calling convention of `cconv-closure-convert`.
(byte-compile-not-lexical-var-p): Delete function, moved to `cconv.el`.
(byte-compile-bind): Use `cconv--not-lexical-var-p`.

* lisp/emacs-lisp/cconv.el (cconv--dynbound-variables): New var.
(cconv-closure-convert): New arg `dynbound-vars`
(cconv--warn-unused-msg): Remove special case for `ignored`,
so we don't get confused when a function uses an argument called
`ignored`, e.g. holding a list of things that it should ignore.
(cconv--not-lexical-var-p): New function, moved from `bytecomp.el`.
Don't special case keywords and `nil` and `t` since they are already
`special-variable-p`.
(cconv--analyze-function): Use `cconv--not-lexical-var-p`.
(cconv--dynbindings): New dynbound var.
(cconv-analyze-form): Use `cconv--not-lexical-var-p`.
Remember in `cconv--dynbindings` the vars for which we used
dynamic scoping.
(cconv-analyze-form): Use `cconv--dynbound-variables` rather than
`byte-compile-bound-variables`.
(cconv-fv): New function.

* src/eval.c (Fsetq, eval_sub): Remove optimization designed when
`lexical-binding == nil` was the common case.
(Ffunction): Use `internal-filter-closure-env-function` when available.
(eval_sub, Ffuncall): Improve error info for `excessive_lisp_nesting`.
(internal-filter-closure-env-function): New defvar.
2022-10-25 14:24:54 -04:00
Filipp Gunbin
7e60246ab3 Move required options out of ldap-ldapsearch-args
* lisp/net/ldap.el (ldap-ldapsearch-args, ldap-search-internal): Move
"-LLL" and "-tt" options as they're required for the code to work
properly.
2022-10-25 18:00:54 +03:00
Stefan Kangas
c8fe6aae0a eglot: Prefer ensure-list on Emacs 28 or later
* lisp/progmodes/eglot.el (eglot--ensure-list): Make into alias
for 'ensure-list' on Emacs 28 or later.
2022-10-25 16:42:58 +02:00
Michael Albinus
fe816fc679 Handle context changes in Tramp kubernetes method
* doc/misc/tramp.texi (Inline methods): Remove note about cache reset.
(File name completion): Add tramp-completion-use-cache.

* etc/NEWS: Add 'tramp-completion-use-cache'.

* lisp/net/tramp-cache.el (tramp-completion-use-cache): New defcustom.
(tramp-parse-connection-properties): Use it.

* lisp/net/tramp-container.el (tramp-docker--completion-function)
(tramp-kubernetes--completion-function): Ensure the processes run
locally.
(tramp-kubernetes--current-context-data): New defun.
(tramp-methods) <kubernetes>: Add `tramp-config-check'.

* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Handle `tramp-login-args'.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
2022-10-25 16:34:42 +02:00
Robert Pluim
8c3b8c3667 Fix eglot defcustom types
* lisp/progmodes/eglot.el (eglot-autoreconnect): Allow for 'nil'.
(eglot-connect-timeout): Allow for 'nil' and add descriptions.
(eglot-sync-connect): Split boolean into 'nil' and 't' and add descriptions.
(eglot-confirm-server-initiated-edits): Change 'symbol' type to 'const'.
2022-10-25 16:22:07 +02:00
Alan Mackenzie
1e1be54156 Test face name variables are bound before using them in cc-fonts.el
This fixes bug #58641.

Also, set c-reference-face-name to font-lock-constant face in preference to
c-label-face-name.

* lisp/progmodes/cc-fonts.el (c-preprocessor-face-name, c-label-face-name)
(c-constant-face-name, c-reference-face-name): Test variables with the same
name as font-lock faces are bound before accessing their values.
(c-reference-face-name): Use font-lock-constant face in preference to
c-label-face-name.
2022-10-25 13:30:45 +00:00
Robert Pluim
5b90a718ee * lisp/progmodes/eglot.el: Remove not very funny joke. 2022-10-25 15:16:55 +02:00
Eli Zaretskii
92ec31a48c Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-10-25 14:59:39 +03:00
Lin Sun
095dadf277 lisp.h: Remove unnecessary preprocessor conditions
This removes the HAVE_PDUMPER || HAVE_UNEXEC condition
of gflags.will_dump_, which gets in the way when Emacs
is built without any dumping method.  (Bug#58708)
2022-10-25 14:53:01 +03:00
Po Lu
b6097fe279 Fix drag-and-drop bugs on Lucid build
Also, optimize Fx_translate_coordinates to avoid excessive calls
to _XReply.

* lisp/x-dnd.el (x-dnd-get-drop-rectangle): Return empty drop
rectangle if posn-area.
* src/xfns.c (Fx_translate_coordinates): Accept arg
`require_child'.  If not set, allow optimizations based on
cached position data.
* src/xselect.c (x_handle_dnd_message): Use
x_translate_coordinates.
* src/xterm.c (x_translate_coordinates): Export function.
(x_handle_translate_coordinates): New function.
(handle_one_xevent): Fix coding style.
* src/xterm.h: Update prototypes.
2022-10-25 19:51:08 +08:00
Brian Leung
bb95e597a9 eglot-server-programs: Account for new ts-mode
At the time of writing, this exists only in the unmerged tree-sitter
branch.  It is not harmful to include, however.

* lisp/progmodes/eglot.el (eglot-server-programs): Add new major mode
to be used with the typescript-language-server.  (Bug#58769)
2022-10-25 12:13:25 +02:00
Brian Leung
566e410287 eglot-server-programs: Account for new js-json-mode
js-json-mode derives from js-mode, so this reordering is necessary to
prevent js-mode's eglot server from starting if a user has something
like this in their config:

    (add-to-hook 'js-json-mode #'eglot-ensure)
    (add-to-hook 'js-mode #'eglot-ensure)

* lisp/progmodes/eglot.el (eglot-server-programs): Move the
json-language-server info before the entry for js-mode, and add on
js-json-mode.  (Bug#58769)
2022-10-25 12:13:25 +02:00
Robert Pluim
72a94f91fd Improve the eglot info documentation
* doc/misc/eglot.texi (Eglot and Buffers): Improve phrasing.
(Eglot Commands): 'reference of' -> 'reference for' and a typo fix.
(Eglot Variables): Add markup for values.
(Customizing Eglot): Grammar fixes.
(Troubleshooting Eglot): Improve text.
2022-10-25 11:38:23 +02:00
João Távora
0b1eda215d Fix M-x eglot breakage due to typo
* lisp/progmodes/eglot.el (eglot): Fix bug.
2022-10-25 10:34:08 +01:00
Stephen Leake
31945b6c3f * lisp/progmodes/eglot.el (eglot): Ensure managed-major-mode is a list 2022-10-25 02:15:13 -07:00
Stefan Monnier
9bfe00dda6 * lisp/progmodes/compile.el (compilation-mode-line-errors): Use defvar
This is not really a constant, e.g. it's modified in `grep.el`.
2022-10-24 14:25:02 -04:00