commit d00de6f166af77e686d0dd7a0d22fcf8f0e09f37 (HEAD, refs/remotes/origin/master) Author: Gerd Möllmann Date: Sun Jan 12 08:44:18 2025 +0100 ; Add some niceties to .lldbinit * src/.lldbinit: Handle some signals for tty Emacs. New commands xreload and xattach. Common breakpoints. diff --git a/src/.lldbinit b/src/.lldbinit index 55523fa2719..17676a2dc4c 100644 --- a/src/.lldbinit +++ b/src/.lldbinit @@ -30,7 +30,22 @@ script -- sys.path.append('../etc') # Load our Python files command script import emacs_lldb +# Reload emacs_lldb.py +command alias xreload command script import emacs_lldb + # Print with children provider, depth 2. command alias xprint frame variable -P 2 +# Attach to future Emacs. On a tty, it might be advisable to redirect +# Emacs' stderr to some log file so that one can see the output of +# xdebug_print and other output to stderr. +command alias xattach process attach --waitfor --name emacs --continue + +# For tty Emacs +process handle SIGWINCH --pass true --stop false --notify false +process handle SIGINT --pass true --stop false --notify false + +b emacs_abort +b die + # end. commit 54e4b305032d4dadbee286179fa78e01d4d15182 Author: Juri Linkov Date: Sun Jan 12 09:39:36 2025 +0200 * lisp/treesit.el: Fix 'treesit--explorer-tree-mode-map'. (treesit--explorer-tree-mode-map): Move this map before its mode 'treesit--explorer-tree-mode', otherwise the map has no effect. diff --git a/lisp/treesit.el b/lisp/treesit.el index 995d89332ad..056d96ad7ad 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -4045,11 +4045,6 @@ covers point. PARSER-NAME are unique." res))) (nreverse res))) -(define-derived-mode treesit--explorer-tree-mode special-mode - "TS Explorer" - "Mode for displaying syntax trees for `treesit-explore-mode'." - nil) - (defvar-keymap treesit--explorer-tree-mode-map :doc "Keymap for the treesit tree explorer. @@ -4060,6 +4055,11 @@ Navigates from button to button." "TAB" #'forward-button "" #'backward-button) +(define-derived-mode treesit--explorer-tree-mode special-mode + "TS Explorer" + "Mode for displaying syntax trees for `treesit-explore-mode'." + nil) + (defun treesit-explorer-switch-parser (parser) "Switch explorer to use PARSER." (interactive commit 412c1a4f0e1df8c82bd94f02e21c1ef62b3d53d5 Author: Eli Zaretskii Date: Sun Jan 12 08:24:39 2025 +0200 ; * src/keymap.c: Fix last change (bug#75219). diff --git a/src/keymap.c b/src/keymap.c index 733d8d16031..5c0ddcd1d9d 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1740,7 +1740,6 @@ like in the respective argument of `key-binding'. */) if (CONSP (string) && STRINGP (XCAR (string))) { Lisp_Object pos = XCDR (string); - Lisp_Object pos_area = POSN_POSN (position); string = XCAR (string); if (FIXNUMP (pos) && XFIXNUM (pos) >= 0 @@ -1748,6 +1747,7 @@ like in the respective argument of `key-binding'. */) { Lisp_Object map = Fget_text_property (pos, Qlocal_map, string); + Lisp_Object pos_area = POSN_POSN (position); /* For clicks on mode line or header line, override the maps we found at POSITION unconditionally, even if the corresponding properties of the mode- or commit c41ea047a434710c4b7bc8280695c83fbe5fff35 Author: Eli Zaretskii Date: Sun Jan 12 08:22:24 2025 +0200 Fix mouse-2 clicks on mode line and header line * src/keymap.c (Fcurrent_active_maps): For clicks on mode-line and header-line, always override the keymaps at buffer position. (Bug#75219) diff --git a/src/keymap.c b/src/keymap.c index c0f49a7c106..733d8d16031 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1740,17 +1740,27 @@ like in the respective argument of `key-binding'. */) if (CONSP (string) && STRINGP (XCAR (string))) { Lisp_Object pos = XCDR (string); + Lisp_Object pos_area = POSN_POSN (position); string = XCAR (string); if (FIXNUMP (pos) && XFIXNUM (pos) >= 0 && XFIXNUM (pos) < SCHARS (string)) { - Lisp_Object map = Fget_text_property (pos, Qlocal_map, string); - if (!NILP (map)) + Lisp_Object map = Fget_text_property (pos, Qlocal_map, + string); + /* For clicks on mode line or header line, override + the maps we found at POSITION unconditionally, even + if the corresponding properties of the mode- or + header-line string are nil, because propertries at + point are not relevant in that case. */ + if (!NILP (map) + || EQ (pos_area, Qmode_line) + || EQ (pos_area, Qheader_line)) local_map = map; - map = Fget_text_property (pos, Qkeymap, string); - if (!NILP (map)) + if (!NILP (map) + || EQ (pos_area, Qmode_line) + || EQ (pos_area, Qheader_line)) keymap = map; } } commit 6cea3233a12f3964c46bffb0b6215e9c8cd92962 Author: Daniel Colascione Date: Sat Jan 11 12:48:19 2025 -0800 Align term-mode control character handling Terminal emulators generally ignore exotic ASCII control characters like SOH and STX. Make term-mode do the same. * lisp/term.el (term-emulate-terminal): ignore ASCII control characters like other terminal emulators do diff --git a/lisp/term.el b/lisp/term.el index b343e395eca..2258da8fe37 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -3015,8 +3015,8 @@ See `term-prompt-regexp'." (defconst term-control-seq-regexp (concat - ;; A control character, - "\\(?:[\r\n\000\007\t\b\016\017]\\|" + ;; A control character not matched in a longer sequence below, + "\\(?:[\x00-\x19\x1C-\x1F\r\n\t\b]\\|" ;; some Emacs specific control sequences, implemented by ;; `term-command-hook', "\032[^\n]+\n\\|" @@ -3271,8 +3271,9 @@ See `term-prompt-regexp'." (?A ;; An \eAnSiT sequence (Emacs specific). (term-handle-ansi-terminal-messages (substring str i ctl-end))))) - ;; Ignore NUL, Shift Out, Shift In. - ((or ?\0 #xE #xF 'nil) nil)) + ;; Ignore any control character not already recognized. + ((or 'nil + (and (pred characterp) (pred (lambda (c) (<= c ?\x1F))))) nil)) ;; Leave line-wrapping state if point was moved. (unless (eq term-do-line-wrapping (point)) (setq term-do-line-wrapping nil)) commit aff9261ab2ab3cf3435cf006e600a575bc2e3d6b Author: Jim Porter Date: Sat Jan 11 11:50:19 2025 -0800 Make Eshell's "ls" command return a non-zero status on errors * lisp/eshell/em-ls.el (eshell/ls): Set exit code when calling 'error-func'. diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index ce2e6ab7d60..52a330a3353 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -329,7 +329,7 @@ instead." "An alias version of `eshell-do-ls'." (eshell-with-buffered-print (let ((insert-func #'eshell-buffered-print) - (error-func #'eshell-error)) + (error-func (lambda (s) (eshell-error s) (eshell-set-exit-info 2)))) (apply 'eshell-do-ls args)))) (put 'eshell/ls 'eshell-no-numeric-conversions t) commit 3d375ced1f22fcd3b370d715ffdd055684bce5ac Author: Juri Linkov Date: Sat Jan 11 20:40:11 2025 +0200 ; * src/term.c (term_mouse_position): Fix 'fp' pointer. diff --git a/src/term.c b/src/term.c index b8894844c6c..f7d3e58a465 100644 --- a/src/term.c +++ b/src/term.c @@ -2675,7 +2675,7 @@ term_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, return; *fp = XFRAME (last_mouse_frame); - if (!FRAME_LIVE_P (fp)) + if (!FRAME_LIVE_P (*fp)) return; (*fp)->mouse_moved = 0; commit db4bf410f2bae6c77f2a0e660dcc680d73a18cd1 Author: Juri Linkov Date: Sat Jan 11 20:28:43 2025 +0200 Improve treesit list navigation support for #if/#endif (bug#73404) * lisp/treesit.el (treesit--forward-list-with-default): Improve to better support the case when point is inside an opening/closing node with a name longer than 1 character such as "#if" and "#endif". (treesit-navigate-thing): No need to check for thing 'list' since list commands now use other functions. * lisp/progmodes/c-ts-mode.el (c-ts-mode--thing-settings): Add more preproc nodes such as #if/#endif and #ifdef/#endif and their variants to the 'list' thing. diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 80e635fe76d..dd08731edb4 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -1153,6 +1153,14 @@ if `c-ts-mode-emacs-sources-support' is non-nil." (sexp (not ,(rx (or "{" "}" "[" "]" "(" ")" ",")))) (list ,(regexp-opt '("preproc_params" + "preproc_if" + "preproc_ifdef" + "preproc_if_in_field_declaration_list" + "preproc_ifdef_in_field_declaration_list" + "preproc_if_in_enumerator_list" + "preproc_ifdef_in_enumerator_list" + "preproc_if_in_enumerator_list_no_comma" + "preproc_ifdef_in_enumerator_list_no_comma" "preproc_parenthesized_expression" "preproc_argument_list" "attribute_declaration" diff --git a/lisp/treesit.el b/lisp/treesit.el index 6107ae10ad5..995d89332ad 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -2489,11 +2489,13 @@ ARG is described in the docstring of `forward-list'." (funcall default-function inc) (point)) (scan-error nil))) + (parent (treesit-thing-at (point) pred t)) (sibling (if (> arg 0) (treesit-thing-next (point) pred) - (treesit-thing-prev (point) pred))) - (current (when default-pos - (treesit-thing-at (point) pred t)))) + (treesit-thing-prev (point) pred)))) + (when (and parent sibling + (not (treesit-node-enclosed-p sibling parent))) + (setq sibling nil)) ;; Use the default function only if it doesn't go ;; over the sibling and doesn't go out of the current group. (or (when (and default-pos @@ -2501,10 +2503,10 @@ ARG is described in the docstring of `forward-list'." (if (> arg 0) (<= default-pos (treesit-node-start sibling)) (>= default-pos (treesit-node-end sibling)))) - (or (null current) + (or (null parent) (if (> arg 0) - (<= default-pos (treesit-node-end current)) - (>= default-pos (treesit-node-start current))))) + (< default-pos (treesit-node-end parent)) + (> default-pos (treesit-node-start parent))))) (goto-char default-pos)) (when sibling (goto-char (if (> arg 0) @@ -3078,9 +3080,7 @@ function is called recursively." (if (eq tactic 'restricted) (setq pos (funcall advance - (cond ((and (null next) (null prev) - (not (eq thing 'list))) - parent) + (cond ((and (null next) (null prev)) parent) ((> arg 0) next) (t prev)))) ;; For `nested', it's a bit more work: commit fafcc8458e805e5c7d7785aa7e943bacfadcf79d Author: Juri Linkov Date: Sat Jan 11 19:39:56 2025 +0200 * lisp/progmodes/typescript-ts-mode.el: Fix syntax of tsx tags. (tsx-ts--s-p-query): Bind 'jsx_opening_element' and 'jsx_closing_element' to @jsx to be able to use the < and > syntax for angle brackets in 'tsx-ts--syntax-propertize-captures' (bug#73978). diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 3c1b27696bc..937146ddf23 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -660,7 +660,9 @@ at least 3 (which is the default value)." (when (treesit-available-p) (treesit-query-compile 'tsx '(((regex pattern: (regex_pattern) @regexp)) - ((jsx_text) @jsx))))) + ((jsx_text) @jsx) + ((jsx_opening_element) @jsx) + ((jsx_closing_element) @jsx))))) (defun typescript-ts--syntax-propertize (beg end) (let ((captures (treesit-query-capture 'typescript typescript-ts--s-p-query beg end))) commit b7dc4ba213e3c1aac5637546e48088206b6e91eb Author: Martin Rudalics Date: Sat Jan 11 18:07:21 2025 +0100 Fix handling of 'minibuffer' frame parameter for tty frames * src/frame.c (make_terminal_frame): Fix handling of 'minibuffer' frame parameter for tty child frames. Support 'minibuffer-only' child frames. diff --git a/src/frame.c b/src/frame.c index 146ecb226a4..212331c0b3a 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1289,6 +1289,7 @@ make_terminal_frame (struct terminal *terminal, Lisp_Object parent, error ("Terminal is not live, can't create new frames on it"); struct frame *f; + if (NILP (parent)) f = make_frame (true); else @@ -1297,16 +1298,60 @@ make_terminal_frame (struct terminal *terminal, Lisp_Object parent, f = NULL; Lisp_Object mini = Fassq (Qminibuffer, params); + + /* Handling the minibuffer parameter on a tty is different from + its handling on a GUI. On a GUI any "client frame" can have, + in principle, its minibuffer window on any "minibuffer frame" - + a frame that has a minibuffer window. If necessary, Emacs + tells the window manager to make the minibuffer frame visible, + raise it and give it input focus. + + On a tty there's no window manager; so Emacs itself has to make + such a minibuffer frame visible, raise and focus it. Since a + tty can show only one root frame (a frame that doesn't have a + parent frame) at any time, any client frame shown on a tty must + have a minibuffer frame whose root frame is the root frame of + that client frame. If that minibuffer frame is a child frame, + Emacs will automatically make it visible, raise it and give it + input focus, if necessary. + + Two trivial consequences of these observations for ttys are: + + - A root frame cannot be the minibuffer frame of another root + frame. + + - Since a child frame cannot be created before its parent + frame, each root frame must have its own minibuffer window. + + The situation may change as soon as we can delete and create + minibuffer windows on the fly. */ if (CONSP (mini)) { mini = Fcdr (mini); - struct kboard *kb = FRAME_KBOARD (XFRAME (parent)); + if (EQ (mini, Qnone) || NILP (mini)) - f = make_frame_without_minibuffer (Qnil, kb, Qnil); + { + mini = root_frame (XFRAME (parent))->minibuffer_window; + f = make_frame (false); + fset_minibuffer_window (f, mini); + store_frame_param (f, Qminibuffer, mini); + } else if (EQ (mini, Qonly)) - error ("minibuffer-only child frames are not implemented"); + f = make_minibuffer_frame (); else if (WINDOWP (mini)) - f = make_frame_without_minibuffer (mini, kb, Qnil); + { + if (!WINDOW_LIVE_P (mini) + || !MINI_WINDOW_P (XWINDOW (mini)) + || (root_frame (WINDOW_XFRAME (XWINDOW (mini))) + != root_frame (XFRAME (parent)))) + error ("The `minibuffer' parameter does not specify a valid minibuffer window"); + else + { + f = make_frame (false); + fset_minibuffer_window (f, mini); + store_frame_param (f, Qminibuffer, mini); + } + } } if (f == NULL) commit 912310285860363f7cf9032e949124b93a51dbca Author: Eli Zaretskii Date: Sat Jan 11 18:39:19 2025 +0200 ; * src/term.c (tty_frame_at, term_mouse_position): Fix last change. diff --git a/src/term.c b/src/term.c index 10380eba4b9..b8894844c6c 100644 --- a/src/term.c +++ b/src/term.c @@ -2597,7 +2597,8 @@ tty_draw_row_with_mouse_face (struct window *w, struct glyph_row *row, static Lisp_Object tty_frame_at (int x, int y) { - for (Lisp_Object frames = Ftty_frame_list_z_order (Qnil); frames != Qnil; + for (Lisp_Object frames = Ftty_frame_list_z_order (Qnil); + !NILP (frames); frames = Fcdr (frames)) { Lisp_Object frame = Fcar (frames); @@ -2670,10 +2671,13 @@ term_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, { /* If we've gotten no GPM mouse events yet, last_mouse_frame won't be set. Perhaps `gpm-mouse-mode' was never active. */ - if (! FRAMEP (last_mouse_frame)) + if (!FRAMEP (last_mouse_frame)) return; *fp = XFRAME (last_mouse_frame); + if (!FRAME_LIVE_P (fp)) + return; + (*fp)->mouse_moved = 0; *bar_window = Qnil; commit 1dfde9f70d2e4b417fe309ba490b33136e7ae870 Author: Eli Zaretskii Date: Sat Jan 11 15:05:41 2025 +0200 ; * etc/NEWS: Fix last change. diff --git a/etc/NEWS b/etc/NEWS index f41e9065fa7..d017c872fa3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -332,10 +332,11 @@ modal editing packages. * Changes in Specialized Modes and Packages in Emacs 31.1 +--- ** Ibuffer -*** New 'recency' column. +*** New column 'recency' in Ibuffer display. The variable 'ibuffer-formats' configures the Ibuffer formats. Add -'recency' to a format to display the column. +'recency' to the format to display the column. ** Smerge *** New command 'smerge-extend' extends a conflict over surrounding lines. commit 266e1c34d89e5f0a8ece789e77b24187c8c7d448 Author: Daniel Mendler Date: Sat Dec 28 13:21:46 2024 +0100 ibuffer: Add the "Recency" column Define a column which shows how many seconds ago the respective buffer has been displayed. The time is formatted with the `seconds-to-string' function, with the new arguments READABLE=t and ABBREV=t. * lisp/ibuffer.el (ibuffer-recency-header-map): New keymap. (define-ibuffer-column recency): New column. * etc/NEWS: Mention new `recency' column. (Bug#73047) diff --git a/etc/NEWS b/etc/NEWS index 5d193ffcb9e..f41e9065fa7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -332,6 +332,11 @@ modal editing packages. * Changes in Specialized Modes and Packages in Emacs 31.1 +** Ibuffer +*** New 'recency' column. +The variable 'ibuffer-formats' configures the Ibuffer formats. Add +'recency' to a format to display the column. + ** Smerge *** New command 'smerge-extend' extends a conflict over surrounding lines. diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 64f1b5991c2..32bc8140703 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -775,6 +775,9 @@ directory, like `default-directory'." (defvar-keymap ibuffer-mode-header-map "" #'ibuffer-do-sort-by-major-mode) +(defvar-keymap ibuffer-recency-header-map + "" #'ibuffer-do-sort-by-recency) + (defvar-keymap ibuffer-mode-filter-group-map "" #'ibuffer-mouse-toggle-mark "" #'ibuffer-mouse-toggle-filter-group @@ -1721,6 +1724,13 @@ If point is on a group name, this function operates on that group." (format "%.0f" total)))) (format "%s" (buffer-size))) +(define-ibuffer-column recency + (:inline t :summarizer ignore :header-mouse-map ibuffer-recency-header-map) + (if-let* ((time (buffer-local-value 'buffer-display-time buffer))) + (format "%s ago" (seconds-to-string + (float-time (time-since time)) t t)) + "never")) + (define-ibuffer-column mode (:inline t :header-mouse-map ibuffer-mode-header-map commit 3d960c16c60da14a07da538cc2468f46425df634 Merge: 5060bf6ed64 d66b8d4becb Author: Eli Zaretskii Date: Sat Jan 11 07:44:23 2025 -0500 Merge from origin/emacs-30 d66b8d4becb Fix checkbox's child creation 26c5fadf474 Document that 'package-vc' doesn't support built-in packages ee61b9a050b ; Fix documentation of completion commands ce43d13593a ; Simplify admin/run-codespell fa1470d0699 ; Remove duplicated word in files.el Commentary dabaea97465 Improve checkdoc-common-verbs-wrong-voice docstring 6de2ee5663d Document string-as-{unibyte,multibyte} as obsolete in manual 7f76f872ebf Fix go-ts-mode var spec indentation (Bug#75362) 01464fc882d Add "text" as a thing in tsx-ts-mode 59c57337923 Improve doc string of 'package-delete' 313a191d047 ; * admin/MAINTAINERS: Remove Kelvin White. 002960ceabf Clarify that 'mac' line ending convention is not used on ... 4210e065648 Add language server for Odin ee1034422b0 ; Improve documentation of function-type display 1c49edc4080 Modernize "Commentary" section of files.el 505c1123e18 * INSTALL: Add advice how to invoke 'make install'. (Bug... 82e16cae9cc Improve the documentation of 'key-valid-p' # Conflicts: # etc/NEWS # lisp/progmodes/typescript-ts-mode.el commit 5060bf6ed64a6e96b4c660e6ad5204a23133b71d Author: David Ponce Date: Wed Jan 1 08:03:07 2025 -0300 Fix widget buttons when button prefix includes space * lisp/wid-edit.el (widget-specify-button): Give the invisible space the same 'face' property as the rest of the button. (Bug#73911) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index bf3a1141baf..26833ce591c 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -459,17 +459,20 @@ the :notify function can't know the new value.") "Specify button for WIDGET between FROM and TO." (let ((overlay (make-overlay from to nil t nil)) (follow-link (widget-get widget :follow-link)) - (help-echo (widget-get widget :help-echo))) + (help-echo (widget-get widget :help-echo)) + (face (unless (widget-get widget :suppress-face) + (widget-apply widget :button-face-get)))) (widget-put widget :button-overlay overlay) (when (functionp help-echo) (setq help-echo 'widget-mouse-help)) - (overlay-put overlay 'before-string #(" " 0 1 (invisible t))) + (overlay-put overlay 'before-string + (propertize " " 'invisible t 'face face)) (overlay-put overlay 'button widget) (overlay-put overlay 'keymap (widget-get widget :keymap)) (overlay-put overlay 'evaporate t) ;; We want to avoid the face with image buttons. - (unless (widget-get widget :suppress-face) - (overlay-put overlay 'face (widget-apply widget :button-face-get)) + (when face + (overlay-put overlay 'face face) (overlay-put overlay 'mouse-face ;; Make new list structure for the mouse-face value ;; so that different widgets will have commit d66b8d4becb6804d3bd912a000dc64ccfdbe6810 (refs/remotes/origin/emacs-30) Author: Mauro Aranda Date: Wed Jan 1 08:22:45 2025 -0300 Fix checkbox's child creation * lisp/wid-edit.el (widget-checklist-add-item): Swap function calls so that child is actually a widget. (Bug#72156) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 3a7413f943c..8e6d0ed3664 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -2550,12 +2550,9 @@ If the item is checked, CHOSEN is a cons whose cdr is the value." (widget-create-child-value widget type (cdr chosen))) (t - (widget-create-child-value - widget type (car (cdr chosen))) - ;; This somehow breaks :options and other - ;; Custom features. - ;; (widget-specify-selected child) - )))) + (widget-specify-selected child) + (widget-create-child-value + widget type (car (cdr chosen))))))) (t (error "Unknown escape `%c'" escape))))) ;; Update properties. commit 26c5fadf474a56d56064899bc3447bba6d3c3037 Author: Eli Zaretskii Date: Sat Jan 11 12:58:03 2025 +0200 Document that 'package-vc' doesn't support built-in packages * doc/misc/use-package.texi (Install package): * doc/emacs/package.texi (Fetching Package Sources): Document that upgrading built-in packages is not yet supported using 'package-vc'. (Bug#75328) diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index e6d0a66d571..2e3191440cb 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi @@ -611,6 +611,9 @@ regular package listing. If you just wish to clone the source of a package, without adding it to the package list, use @code{package-vc-checkout}. + Note that currently, built-in packages cannot be upgraded using +@code{package-vc-install}. + @findex package-report-bug @findex package-vc-prepare-patch With the source checkout, you might want to reproduce a bug against diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi index 6f51780057f..bcb068e6654 100644 --- a/doc/misc/use-package.texi +++ b/doc/misc/use-package.texi @@ -1660,7 +1660,8 @@ declaration. The accepted property list is augmented by a @code{:rev} keyword, which has the same shape as the @code{REV} argument to @code{package-vc-install}. Notably -- even when not specified -- @code{:rev} defaults to checking out the last release of the package. -You can use @code{:rev :newest} to check out the latest commit. +You can use @code{:rev :newest} to check out the latest commit. Note +that currently, you cannot upgrade built-in packages using @code{:vc}. For example, commit d018a26f9cfb29b166199e88ec6ee84d06733851 Author: Jared Finder Date: Mon Jan 6 20:52:11 2025 -0800 Support TTY child frames with GPM mouse * lisp/frame.el (x-list-fonts): Delete `frame-at', to move to C implementation. * lisp/xt-mouse.el (xterm-mouse-event): Call new `tty-frame-at'. * src/term.c (tty_frame_at, Ftty_frame_at): New C function, replacing `frame-at' only for TTYs. (term_mouse_position): Use last_mouse_frame when it is set. (handle_one_term_event): Call tty_frame_at to get frame under mouse, store it in last_mouse_frame. Alter event coordinates based on mouse frame. (syms_of_term): Add tty-frame-at, last_mouse_frame. * src/termhooks.h: Make Gpm_Event parameter const. diff --git a/lisp/frame.el b/lisp/frame.el index 7da6bce697a..091e84f09c4 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1506,13 +1506,6 @@ FRAME defaults to the selected frame." (let ((edges (frame-edges frame 'outer-edges))) (- (nth 3 edges) (nth 1 edges)))) -(defun frame-at (x y) - "Return frame containing pixel position X, Y." - (cl-loop for frame in (frame-list-z-order) - as (x0 y0 x1 y1) = (frame-edges frame) - when (and (<= x0 x (1- x1)) (<= y0 y (1- y1))) - return frame)) - (declare-function x-list-fonts "xfaces.c" (pattern &optional face frame maximum width)) diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index ccb585ce631..19d688e4d1e 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -298,7 +298,7 @@ which is the \"1006\" extension implemented in Xterm >= 277." ;; FIXME: The test for running in batch mode is here solely ;; for the sake of xt-mouse-tests where the only frame is ;; the initial frame. - (frame (unless noninteractive (frame-at x y))) + (frame (unless noninteractive (tty-frame-at x y))) ;;(_ (message (format "*** %S" frame))) (frame-pos (frame-position frame)) ;;(_ (message (format "*** %S" frame-pos))) diff --git a/src/term.c b/src/term.c index 368e20803e1..10380eba4b9 100644 --- a/src/term.c +++ b/src/term.c @@ -141,6 +141,7 @@ static int max_frame_cols; struct tty_display_info *gpm_tty = NULL; /* Last recorded mouse coordinates. */ +static Lisp_Object last_mouse_frame; static int last_mouse_x, last_mouse_y; #endif /* HAVE_GPM */ @@ -2593,6 +2594,35 @@ tty_draw_row_with_mouse_face (struct window *w, struct glyph_row *row, #endif +static Lisp_Object +tty_frame_at (int x, int y) +{ + for (Lisp_Object frames = Ftty_frame_list_z_order (Qnil); frames != Qnil; + frames = Fcdr (frames)) + { + Lisp_Object frame = Fcar (frames); + struct frame *f = XFRAME (frame); + + if (f->left_pos <= x && x < f->left_pos + f->pixel_width && + f->top_pos <= y && y < f->top_pos + f->pixel_height) + return frame; + } + + return Qnil; +} + +DEFUN ("tty-frame-at", Ftty_frame_at, Stty_frame_at, + 2, 2, 0, + doc: /* Return tty frame containing pixel position X, Y. */) + (Lisp_Object x, Lisp_Object y) +{ + if (! FIXNUMP (x) || ! FIXNUMP (y)) + /* Coordinates this big can not correspond to any frame. */ + return Qnil; + + return tty_frame_at (XFIXNUM (x), XFIXNUM (y)); +} + #ifdef HAVE_GPM void @@ -2638,7 +2668,12 @@ term_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, Time *timeptr) { - *fp = SELECTED_FRAME (); + /* If we've gotten no GPM mouse events yet, last_mouse_frame won't be + set. Perhaps `gpm-mouse-mode' was never active. */ + if (! FRAMEP (last_mouse_frame)) + return; + + *fp = XFRAME (last_mouse_frame); (*fp)->mouse_moved = 0; *bar_window = Qnil; @@ -2713,9 +2748,14 @@ term_mouse_click (struct input_event *result, Gpm_Event *event, } int -handle_one_term_event (struct tty_display_info *tty, Gpm_Event *event) +handle_one_term_event (struct tty_display_info *tty, const Gpm_Event *event_in) { - struct frame *f = XFRAME (tty->top_frame); + Lisp_Object frame = tty_frame_at (event_in->x, event_in->y); + struct frame *f = decode_live_frame (frame); + Gpm_Event event = *event_in; + event.x -= f->left_pos; + event.y -= f->top_pos; + struct input_event ie; int count = 0; @@ -2723,30 +2763,34 @@ handle_one_term_event (struct tty_display_info *tty, Gpm_Event *event) ie.kind = NO_EVENT; ie.arg = Qnil; - if (event->type & (GPM_MOVE | GPM_DRAG)) + if (event.type & (GPM_MOVE | GPM_DRAG)) { - Gpm_DrawPointer (event->x, event->y, fileno (tty->output)); + /* The pointer must be drawn using screen coordinates (x,y), not + frame coordinates. Use event_in which has an unmodified event + directly from GPM. */ + Gpm_DrawPointer (event_in->x, event_in->y, fileno (tty->output)); /* Has the mouse moved off the glyph it was on at the last sighting? */ - if (event->x != last_mouse_x || event->y != last_mouse_y) + if (event.x != last_mouse_x || event.y != last_mouse_y) { - /* FIXME: These three lines can not be moved into + /* FIXME: These four lines can not be moved into update_mouse_position unless xterm-mouse gets updated to generate mouse events via C code. See https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00163.html */ - last_mouse_x = event->x; - last_mouse_y = event->y; + last_mouse_frame = frame; + last_mouse_x = event.x; + last_mouse_y = event.y; f->mouse_moved = 1; - count += update_mouse_position (f, event->x, event->y); + count += update_mouse_position (f, event.x, event.y); } } else { f->mouse_moved = 0; - term_mouse_click (&ie, event, f); - ie.arg = tty_handle_tab_bar_click (f, event->x, event->y, + term_mouse_click (&ie, &event, f); + ie.arg = tty_handle_tab_bar_click (f, event.x, event.y, (ie.modifiers & down_modifier) != 0, &ie); kbd_buffer_store_event (&ie); count++; @@ -4967,9 +5011,11 @@ trigger redisplay. */); defsubr (&Stty__set_output_buffer_size); defsubr (&Stty__output_buffer_size); #endif /* !HAVE_ANDROID */ + defsubr (&Stty_frame_at); #ifdef HAVE_GPM defsubr (&Sgpm_mouse_start); defsubr (&Sgpm_mouse_stop); + staticpro (&last_mouse_frame); #endif /* HAVE_GPM */ defsubr (&Stty_frame_geometry); diff --git a/src/termhooks.h b/src/termhooks.h index b32804a57b3..0795148f1af 100644 --- a/src/termhooks.h +++ b/src/termhooks.h @@ -458,7 +458,7 @@ enum { #ifdef HAVE_GPM #include -extern int handle_one_term_event (struct tty_display_info *, Gpm_Event *); +extern int handle_one_term_event (struct tty_display_info *, const Gpm_Event *); extern void term_mouse_moveto (int, int); /* The device for which we have enabled gpm support. */ commit ee61b9a050b4fbc9940d11bc95437e5113865c8b Author: Eli Zaretskii Date: Sat Jan 11 12:40:59 2025 +0200 ; Fix documentation of completion commands * src/minibuf.c (Fcompleting_read): Move part of doc string of 'read-from-minibuffer' to doc string of this function. Suggested by Eshel Yaron . diff --git a/src/minibuf.c b/src/minibuf.c index e0d060a0480..bf9fad48d88 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1293,11 +1293,6 @@ barf_if_interaction_inhibited (void) DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 7, 0, doc: /* Read a string from the minibuffer, prompting with string PROMPT. -While in the minibuffer, you can use \\\\[minibuffer-complete] and \\[minibuffer-complete-word] to complete your input. -You can also use \\\\[minibuffer-complete-history] to complete using history items in the -input history HIST, and you can use \\[minibuffer-complete-defaults] to complete using -the default items in DEFAULT-VALUE. - The optional second arg INITIAL-CONTENTS is an obsolete alternative to DEFAULT-VALUE. It normally should be nil in new code, except when HIST is a cons. It is discussed in more detail below. @@ -1983,6 +1978,11 @@ with a space are ignored unless STRING itself starts with a space. */) DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, doc: /* Read a string in the minibuffer, with completion. +While in the minibuffer, you can use \\\\[minibuffer-complete] and \\[minibuffer-complete-word] to complete your input. +You can also use \\\\[minibuffer-complete-history] to complete using history items in the +input history HIST, and you can use \\[minibuffer-complete-defaults] to complete using +the default items in DEFAULT-VALUE. + PROMPT is a string to prompt with; normally it ends in a colon and a space. COLLECTION can be a list of strings, an alist, an obarray or a hash table. COLLECTION can also be a function to do the completion itself. commit ce43d13593a44ba36ba6702cf276fef8711ab738 Author: Stefan Kangas Date: Sat Jan 11 07:09:23 2025 +0100 ; Simplify admin/run-codespell * admin/run-codespell (emacs_run_codespell): Simplify. Use env in shebang to use more recent bash on macOS. diff --git a/admin/run-codespell b/admin/run-codespell index be90313da1e..f5728f831f0 100755 --- a/admin/run-codespell +++ b/admin/run-codespell @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ### run-codespell - run codespell on Emacs ## Copyright (C) 2023-2025 Free Software Foundation, Inc. @@ -40,22 +40,22 @@ CODESPELL_DICTIONARY="${CODESPELL_DIR}/codespell.dictionary" emacs_run_codespell () { git ls-files |\ - grep -v -E -e '^(lib|m4)/.*' |\ - grep -v -E -e '^admin/(charsets|codespell|unidata)/.*' |\ - grep -v -E -e '^doc/lispref/spellfile$' |\ - grep -v -E -e '^doc/misc/texinfo.tex$' |\ - grep -v -E -e '^doc/translations/.*' |\ - grep -v -E -e '^etc/(AUTHORS|HELLO|publicsuffix.txt)$' |\ - grep -v -E -e '^etc/refcards/(cs|de|fr|pl|pt|sk)-.+.tex$' |\ - grep -v -E -e '^etc/tutorials/TUTORIAL\..+' |\ - grep -v -E -e '^leim/(MISC|SKK)-DIC/.*' |\ - grep -v -E -e '^lisp/language/ethio-util.el' |\ - grep -v -E -e '^lisp/ldefs-boot.el' |\ - grep -v -E -e '^lisp/leim/.*' |\ - grep -v -E -e '^test/lisp/erc/resources/.*' |\ - grep -v -E -e '^test/lisp/net/puny-resources/IdnaTestV2.txt' |\ - grep -v -E -e '^test/manual/(etags|indent)/.*' |\ - grep -v -E -e '^test/src/regex-resources/.*' |\ + grep --line-buffered -v -E -e "^(lib|m4)/.*|\ +^admin/(charsets|codespell|unidata)/.*|\ +^doc/lispref/spellfile$|\ +^doc/misc/texinfo.tex$|\ +^doc/translations/.*|\ +^etc/(AUTHORS|HELLO|publicsuffix.txt)$|\ +^etc/refcards/(cs|de|fr|pl|pt|sk)-.+.tex$|\ +^etc/tutorials/TUTORIAL\..+|\ +^leim/(MISC|SKK)-DIC/.*|\ +^lisp/language/ethio-util.el|\ +^lisp/ldefs-boot.el|\ +^lisp/leim/.*|\ +^test/lisp/erc/resources/.*|\ +^test/lisp/net/puny-resources/IdnaTestV2.txt|\ +^test/manual/(etags|indent)/.*|\ +^test/src/regex-resources/.*" |\ xargs codespell \ --config "$CODESPELL_RC" \ --exclude-file "$CODESPELL_EXCLUDE" \ commit fa1470d0699172e0913290c78c66da293aa43f89 Author: Stefan Kangas Date: Sat Jan 11 05:18:51 2025 +0100 ; Remove duplicated word in files.el Commentary diff --git a/lisp/files.el b/lisp/files.el index bad24c31d1c..b64935e8d9e 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -23,7 +23,7 @@ ;;; Commentary: ;; Defines Emacs's basic file- and directory-handling functions, -;; including basic file visiting, backup file generation and versioning, +;; including file visiting, backup file generation and versioning, ;; link handling, load- and write-hook handling, and the like. ;;; Code: commit dabaea97465163c015890272c3d5001624690e08 Author: Stefan Kangas Date: Sat Jan 11 05:05:14 2025 +0100 Improve checkdoc-common-verbs-wrong-voice docstring * lisp/emacs-lisp/checkdoc.el (checkdoc-common-verbs-wrong-voice): Improve docstring. diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index d6e94789c07..e6c2b8306be 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -484,10 +484,10 @@ this to anything but t is likely to be counter-productive.") ("yanks" . "yank") ) "Alist of common words in the wrong voice and what should be used instead. -Set `checkdoc-verb-check-experimental-flag' to nil to avoid this costly -and experimental check. Do not modify this list without setting -the value of `checkdoc-common-verbs-regexp' to nil which cause it to -be re-created.") +Set `checkdoc-verb-check-experimental-flag' to a non-nil value to enable +this experimental check. Do not modify this list without setting the +value of `checkdoc-common-verbs-regexp' to nil, which causes it to be +re-created.") (defvar checkdoc-syntax-table (let ((st (make-syntax-table emacs-lisp-mode-syntax-table))) commit 6de2ee5663d5cc51831dbdafd77bd71e0811c37b Author: Stefan Kangas Date: Sat Jan 11 02:28:15 2025 +0100 Document string-as-{unibyte,multibyte} as obsolete in manual * doc/lispref/nonascii.texi (Selecting a Representation): Document string-as-unibyte and string-as-multibyte as obsolete. diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 696e46d4af9..43d4181e045 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -341,6 +341,9 @@ buffer. An indirect buffer always inherits the representation of its base buffer. @end defun +The following two functions are obsolete and will be removed in a future +version of Emacs; use @code{encode-coding-string} instead. + @defun string-as-unibyte string If @var{string} is already a unibyte string, this function returns @var{string} itself. Otherwise, it returns a new string with the same commit 7f76f872ebfd67fb52974426c47bf3d08724d716 Author: Randy Taylor Date: Sun Jan 5 16:48:00 2025 -0500 Fix go-ts-mode var spec indentation (Bug#75362) v0.21.1 and onwards changed how this was indented. * lisp/progmodes/go-ts-mode.el (go-ts-mode--indent-rules): Add rule for var_spec_list. diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index 3322cc24b3e..1e948f7785a 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -93,6 +93,7 @@ ((parent-is "type_spec") parent-bol go-ts-mode-indent-offset) ((parent-is "type_switch_statement") parent-bol 0) ((parent-is "var_declaration") parent-bol go-ts-mode-indent-offset) + ((parent-is "var_spec_list") parent-bol go-ts-mode-indent-offset) (no-node parent-bol 0))) "Tree-sitter indent rules for `go-ts-mode'.") commit 01464fc882dbb56d4271fbb89b7b847e8374d39c Author: Kohei Tsuruta Date: Tue Jan 7 07:36:14 2025 -0800 Add "text" as a thing in tsx-ts-mode * lisp/progmodes/typescript-ts-mode.el (tsx-ts-mode): Add definition of "text" (bug#75422). Copyright-paperwork-exempt: yes diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 4a38d1da596..0ffcb144771 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -564,7 +564,9 @@ at least 3 (which is the default value)." (sentence ,(regexp-opt (append typescript-ts-mode--sentence-nodes '("jsx_element" - "jsx_self_closing_element"))))))) + "jsx_self_closing_element")))) + (text ,(regexp-opt '("comment" + "template_string")))))) ;; Font-lock. (setq-local treesit-font-lock-settings commit 59c57337923ed515e923ea65f168e1197d376868 Author: Nikolaos Chatzikonstantinou Date: Sun Jan 5 08:16:06 2025 -0500 Improve doc string of 'package-delete' * lisp/emacs-lisp/package.el (package-delete): Elaborate on the kind of argument expected by the function. (Bug#75382) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 0fc5aaac343..be3b85f3179 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2498,8 +2498,9 @@ compiled." (defun package-delete (pkg-desc &optional force nosave) "Delete package PKG-DESC. -Argument PKG-DESC is a full description of package as vector. -Interactively, prompt the user for the package name and version. +Argument PKG-DESC is the full description of the package, for example as +obtained by `package-get-descriptor'. Interactively, prompt the user +for the package name and version. When package is used elsewhere as dependency of another package, refuse deleting it and return an error. commit 313a191d047a9d7d24ad0fee55739ce6133d887e Author: Stefan Kangas Date: Thu Jan 9 03:08:29 2025 +0100 ; * admin/MAINTAINERS: Remove Kelvin White. diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index 9bfdcdc7489..2317337303b 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -251,11 +251,6 @@ maintainership to someone listed above, but who want to continue to be CC'd as though they were still the primary maintainer, in the meantime. ============================================================================== -Kelvin White - ERC - lisp/erc/* - doc/misc/erc.texi - Eli Zaretskii doc/* commit 002960ceabfb4f91b1bc73a342a9bd5e719e739b Author: Stefan Kangas Date: Wed Jan 8 04:50:53 2025 +0100 Clarify that 'mac' line ending convention is not used on macOS * doc/emacs/mule.texi (Coding Systems): * doc/lispref/nonascii.texi (Coding System Basics): Clarify that the 'mac' line ending convention is not used on macOS, and is now rare outside of legacy software. diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 580f8da27d7..4db0febbef8 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -832,7 +832,7 @@ format, which Emacs doesn't support directly.}) @item @dots{}-mac Assume the file uses carriage return to separate lines, and do the appropriate conversion. (This was the convention used in Classic Mac -OS.) +OS, but is now rare outside of legacy software.) @end table These variant coding systems are omitted from the diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 0e09770bf49..696e46d4af9 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -1096,13 +1096,13 @@ that result from encoding unsupported characters. @cindex EOL conversion @cindex end-of-line conversion @cindex line end conversion - @dfn{End of line conversion} handles three different conventions -used on various systems for representing end of line in files. The -Unix convention, used on GNU and Unix systems, is to use the linefeed -character (also called newline). The DOS convention, used on + @dfn{End of line conversion} handles three different conventions used +on various systems for representing end of line in files. The Unix +convention, used on GNU and Unix systems, and macOS, is to use the +linefeed character (also called newline). The DOS convention, used on MS-Windows and MS-DOS systems, is to use a carriage return and a -linefeed at the end of a line. The Mac convention is to use just -carriage return. (This was the convention used in Classic Mac OS.) +linefeed. The Mac convention, used in Classic Mac OS and now rare +outside of legacy software, is to use just carriage return. @cindex base coding system @cindex variant coding system commit 4210e065648dcc4fd7fbc22298047d19d679c84f Author: Ellis Kenyo Date: Tue Jan 7 15:43:58 2025 +0000 Add language server for Odin * lisp/progmodes/eglot.el (eglot-server-programs): Add language server for the Odin programming language. (Bug#75421) Copyright-paperwork-exempt: yes diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 5a7b14fcb17..02bb844b54e 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -341,7 +341,8 @@ automatically)." (sml-mode . ,(lambda (_interactive project) (list "millet-ls" (project-root project)))) - ((blueprint-mode blueprint-ts-mode) . ("blueprint-compiler" "lsp"))) + ((blueprint-mode blueprint-ts-mode) . ("blueprint-compiler" "lsp")) + ((odin-mode odin-ts-mode) . ("ols"))) "How the command `eglot' guesses the server to start. An association list of (MAJOR-MODE . CONTACT) pairs. MAJOR-MODE identifies the buffers that are to be managed by a specific commit ee1034422b0c84722a237ab6fdd410ab74674ee6 Author: Eli Zaretskii Date: Tue Jan 7 17:20:22 2025 +0200 ; Improve documentation of function-type display * etc/NEWS: Document 'help-display-function-type'. * doc/lispref/functions.texi (Declare Form): * doc/lispref/objects.texi (Type Specifiers): * doc/emacs/help.texi (Name Help): Better indexing of function types. (Bug#65288) diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index 2e0eb0d6459..5c2eabb02d6 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi @@ -323,7 +323,8 @@ yet further information is often reachable by clicking or typing @key{RET} on emphasized parts of the text. @cindex function type specifier - +@cindex declared type of a function +@cindex inferred type of a function The function type, if known, is expressed with a @dfn{function type specifier} (@pxref{Type Specifiers,,,elisp, The Emacs Lisp Reference Manual}), it will be specified if the type was manually declared by a diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index dc9443b69bc..6f65ff95c44 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -2726,6 +2726,7 @@ function. This allows function-level control of the safety level used for the code emitted for the function (@pxref{Native-Compilation Variables}). +@cindex function type declaration @item (ftype @var{type} &optional @var{function}) Declare @var{type} to be the type of this function. This is used for documentation by @code{describe-function}. Also it can be used by the diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index 3bd5a4528b0..630765213a2 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi @@ -1545,6 +1545,7 @@ The @code{not} type specifier defines any type except the specified one. The @code{member} type specifier allows to specify a type that includes only the explicitly listed values. +@cindex declared type of a function @item (function (@var{arg-1-type} @dots{} @var{arg-n-type}) @var{return-type}) The @code{function} type specifier is used to describe the argument types and the return type of a function. Argument types can be interleaved diff --git a/etc/NEWS b/etc/NEWS index 6b2831e3809..31a0c4938ad 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -481,9 +481,13 @@ This user option controls outline visibility in the output buffer of 'describe-bindings' when 'describe-bindings-outline' is non-nil. --- -*** 'describe-function' shows the function inferred type when available. +*** 'describe-function' shows the function's inferred type when available. For native compiled Lisp functions, 'describe-function' prints (after -the signature) the automatically inferred function type as well. +the signature) the automatically inferred function type as well. If the +function's type was explicitly declared (via the 'declare' form's +'ftype' property), 'describe-function' shows the declared type. This is +controlled by the new user option 'help-display-function-type', which is +by default t; customize to nil to disable function type display. --- *** 'describe-function' now shows the type of the function object. commit 1c49edc40802ed4bb5f36c44b00e954efbddd42a Author: Stefan Kangas Date: Tue Jan 7 06:12:21 2025 +0100 Modernize "Commentary" section of files.el * lisp/files.el: Modernize "Commentary" section. (Bug#75398) diff --git a/lisp/files.el b/lisp/files.el index 05fa09a9f4e..bad24c31d1c 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1,4 +1,4 @@ -;;; files.el --- file input and output commands for Emacs -*- lexical-binding:t -*- +;;; files.el --- file input and output commands -*- lexical-binding:t -*- ;; Copyright (C) 1985-1987, 1992-2025 Free Software Foundation, Inc. @@ -22,9 +22,9 @@ ;;; Commentary: -;; Defines most of Emacs's file- and directory-handling functions, -;; including basic file visiting, backup generation, link handling, -;; ITS-id version control, load- and write-hook handling, and the like. +;; Defines Emacs's basic file- and directory-handling functions, +;; including basic file visiting, backup file generation and versioning, +;; link handling, load- and write-hook handling, and the like. ;;; Code: commit 505c1123e18a8a710fc60e05a4c870497bf580f4 Author: Michael Albinus Date: Sun Jan 5 09:25:37 2025 +0100 * INSTALL: Add advice how to invoke 'make install'. (Bug#74400) diff --git a/INSTALL b/INSTALL index d2705d3a44d..8580ad7003d 100644 --- a/INSTALL +++ b/INSTALL @@ -671,6 +671,12 @@ for its Lisp files by giving values for 'make' variables as part of the command. See the section below called 'MAKE VARIABLES' for more information on this. +If the directories where 'make install' installs files are not writable +by your user, you might prefer invoking 'make && sudo make install' +instead. This first invokes 'make' to make sure all the required files +are rebuilt with your user's permissions and ownership, and then +installs them using the permissions of root. + 7) Check the file 'dir' in your site's info directory (usually /usr/local/share/info) to make sure that it has a menu entry for the Emacs info files. commit 82e16cae9cc02d6807561861621cf7b5b9ba928f Author: Hong Xu Date: Sat Jan 4 12:32:24 2025 -0800 Improve the documentation of 'key-valid-p' * lisp/keymap.el (key-valid-p): Add an function key and mouse button example. Mention '' as a cursor control key instead of a function key. Briefly explain what an event may be. (Bug#75366) diff --git a/lisp/keymap.el b/lisp/keymap.el index 081c7d139aa..f74a84e8806 100644 --- a/lisp/keymap.el +++ b/lisp/keymap.el @@ -327,21 +327,26 @@ KEYS should be a string consisting of one or more key strokes, with a single space character separating one key stroke from another. Each key stroke is either a single character, or the name of an -event, surrounded by angle brackets . In addition, any -key stroke may be preceded by one or more modifier keys. Finally, -a limited number of characters have a special shorthand syntax. +event, surrounded by angle brackets . An event may be +pushing a key, clicking on a menu item, pressing a mouse button, etc. +In addition, any key stroke may be preceded by one or more modifier +keys. Finally, a limited number of characters have a special shorthand +syntax. Here are some example of valid key sequences. \"f\" (the key `f') + \"\" (the function key named \"F6\") + \"\" (the mouse button named \"mouse-1\", commonly referred to as + the left button) \"S o m\" (a three-key sequence of the keys `S', `o' and `m') \"C-c o\" (a two-key sequence: the key `c' with the control modifier followed by the key `o') - \"H-\" (the function key named \"left\" with the hyper modifier) + \"H-\" (the cursor control key named \"left\" with the hyper modifier) \"M-RET\" (the \"return\" key with a meta modifier) \"C-M-\" (the \"space\" key with both the control and meta modifiers) -These are the characters that have special shorthand syntax: +These characters have special shorthand syntax: NUL, RET, TAB, LFD, ESC, SPC, DEL. Modifiers have to be specified in this order: