1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-07 16:10:46 -08:00
Commit graph

173671 commits

Author SHA1 Message Date
Eli Zaretskii
3351697080 Fix 'format-seconds' when all values are zero and %z is used
* lisp/calendar/time-date.el (format-seconds): Fix all-zero time.

* test/lisp/calendar/time-date-tests.el (test-format-seconds): Add
two new tests.  (Bug#70322)
2024-04-10 17:00:34 +03:00
Eli Zaretskii
db7b571aaa ; Improve documentation of 'world-clock'
* lisp/time.el (zoneinfo-style-world-list)
(legacy-style-world-list): Doc fixes.
2024-04-10 16:52:21 +03:00
Andrea Corallo
f471181129 * lisp/emacs-lisp/cl-macs.el (cl-typep): Add docstring. 2024-04-10 15:30:08 +02:00
Jeremy Bryant
c606abd083 Add explicit binding to nil in let
* which-key.el (which-key--match-replacement,
which-key--propertize-key): Add explicit binding of case-fold-search to nil.
2024-04-10 05:28:09 -04:00
Peter Oliver
6a0bb7beae * doc/emacs/misc.texi (emacsclient Options): Suggest forwarding sockets.
(Bug#66667)
2024-04-10 10:42:39 +02:00
Yuan Fu
859b4227e3
Update go-ts-mode to support latest tree-sitter-go grammar
tree-sitter-go changed method_spec to method_elem in
b82ab803d8

* lisp/progmodes/go-ts-mode.el:
(go-ts-mode--method-elem-supported-p): New function.
(go-ts-mode--font-lock-settings): Conditionally use method_elem or
method_spec in the query.
2024-04-09 22:43:52 -07:00
Po Lu
f2f13fa630 Recognize Android TLS certificates by default
* lisp/net/gnutls.el (gnutls-trustfiles): Append directories
holding system and user-provided certificates on Android.
2024-04-10 12:12:33 +08:00
Stefan Monnier
dd6b9c9426 (cl--describe-class-slots): Avoid cryptic t type
* lisp/emacs-lisp/cl-extra.el (cl--describe-class-slots): Use the empty
string for the trivial `t` type.

* lisp/emacs-lisp/cl-preloaded.el (cl-structure-class):
Fix non-existing `bool` => `boolean`.
2024-04-09 18:33:01 -04:00
Dmitry Gutov
73bd48de3c ; Minor copy edits 2024-04-09 22:40:43 +03:00
Dmitry Gutov
ccced8c3e4 Add Flymake backend to rust-ts-mode using Clippy
* lisp/progmodes/rust-ts-mode.el (rust-ts-flymake-command):
New option (bug#70260).
(rust-ts--flymake-proc): New variable.
(rust-ts-flymake--helper): New function.
(rust-ts-flymake): New function.
(rust-ts-mode): Add it to flymake-diagnostic-functions.
2024-04-09 22:40:43 +03:00
Jeremy Bryant
672689aab8 ; Simplify internal defun
* which-key.el (which-key--rotate):
Simplify code slightly.

Co-authored-by: Philip Kaludercic <philipk@posteo.net>
2024-04-09 13:52:30 -04:00
Jeremy Bryant
8adbc25c39 Use null for clarity
* which-key.el (which-key--show-evil-operator-keymap): Use null for
clarity of zero length.
2024-04-09 13:52:25 -04:00
Jeremy Bryant
2c9f94162c ; Use `memq' to be just as explicit as necessary
* which-key.el (which-key--show-evil-operator-keymap):
Use `memq' to be just as explicit as necessary.
2024-04-09 13:52:20 -04:00
Jeremy Bryant
54b52f4c3c * which-key.el (which-key--show-evil-operator-keymap): let not let* 2024-04-09 13:52:09 -04:00
Jeremy Bryant
62ebafeae7 * which-key.el (which-key--create-pages-1): Use cl-decf for clarity 2024-04-09 13:52:03 -04:00
Jeremy Bryant
94a29cda9f * which-key.el (which-key--partition-list): Replace cl-subseq by take 2024-04-09 13:51:59 -04:00
Jeremy Bryant
aceafc88e6 Change cl-case to cl-ecase
* which-key.el (which-key--popup-max-dimensions):
Change cl-case to cl-ecase to signal error if needed.
2024-04-09 13:51:53 -04:00
Jeremy Bryant
c9c3eafafa * which-key.el (which-key--popup-max-dimensions): Fix docstring typo 2024-04-09 13:51:47 -04:00
Jeremy Bryant
f25457c270 Replace wholenump by natnump for context readability
* which-key.el (which-key--width-or-percentage-to-width,
which-key--height-or-percentage-to-height): Use natnump instead of
wholenump.
2024-04-09 13:51:38 -04:00
Jeremy Bryant
bf9ceab0be ; which-key.el: Display mode in error message
* which-key.el (which-key-add-major-mode-key-based-replacements):
Display mode in error message
2024-04-09 13:51:28 -04:00
Jeremy Bryant
bfab035d1b Simplify code to use null
* which-key.el (which-key--create-buffer-and-show):
Use null.
2024-04-09 13:51:20 -04:00
Jeremy Bryant
681001bf69 ; Change defcustom types to natnum
* which-key.el
(which-key-frame-max-width, which-key-frame-max-height):
Change defcustom type integer to natnum.
2024-04-09 13:51:08 -04:00
Stefan Monnier
e3861aeb48 (test-replace-match-modification-hooks): Delete test
* test/src/search-tests.el (test-replace-match-modification-hooks):
Delete, this is testing a functionality we can't really support.
2024-04-09 11:01:36 -04:00
Stefan Monnier
d0cf9f3601 Merge branch 'mouse-wheel-buttons' 2024-04-09 10:28:05 -04:00
Stefan Monnier
e720ba6219 (mouse-wheel-buttons): Map old-style wheel buttons to actual wheel events
Change the handling of the old X11 convention that uses mouse-4/5/6/7
events to represent wheel events: instead of asking downstream
packages to use the `mouse-wheel-*-event` variables to know which events
represent wheel events, use new var `mouse-wheel-buttons` to directly
convert those events into the standard `wheel-up/down/left/right` events
used everywhere else.

This will simplify the work of packages which can thus just bind their
commands to `wheel-up/down/left/right`.

* lisp/mouse.el (mouse-wheel-buttons): New custom variable.

* src/keyboard.c (make_lispy_event): Adjust for "wheel-clicks" on the tab-bar.
* src/xterm.c (x_construct_mouse_click): Add `xi2` argument and
obey `mouse-wheel-buttons` variable.
(handle_one_xevent): Adjust calls accordingly.
(syms_of_xterm): Define the `mouse-wheel-buttons` and the
`wheel-up/down/left/right`symbols.

* lisp/xt-mouse.el: Don't require `mwheel` any more.
(xterm-mouse--same-button-p): Delete function.
(xterm-mouse--read-event-sequence): Use `mouse-wheel-buttons`.

* lisp/mwheel.el (mouse-wheel-up-event, mouse-wheel-down-event)
(mouse-wheel-left-event, mouse-wheel-right-event): Make obsolete.
(mouse-wheel-obey-old-style-wheel-buttons): Delete variable.

* lisp/completion-preview.el (completion-preview--mouse-map):
* lisp/progmodes/flymake.el (flymake--mode-line-counter-map):
* lisp/edmacro.el (edmacro-fix-menu-commands): Silence warnings.
2024-04-09 10:26:07 -04:00
Arash Esbati
7236010d2e Move over optional arguments in parentheses correctly
* lisp/textmodes/reftex-parse.el (reftex-move-to-previous-arg):
Recognize ')' as closing delimiter for optional argument.
Fix docstring.
(reftex-what-macro): Identify LaTeX macros with optional arguments
in parentheses correctly.  This is necessary to make
`reftex-view-crossref' work with biblatex on entries like:
\parencites(Glob.Pre)(Glob.Post)[Pre][Post]{key1}[Pre][Post]{key2}
(bug#31132)
2024-04-09 14:08:17 +02:00
Mattias Engdegård
cda5155c61 Inhibit flymake lexical cookie warning in *scratch* (bug#70068)
Add a hack to prevent flymake from complaining about a missing lexical
cookie when enabled in *scratch*.

* lisp/emacs-lisp/bytecomp.el
(bytecomp--inhibit-lexical-cookie-warning): New variable.
(byte-compile-file): Use it to gate the warning.
* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile):
Set the inhibitor when spawning a check in lisp-interaction-mode.
2024-04-09 10:56:44 +02:00
Eli Zaretskii
2c6eb49fa2 ; Avoid byte-compiler warnings in 'ls-lisp-test-bug70271'. 2024-04-09 11:01:52 +03:00
Po Lu
22386c5634 Fix misalignment of entries created by Dired file operations
* lisp/dired.el (dired-insert-directory): Insert leading space
if absent before calling dired-align-file.
2024-04-09 15:26:36 +08:00
Juri Linkov
b31f7e67de Fix window-point-context-set and window-point-context-use (bug#33871)
* lisp/window.el (window-point-context-set)
(window-point-context-use): Add 'window-buffer' for 'buffer-name'.
2024-04-09 09:43:55 +03:00
Yuan Fu
407e85ce13
Fix c++-ts-mode defun navigation (bug#65885)
* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Add BOL and EOL marker
in the regexp.
2024-04-08 22:44:03 -07:00
Eli Zaretskii
677bc27699 ; * etc/NEWS: Announce new ls-lisp options. (Bug#70721) 2024-04-09 06:28:49 +03:00
Eli Zaretskii
93576969c2 ; Fix the test in last change. 2024-04-09 06:21:38 +03:00
Lin Sun
a4c766e057 Support more long time options in 'ls-lisp'
* lisp/ls-lisp.el (ls-lisp--sanitize-switches): Support '--time'
and '--sort=time'.  (Bug#70271)

* test/lisp/ls-lisp-tests.el (ls-lisp-test-bug70271): New
test case.
2024-04-09 06:18:56 +03:00
Po Lu
64eb4ce0af Improve treatment of aborted touch events in Speedbar and elsewhere
* lisp/dframe.el (dframe-popup-kludge): Mark as a
mouse-1-menu-command.

* lisp/touch-screen.el (touch-screen-handle-point-up): New
argument CANCELED.  Implement specific responses to cancellation
for each tool state.
(touch-screen-handle-touch): Adjust to match.
2024-04-09 10:39:36 +08:00
Po Lu
9e22cd30eb Disable tab-bar by default in Speedbar frames
* lisp/speedbar.el (speedbar-frame-parameters): Set
tab-bar-lines to 0.
2024-04-09 10:39:36 +08:00
Daniel Mendler
f30801a203 (completion-hilit-commonality): Support completion-lazy-hilit
* lisp/minibuffer.el (completion-hilit-commonality): Support lazy
completion candidate highlighting via `completion-lazy-hilit`.
2024-04-08 22:32:00 -04:00
Eli Zaretskii
6c9855d336 Improve documentation of Text Mode
* doc/emacs/text.texi (Text Mode): Improve indexing.  Document
'text-mode-ispell-word-completion'.
2024-04-08 21:02:01 +03:00
Stefan Monnier
dc5fe95a48 (cl--describe-class): Improve based on dicussion in bug#70077
* lisp/emacs-lisp/cl-extra.el (cl--describe-class): Move docstring
after the class' slots.
(cl--describe-class-slots): Buttonize the types.
2024-04-08 13:59:58 -04:00
Arash Esbati
600ac35cc6 ; * lisp/align.el: Remove unnecessary :group keywords. (bug#70262) 2024-04-08 14:21:15 +02:00
Stefan Monnier
9506b9392e (define-globalized-minor-mode): Fix bug#69431
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
When `after-change-major-mode-hook` runs, enable the mode only
in the current buffer and not in other pending buffers.
2024-04-08 08:18:31 -04:00
Stephen Berman
b9b2bc7192 Update INSTALL for native compilation of Lisp files
* INSTALL: Add section "Native compilation of Lisp files" under
ADDITIONAL DISTRIBUTION FILES and correspondingly augment item 6
of DETAILED BUILDING AND INSTALLATION.  In the latter also note
differences between in-source-tree and out-of-tree builds for
running 'src/emacs' uninstalled.
2024-04-08 13:56:56 +02:00
Andrea Corallo
c9d7721db6 * Make comp ignore EIEIO classes (bug#70141)
* lisp/emacs-lisp/comp-cstr.el (comp--all-classes): Ignore EIEIO classes.
2024-04-08 12:07:22 +02:00
Andrea Corallo
4d486bd378 * Fix out of date comp pass names in comp-tests.el
* test/src/comp-tests.el (comp-tests-tco, comp-tests-fw-prop-1)
(comp-tests-pure): Update out of date pass names.
2024-04-08 10:52:53 +02:00
Yuan Fu
4efe3b99a5
Document tree-sitter things feature (bug#70016) (bug#68824)
* doc/lispref/parsing.texi (Retrieving Nodes): Mention new kinds of
predicate argument that the tree-traversing functions accept (which are
thing symbols and thing definitions).
(User-defined Things): New node dedicated to thing definition and
navigation functions.
2024-04-07 23:22:44 -07:00
Yuan Fu
64854869ae
Make tree-sitter thing feature public and remove obsolete functions
* lisp/treesit.el (treesit--things-around): Remove function.
(treesit-forward-sexp):
(treesit-beginning-of-thing):
(treesit-end-of-thing):
(treesit-navigate-thing):
(treesit-thing-at-point):
(treesit-outline-search): Use public version of thing-functions.
(treesit--thing-prev):
(treesit--thing-next):
(treesit--thing-at):
(treesit--navigate-thing): Make public.

* test/src/treesit-tests.el (treesit--ert-test-defun-navigation): Use
public version of thing-functions.
2024-04-07 22:20:31 -07:00
F. Jason Park
ee377aaddf Fix invisible erc-speedbar cursor in text terminals
* lisp/erc/erc-speedbar.el
(erc-speedbar--reset-last-ran-on-timer): Use `with-current-buffer'
instead of `setf' and `buffer-local-value'.
(erc-nickbar-mode, erc-nickbar-enable, erc-nickbar-disable)
(erc-speedbar-toggle-nicknames-window-lock): Revise doc string.
(erc-speedbar-toggle-nicknames-window-lock): Set `cursor-type' in
speedbar buffer.
(erc-nickbar-toggle-nicknames-window-lock): New function alias.  Note
that this name flouts traditional library namespacing conventions.
* lisp/erc/erc-status-sidebar.el (erc-status-sidebar-get-window): Use
`cursor-type' instead of `internal-show-cursor'.  (Bug#63595)
2024-04-07 12:59:21 -07:00
F. Jason Park
e0df2841fb Allow updating of /IGNORE timeouts in ERC
* lisp/erc/erc.el (erc--read-time-period, erc--decode-time-period):
Move body of former, now a superficial wrapper, to latter, a new
function.
(erc--format-time-period): New function.
(erc--get-ignore-timer-args): New function.
(erc--find-ignore-timer): New function to search through `timer-list'
to find matching ignore timer.
(erc-cmd-IGNORE): Refactor and redo doc string.  Add new optional
`timespec' parameter, primarily to aid in testing.  Update an existing
timer instead of always creating one, and display time remaining in
"ignore list" output.  Pass server buffer instead of current buffer to
timer callbacks because `erc--unignore-user' displays its messages in
the `active' buffer, not necessarily the issuing one.  Note that doing
this does discard potentially useful information, so if ever reverting,
we can change the `cl-find' :test in `erc--find-ignore-timer' to
something that compares the `erc-server-process' of both buffers.
;;
;; Something like:
;;
;; (defun erc--ignore-timers-equal-p (a b)
;;   (and (equal (car a) (car b))
;;        (eq (buffer-local-value 'erc-server-process (cadr a))
;;            (buffer-local-value 'erc-server-process (cadr b)))))
;;
(erc-cmd-UNIGNORE): Pass `erc-ignore-list' member matching `user'
parameter to `erc--unignore-user' instead of original, raw parameter,
along with the server buffer.
(erc--unignore-user): Cancel existing timer and don't bother switching
to server buffer since we're already there.
(erc-message-english-ignore-list): New variable.
* test/lisp/erc/erc-scenarios-ignore.el: New file.
* test/lisp/erc/erc-tests.el (erc--read-time-period): New test.
(erc-cmd-UNIGNORE): New test.  (Bug#70127)
2024-04-07 12:59:21 -07:00
F. Jason Park
c1266d355a ; * lisp/erc/erc-nicks.el: Fix typo in Commentary. 2024-04-07 12:59:21 -07:00
Stefan Monnier
63588775fc (Freplace_match): Fix bug#65451
* src/search.c (Freplace_match): For ordering of *-change-functions.

* test/src/editfns-tests.el
(editfns-tests--before/after-change-functions): New test.
(sanity-check--message, sanity-check-change-functions-error)
(sanity-check-change-functions-check-size)
(sanity-check-change-functions-before)
(sanity-check-change-functions-after): New functions.
(sanity-check--verbose, sanity-check-change-functions-beg)
(sanity-check-change-functions-end)
(sanity-check-change-functions-buffer-size)
(sanity-check-change-functions-errors): New vars.
2024-04-07 14:16:38 -04:00