1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 15:00:45 -08:00
Commit graph

161950 commits

Author SHA1 Message Date
F. Jason Park
2cf9e699ef Make auth-source-pass behave more like other backends
* lisp/auth-source-pass.el (auth-source-pass-extra-query-keywords): Add
new option to bring search behavior more in line with other backends.
(auth-source-pass-search): Add new keyword params `max' and `require'
and consider new option `auth-source-pass-extra-query-keywords' for
dispatch.
(auth-source-pass--match-regexp, auth-source-pass--retrieve-parsed,
auth-source-pass--match-parts): Add supporting variable and helpers.
(auth-source-pass--build-result-many,
auth-source-pass--find-match-many): Add "-many" variants for existing
workhorse functions.
* test/lisp/auth-source-pass-tests.el: Require `ert-x'.
(auth-source-pass-can-start-from-auth-source-search): Ensure
`auth-source-pass-extra-query-keywords' is enabled around test body.
(auth-source-pass-extra-query-keywords--wild-port-miss-netrc,
auth-source-pass-extra-query-keywords--wild-port-miss,
auth-source-pass-extra-query-keywords--wild-port-hit-netrc,
auth-source-pass-extra-query-keywords--wild-port-hit,
auth-source-pass-extra-query-keywords--wild-port-req-miss-netrc,
auth-source-pass-extra-query-keywords--wild-port-req-miss,
auth-source-pass-extra-query-keywords--netrc-akib,
auth-source-pass-extra-query-keywords--akib,
auth-source-pass-extra-query-keywords--netrc-host,
auth-source-pass-extra-query-keywords--host,
auth-source-pass-extra-query-keywords--baseline,
auth-source-pass-extra-query-keywords--port-type,
auth-source-pass-extra-query-keywords--hosts-first,
auth-source-pass-extra-query-keywords--ambiguous-user-host,
auth-source-pass-extra-query-keywords--suffixed-user,
auth-source-pass-extra-query-keywords--user-priorities): Add
juxtaposed netrc and extra-query-keywords pairs to demo optional
extra-compliant behavior.
* doc/misc/auth.texi: Add option
`auth-source-pass-extra-query-keywords' to auth-source-pass section.
* etc/NEWS: Mention `auth-source-pass-extra-query-keywords' in Emacs
29.1 package changes section.  (Bug#58985.)

Special thanks to Akib Azmain Turja <akib@disroot.org> for helping
improve this patch.
2022-11-16 21:34:36 -08:00
Jim Porter
0147e1ed83 Enable/disable 'server-mode' when starting/stopping the server
* lisp/server.el (server-mode-map): New keymap...
(server-mode): ... use it.
(server-start): Update the 'server-mode' variable (and sync to
'global-minor-modes') when starting/stopping the server.

* test/lisp/server-tests.el: New file (bug#58909).
2022-11-16 21:15:19 -08:00
Karl Fogel
7781121c44 Fix two typos in a doc string 2022-11-16 20:34:28 -06:00
Juanma Barranquero
999027888c ; * src/comp.c (Fnative_elisp_load): Fix typo in docstring 2022-11-17 03:15:59 +01:00
Thomas Fitzsimmons
17075a975f EUDC: Fix eudc-capf-message-expand-name nil result
* lisp/net/eudc-capf.el (eudc-capf-message-expand-name): Return
nil if EUDC query returns no results.  (Bug#59314)
2022-11-16 20:29:26 -05:00
Stefan Monnier
f696d27d1c * src/itree.c: Use more uniform names starting with itree_
(struct itree_stack, itree_stack_create, itree_stack_destroy)
(itree_stack_clear, itree_stack_push_flagged, interval_stack_push)
(itree_stack_pop): Rename from `interval_stack*`.
(itree_max_height, itree_update_limit, itree_inherit_offset)
(itree_propagate_limit, itree_validate, itree_init)
(itree_rotate_left, itree_rotate_right, itree_insert_fix)
(itree_contains, itree_subtree_min, itree_remove_fix)
(itree_replace_child, itree_transplant): Rename from `interval_tree_*`.
(itree_insert_node): Rename from `interval_tree_insert`.
(itree_node_intersects): Rename from `interval_node_insert`.
2022-11-16 16:35:10 -05:00
Stephen Leake
1772d88c1f Call xref--analyze with correct project
* lisp/progmodes/xref.el (xref-show-definitions-buffer-at-bottom):
Call xref--analyze with correct project.
2022-11-16 09:52:09 -08:00
Gabriel do Nascimento Ribeiro
f793add175 Add flat-button to docstring of 'set-face-attribute'
* lisp/faces.el (set-face-attribute): Add 'flat-button' to
COLOR and STYLE sections of docstring.  (Bug#59266)
2022-11-16 16:43:05 +02:00
Eli Zaretskii
0a26b26217 Reduce buffer-tests noisiness even more
* test/src/buffer-tests.el (test-kill-buffer-auto-save-default)
(test-kill-buffer-auto-save-delete-yes)
(test-kill-buffer-auto-save-delete-no)
(test-buffer-modifications, test-restore-buffer-modified-p): Shut
up auto-save messages.  (Bug#59028)
2022-11-16 16:37:23 +02:00
Matt Armstrong
aee4d67b09 Reduce buffer-tests noisiness when run in batch mode.
* test/src/buffer-tests.el (overlay-modification-hooks): Remove noisy
`message' calls and use `ert-info' to log context of test
failures.  (bug#59028)
(overlay-tests-start-recording-modification-hooks): ditto.
2022-11-16 16:34:31 +02:00
Eli Zaretskii
4cf97969e6 ; * lisp/apropos.el (apropos): Doc fix. (Bug#59248) 2022-11-16 16:13:45 +02:00
Philip Kaludercic
277504584d Set vc-prepare-patches-separately to nil in .dir-locals.el
* .dir-locals.el (c-mode): Set 'vc-prepare-patches-separately'.

See https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg00973.html.
2022-11-16 09:17:04 +01:00
Stefan Kangas
60f2bb862f Merge from origin/emacs-28
56026242e4 Explain how to bind keys to non-ASCII sequences
7d592db0ab Document that 'transient-mark-mode' is off in batch mode

# Conflicts:
#	doc/emacs/custom.texi
#	doc/emacs/mark.texi
2022-11-16 08:41:29 +01:00
Po Lu
690f7ac86a Fix calculation of tab bar lines during automatic height adjustment
* src/haikufns.c (haiku_change_tab_bar_height):
* src/nsfns.m (ns_change_tab_bar_height):
* src/pgtkfns.c (pgtk_change_tab_bar_height):
* src/w32fns.c (w32_change_tab_bar_height):
* src/xfns.c (x_change_tab_bar_height): Do not round tab bar
height up.  (bug#59285, bug#59271)
2022-11-16 11:19:20 +08:00
Po Lu
0600065ff2 Fix error trapping in x_focus_frame
* src/xterm.c (x_focus_frame): Improve commentary.  Dno not trap
errors around x_get_server_time.
2022-11-16 10:37:14 +08:00
Juanma Barranquero
d2ba4538cb ; * lisp/subr.el (match-buffers): Fix typo 2022-11-15 23:07:55 +01:00
Juri Linkov
125b5684c3 New command 'project-list-buffers' bound to 'C-x p C-b' (bug#59153)
* doc/emacs/maintaining.texi (Project Buffer Commands):
Add 'project-list-buffers'.

* lisp/buff-menu.el (Buffer-menu-filter-predicate): New defvar-local.
(list-buffers-noselect): Add new optional arg 'filter-predicate'.
Set 'Buffer-menu-filter-predicate' to 'filter-predicate'.
(list-buffers--refresh): Use 'Buffer-menu-filter-predicate'.

* lisp/progmodes/project.el (project-prefix-map): Bind "\C-b" to
'project-list-buffers'.
(project-list-buffers): New command.
2022-11-15 20:54:39 +02:00
Eli Zaretskii
69d1278527 ; Fix some doc strings in elisp-mode.el
* lisp/progmodes/elisp-mode.el (elisp-enable-lexical-binding)
(elisp--local-variables-1, elisp--expect-function-p)
(eval-print-last-sexp, eval-last-sexp, elisp--eval-defun-1)
(eval-defun, elisp--eldoc-last-data, elisp-eldoc-funcall)
(elisp-eldoc-var-docstring)
(elisp-eldoc-var-docstring-with-value)
(elisp-get-fnsym-args-string)
(elisp--highlight-function-argument): Doc fixes.
2022-11-15 19:58:52 +02:00
Eli Zaretskii
3b137bcbe8 ; Improve doc strings in seq.el
* lisp/emacs-lisp/seq.el (seq-doseq, seq-setq, seq-elt)
(seq-length, seq-rest, seq-do, seq-mapn, seq-drop, seq-take)
(seq-drop-while, seq-take-while, seq-sort, seq-sort-by)
(seq-concatenate, seq-into, seq-filter, seq-remove)
(seq-remove-at-position, seq-every-p, seq-some, seq-find)
(seq-count, seq-contains, seq-contains-p, seq-set-equal-p)
(seq-position, seq-positions, seq-uniq, seq-mapcat)
(seq-partition, seq-union, seq-intersection, seq-difference)
(seq--count-successive, seq--elt-safe, seq-random-elt)
(seq-split, seq-keep): Doc fixes.
2022-11-15 19:36:49 +02:00
Vibhav Pant
7d5cf08de9
; .clang-format: Support macros in comp.c, align operands correctly.
* .clang-format (WhitespaceSensitiveMacros): Add comp.c macros that
stringify arguments, telling clang-format to not format them.
(AlignOperands): Set to Align, to make clang-format correctly align
multi-line expressions involving binary and ternary expressions.
(ForEachMacros): Add FOR_EACH_ALIST_VALUE.
2022-11-15 20:18:44 +05:30
Po Lu
c63d77ac6b Fix last change again
* src/frame.c (Freconsider_frame_fonts): Apply value of default
face again.  (bug#59283)
2022-11-15 21:42:59 +08:00
Po Lu
c6df541783 More fixes to last change
* lisp/dynamic-setting.el (font-setting-change-default-font):
Call `reconsider-frame-fonts'.
* src/frame.c (Freconsider_frame_fonts): New function.
(syms_of_frame): Add new function.
2022-11-15 19:48:39 +08:00
Po Lu
833e60ae1a Fix recent Cairo xsettings changes
* lisp/dynamic-setting.el (font-setting-change-default-font):
Instead of setting the font frame parameter, just clear the font
and face cache and redraw the display.  This will re-open all
fonts as well.
* src/ftcrfont.c (ftcrfont_get_default_font_options): New
function.
* src/ftfont.h: Export.
* src/xsettings.c (apply_xft_settings): Call that function to
obtain the default font settings on Cairo.  (bug#58912,
bug#59283, bug#59271)
2022-11-15 19:48:39 +08:00
Stefan Kangas
0ac626f1d4 Use substitute-command-keys for buffer-menu help
* lisp/buff-menu.el (buffer-menu--display-help): New function.
(buffer-menu, buffer-menu-other-window): Fontify key bindings
using substitute-command-keys.
(Buffer-menu-delete): Advertise key binding as 'd'.
(Buffer-menu-this-window): Advertise key binding as 'f'.
2022-11-15 08:45:02 +01:00
Stefan Kangas
222c297032 ; Auto-commit of loaddefs files. 2022-11-15 05:09:10 +01:00
Stefan Kangas
9db6da5449 Add face to key bindings suggested by M-x
* lisp/simple.el (execute-extended-command--describe-binding-msg):
Use 'help-key-binding' face for keybinding.
2022-11-15 04:19:36 +01:00
Robert Pluim
56026242e4 Explain how to bind keys to non-ASCII sequences
* doc/emacs/custom.texi (Init Rebinding): Explain how to use `kbd'
when binding keys to non-ASCII sequences.
2022-11-14 17:16:40 +01:00
Po Lu
723ceaca1d Make C-x 5 o work on GNOME Shell-like Wayland compositors
* src/pgtkterm.c (pgtk_free_frame_resources)
(fill_background_by_face)
(pgtk_draw_glyphless_glyph_string_foreground)
(pgtk_draw_window_cursor): Fix coding style.
(pgtk_focus_frame): Use gtk_window_present_with_time whenever
possible.
(key_press_event): Set the last user time.
(pgtk_display_info_for_display): New function.
(key_release_event, construct_mouse_click, button_event): Set
the last user time.
(scroll_event, pgtk_parse_color, syms_of_pgtkterm)
(pgtk_begin_cr_clip): Fix coding style.
* src/pgtkterm.h (struct pgtk_output): New field
`last_user_time'.
2022-11-14 19:06:37 +08:00
Alan Mackenzie
7e493b1773 CC Mode: Prevent over-eager recognition of a variable as a found type
This fixes bug #59233.  It occurred in the C source code fragment

    open_replies = alloca (nproviders )

, where typing a * before the closing parenthesis caused nproviders to be
prematurely recognized as a type.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): CASE 18 - set
unsafe-maybe to t, when needed.
2022-11-14 09:47:14 +00:00
Po Lu
83a497ee87 Prevent crashes upon trying to focus a child frame on click
* src/xterm.c (handle_one_xevent): Do not try to activate
override-redirect frames.  Explain why.
(x_focus_frame): Catch errors around XSetInputFocus.
2022-11-14 14:07:04 +08:00
Dmitry Gutov
c0474ca21d Hardcode "-name" instead of using find-name-arg
* lisp/progmodes/project.el (project--files-in-directory):
Hardcode "-name" instead of using find-name-arg (bug#59023).
2022-11-14 02:19:10 +02:00
Juri Linkov
9d5fc2c7eb * lisp/minibuffer.el (set-message-functions): New user option.
(set-message-function): Change the default from
'set-minibuffer-message' to 'set-message-functions'.
'set-minibuffer-message' is set as the default value
of the user option 'set-message-functions'.
(set-message-functions): New function.
(inhibit-message-regexps): New customizable variable (bug#52314).
(inhibit-message): New function.
(multi-message-timeout, multi-message-max): New defcustoms.
(multi-message-separator, multi-message-list): New variables.
(set-multi-message): New function.
2022-11-13 20:57:50 +02:00
Stefan Kangas
a5bf6fb526 Fix suggest-key-bindings displaying key as command
* lisp/simple.el (execute-extended-command--describe-binding-msg):
New function factored out from...
(execute-extended-command): ...here.  Fix bug where a key binding was
displayed as a command with 'suggest-key-bindings'.  (Bug#59247)
* test/lisp/simple-tests.el
(simple-execute-extended-command--describe-binding-msg): New test.
2022-11-13 19:46:02 +01:00
Juri Linkov
443bd35e86 * lisp/tab-bar.el: More improvements for tab-bar-auto-width (bug#59208)
(tab-bar-auto-width): Use add-face-text-property instead of propertize.
Prevent from going into infinite loops.  More optimizations.
(tab-bar-format-align-right): Use add-face-text-property, not propertize.
2022-11-13 20:16:17 +02:00
Ingo Lohmar
7d53164162 Eglot: fix null scopeUri regression in workspace/configuration
* lisp/progmodes/eglot.el (eglot-handle-request):
Commit 1a2d603bb3 changed
`eglot--uri-to-path' to return a nil uri untouched.  (Before,
`url-unhex-string' turned the parsed all-nil uri record into the empty
string.)

A nil return value must now be handled in the caller, do that for the
workspace/configuration handler to avoid an uncaught error.
2022-11-13 17:48:36 +01:00
Stefan Kangas
ae1a6b5bdf ; * lisp/simple.el (execute-extended-command): Improve comments. 2022-11-13 16:53:31 +01:00
Stefan Kangas
90a7dee79d New test for execute-extended-command helper defun
* test/lisp/simple-tests.el
(simple-execute-extended-command--shorter): New test.
2022-11-13 15:34:02 +01:00
Stefan Kangas
73c03d64ce Prefer defvar-keymap in sql.el
* lisp/progmodes/sql.el (sql-interactive-mode-map, sql-mode-map):
Prefer defvar-keymap.
2022-11-13 15:17:07 +01:00
Davide Masserut
ae9e441415 Add new Go modes to eglot-server-programs
* lisp/progmodes/eglot.el (eglot-server-programs): Add new major modes
for Go to be used with gopls.  (Bug#59245)
2022-11-13 14:40:45 +01:00
Po Lu
7a9beac461 Fix bug#59075
* src/nsimage.m (ns_can_use_native_image_api): Do not use native
image APIs for SVG images when RSVG is present.  (bug#59075)
2022-11-13 17:30:49 +08:00
Po Lu
756373a772 Fix warnings without XCB or XFixes
* src/xterm.c (x_term_init): Don't USE_SAFE_ALLOCA or call
SAFE_FREE outside of where it is actually used.  For some reason
the compiler still emitted warnings despite the ((void)
SAFE_ALLOCA (0)) statement.
2022-11-13 15:35:02 +08:00
Eli Zaretskii
695dbd3db4 ; Improve documentation of text-scale adjust commands
* lisp/face-remap.el (global-text-scale-adjust)
(text-scale-adjust): Doc fixes.  (Bug#59122)
2022-11-13 08:56:35 +02:00
Po Lu
47b377f64b Prevent non-local exits from ns-in-echo-area
* src/nsterm.m (ns_in_echo_area_1):
(ns_in_echo_area_2):
(ns_in_echo_area): New functions.
([EmacsView firstRectForCharacterRange:]): Call them instead.
(syms_of_nsterm): New defsym.
2022-11-13 09:04:25 +08:00
Michal Dubiel
9d334f558a eglot: Support signature labels without a function name
* lisp/progmodes/eglot.el (eglot--sig-info): Support signature labels
without a function name.  (Bug#58777)

Copyright-paperwork-exempt: yes
2022-11-12 22:29:42 +01:00
Morgan Smith
4ccc385ab1 vc-git: Ensure git doesn't try to colorize stashes
* lisp/vc/vc-git.el (vc-git-stash-show): Add --color=never to git
flags.  (Bug#59158)
2022-11-12 20:34:50 +01:00
Shohei YOSHIDA
d794f1d3f2 Add cperl-mode to eglot-server-programs 2022-11-12 20:33:02 +01:00
Alan Mackenzie
f8c11b5a92 .dir-locals.el (C entry). Add NO_INLINE to c-noise-macro-names 2022-11-12 15:30:38 +00:00
Po Lu
e7614cc9ac Correctly handle key map updates on Haiku
* src/haiku_support.cc (MessageReceived): Handle
B_KEY_MAP_LOADED by clearing the previous keymap.
2022-11-12 13:11:00 +00:00
Eli Zaretskii
7d592db0ab Document that 'transient-mark-mode' is off in batch mode
* doc/emacs/mark.texi (Mark, Disabled Transient Mark): Document,
belatedly, that 'transient-mark-mode' is turned on by default only
in interactive sessions.  (Bug#59201)
2022-11-12 13:10:24 +02:00
Po Lu
2bac9d4693 Handle request serial wraparound more correctly
* src/xterm.c (X_COMPARE_SERIALS): Remove macro.
(x_is_serial_more_than, x_is_serial_more_than_or_equal_to)
(x_is_serial_less_than, x_is_serial_less_than_or_equal_to): New
functions.
(x_find_error_handler, x_request_can_fail)
(x_clean_failable_requests, x_stop_ignoring_errors): Use those
functions to perform request serial comparison.
2022-11-12 19:01:30 +08:00