commit ea865c98cf3c8a4e0216a81be1b9357a48e7b9a3 (HEAD, refs/remotes/origin/master) Author: Juri Linkov Date: Thu Dec 19 09:33:22 2024 +0200 Add treesit thing 'sexp-list' to some ts-modes (bug#73404) * lisp/progmodes/c-ts-mode.el (c-ts-mode--thing-settings): * lisp/progmodes/js.el (js-ts-mode): * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): * lisp/textmodes/html-ts-mode.el (html-ts-mode): Add 'sexp-list' to treesit-thing-settings. * lisp/progmodes/js.el (js--treesit-sexp-list-nodes): New variable. diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 5e3194dd82e..cf1721d66ee 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -1139,6 +1139,27 @@ if `c-ts-mode-emacs-sources-support' is non-nil." `(;; It's more useful to include semicolons as sexp so ;; that users can move to the end of a statement. (sexp (not ,(rx (or "{" "}" "[" "]" "(" ")" ",")))) + (sexp-list + ,(regexp-opt '("preproc_params" + "preproc_parenthesized_expression" + "preproc_argument_list" + "attribute_declaration" + "declaration_list" + "parenthesized_declarator" + "parenthesized_field_declarator" + "parenthesized_type_declarator" + "abstract_parenthesized_declarator" + "compound_statement" + "enumerator_list" + "field_declaration_list" + "parameter_list" + "argument_list" + "parenthesized_expression" + "initializer_list" + "subscript_designator" + "subscript_range_designator" + "string_literal") + 'symbols)) ;; compound_statement makes us jump over too big units ;; of code, so skip that one, and include the other ;; statements. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 5515b58269a..1b6565f66c2 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3866,6 +3866,28 @@ See `treesit-thing-settings' for more information.") "Nodes that designate sexps in JavaScript. See `treesit-thing-settings' for more information.") +(defvar js--treesit-sexp-list-nodes + '("export_clause" + "named_imports" + "statement_block" + "_for_header" + "switch_body" + "parenthesized_expression" + "object" + "object_pattern" + "array" + "array_pattern" + "jsx_expression" + "_jsx_string" + "string" + "regex" + "arguments" + "class_body" + "formal_parameters" + "computed_property_name") + "Nodes that designate lists in JavaScript. +See `treesit-thing-settings' for more information.") + (defvar js--treesit-jsdoc-beginning-regexp (rx bos "/**") "Regular expression matching the beginning of a jsdoc block comment.") @@ -3909,6 +3931,7 @@ See `treesit-thing-settings' for more information.") (setq-local treesit-thing-settings `((javascript (sexp ,(js--regexp-opt-symbol js--treesit-sexp-nodes)) + (sexp-list ,(js--regexp-opt-symbol js--treesit-sexp-list-nodes)) (sentence ,(js--regexp-opt-symbol js--treesit-sentence-nodes)) (text ,(js--regexp-opt-symbol '("comment" "string_fragment")))))) diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el index 58a7eab0d1a..4ef0cb18eae 100644 --- a/lisp/progmodes/ruby-ts-mode.el +++ b/lisp/progmodes/ruby-ts-mode.el @@ -1195,6 +1195,47 @@ leading double colon is not added." ) eol) #'ruby-ts--sexp-p)) + (sexp-list + ,(cons (rx + bol + (or + "begin_block" + "end_block" + "method" + "singleton_method" + "method_parameters" + "parameters" + "block_parameters" + "class" + "singleton_class" + "module" + "do" + "case" + "case_match" + "array_pattern" + "find_pattern" + "hash_pattern" + "parenthesized_pattern" + "expression_reference_pattern" + "if" + "unless" + "begin" + "parenthesized_statements" + "argument_list" + "do_block" + "block" + "destructured_left_assignment" + "interpolation" + "string" + "string_array" + "symbol_array" + "delimited_symbol" + "regex" + "heredoc_body" + "array" + "hash") + eol) + #'ruby-ts--sexp-p)) (text ,(lambda (node) (or (member (treesit-node-type node) '("comment" "string_content" "heredoc_content")) diff --git a/lisp/textmodes/html-ts-mode.el b/lisp/textmodes/html-ts-mode.el index f78fbdde1da..875ab267fd8 100644 --- a/lisp/textmodes/html-ts-mode.el +++ b/lisp/textmodes/html-ts-mode.el @@ -108,6 +108,7 @@ Return nil if there is no name or if NODE is not a defun node." "text" "attribute" "value"))) + (sexp-list ,(regexp-opt '("element")) 'symbols) (sentence "tag") (text ,(regexp-opt '("comment" "text")))))) commit d930d7f8651897dc3130ff16731751691566d490 Author: Juri Linkov Date: Thu Dec 19 09:27:28 2024 +0200 New treesit thing 'sexp-list' (bug#73404) * lisp/treesit.el (treesit-forward-list): New command. (treesit-forward-sexp): Check the thing 'text' only when 'treesit-sexp-type-regexp' is nil. (treesit-forward-sexp-list): New function. (treesit-navigate-thing): Don't try moving to parent when thing is 'sexp-list'. (treesit-major-mode-setup): Set 'forward-sexp-function' to 'treesit-forward-sexp-list' when the 'sexp-list' thing is defined. diff --git a/etc/NEWS b/etc/NEWS index 7d352915114..b9064829548 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -954,6 +954,13 @@ override flag by 'treesit-font-lock-setting-query', 'treesit-font-lock-setting-feature', 'treesit-font-lock-setting-enable', and 'treesit-font-lock-setting-override'. +*** New treesit thing 'sexp-list'. +Unlike the existing thing 'sexp' that defines both lists and atoms, +'sexp-list' defines only lists to be navigated by 'forward-sexp'. +The new function 'treesit-forward-sexp-list' uses 'sexp-list' +to move across lists. But to move across atoms inside the list +it uses `forward-sexp-default-function'. + +++ ** New optional BUFFER argument for 'string-pixel-width'. If supplied, 'string-pixel-width' will use any face remappings from diff --git a/lisp/treesit.el b/lisp/treesit.el index 18200acf53f..9db3d57b6e9 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -2366,6 +2366,25 @@ delimits medium sized statements in the source code. It is, however, smaller in scope than sentences. This is used by `treesit-forward-sexp' and friends.") +(defun treesit-forward-list (&optional arg) + "Move forward across a list. +What constitutes a list is determined by `sexp-list' in +`treesit-thing-settings' that usually defines +parentheses-like expressions. + +Unlike `forward-sexp', this command moves only across a list, +but not across atoms (such as symbols or words) inside the list. + +This command is the tree-sitter variant of `forward-list'. But since +`forward-list' has no \"forward-list-function\" like there is +`forward-sexp-function' for `forward-sexp', this command +can be used on its own. + +ARG is described in the docstring of `forward-list'." + (interactive "^p") + (let ((treesit-sexp-type-regexp 'sexp-list)) + (treesit-forward-sexp arg))) + (defun treesit-forward-sexp (&optional arg) "Tree-sitter implementation for `forward-sexp-function'. @@ -2379,12 +2398,18 @@ signal `scan-error' like `forward-sexp' does. If point is already at top-level, return nil without moving point. What constitutes as text and source code sexp is determined -by `text' and `sexp' in `treesit-thing-settings'." +by `text' and `sexp' in `treesit-thing-settings'. + +There is an alternative implementation in `treesit-forward-sexp-list' +that uses `sexp-list' in `treesit-thing-settings' to move only +across lists, whereas uses `forward-sexp-default-function' to move +across atoms (such as symbols or words) inside the list." (interactive "^p") (let ((arg (or arg 1)) (pred (or treesit-sexp-type-regexp 'sexp)) (node-at-point - (treesit-node-at (point) (treesit-language-at (point))))) + (when (null treesit-sexp-type-regexp) + (treesit-node-at (point) (treesit-language-at (point)))))) (or (when (and node-at-point ;; Make sure point is strictly inside node. (< (treesit-node-start node-at-point) @@ -2408,6 +2433,60 @@ by `text' and `sexp' in `treesit-thing-settings'." (treesit-node-start boundary) (treesit-node-end boundary))))))) +(defun treesit-forward-sexp-list (&optional arg) + "Alternative tree-sitter implementation for `forward-sexp-function'. + +Whereas `treesit-forward-sexp' moves across both lists and atoms +using `sexp' in `treesit-thing-settings', this function uses +`sexp-list' in `treesit-thing-settings' to move only across lists. +But to move across atoms (such as symbols or words) inside the list +it uses `forward-sexp-default-function' as long as it doesn't go +outside of the boundaries of the current list. + +ARG is described in the docstring of `forward-sexp-function'." + (interactive "^p") + (let* ((arg (or arg 1)) + (pred 'sexp-list) + (default-pos + (condition-case _ + (save-excursion + (forward-sexp-default-function arg) + (point)) + (scan-error nil))) + (default-pos (unless (eq (point) default-pos) default-pos)) + (sibling-pos + (when default-pos + (save-excursion + (and (if (> arg 0) + (treesit-end-of-thing pred (abs arg) 'restricted) + (treesit-beginning-of-thing pred (abs arg) 'restricted)) + (point))))) + (sibling (when sibling-pos + (if (> arg 0) + (treesit-thing-prev sibling-pos pred) + (treesit-thing-next sibling-pos pred)))) + (sibling (when (and sibling + (if (> arg 0) + (<= (point) (treesit-node-start sibling)) + (>= (point) (treesit-node-end sibling)))) + sibling)) + (current-thing (when default-pos + (treesit-thing-at (point) pred t)))) + + ;; 'forward-sexp-default-function' should not go out of the current thing, + ;; neither go inside the next thing or go over the next thing + (or (when (and default-pos + (or (null current-thing) + (if (> arg 0) + (< default-pos (treesit-node-end current-thing)) + (> default-pos (treesit-node-start current-thing)))) + (or (null sibling) + (if (> arg 0) + (<= default-pos (treesit-node-start sibling)) + (>= default-pos (treesit-node-end sibling))))) + (goto-char default-pos)) + (treesit-forward-list arg)))) + (defun treesit-transpose-sexps (&optional arg) "Tree-sitter `transpose-sexps' function. ARG is the same as in `transpose-sexps'. @@ -2857,7 +2936,9 @@ function is called recursively." (if (eq tactic 'restricted) (setq pos (funcall advance - (cond ((and (null next) (null prev)) parent) + (cond ((and (null next) (null prev) + (not (eq thing 'sexp-list))) + parent) ((> arg 0) next) (t prev)))) ;; For `nested', it's a bit more work: @@ -3254,6 +3335,9 @@ before calling this function." (setq-local forward-sexp-function #'treesit-forward-sexp) (setq-local transpose-sexps-function #'treesit-transpose-sexps)) + (when (treesit-thing-defined-p 'sexp-list nil) + (setq-local forward-sexp-function #'treesit-forward-sexp-list)) + (when (treesit-thing-defined-p 'sentence nil) (setq-local forward-sentence-function #'treesit-forward-sentence)) commit 3281f8615aefc08b47a99eb9761c0b630b053c58 Author: Stefan Kangas Date: Thu Dec 19 04:56:55 2024 +0100 Increase goto-address-fontify-maximum-size The new value is ~4 times larger, and should be more than fine on any reasonably modern machine. Alternatively, the default could be set to t, as requested here: https://lists.gnu.org/r/bug-gnu-emacs/2003-05/msg00114.html * lisp/net/goto-addr.el (goto-address-fontify-maximum-size): Increase default value from 30000 to 128 KiB. diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index 298e11807c8..3e5bc1ec090 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -79,10 +79,12 @@ But only if `goto-address-highlight-p' is also non-nil." "Non-nil means URLs and e-mail addresses in buffer are highlighted." :type 'boolean) -(defcustom goto-address-fontify-maximum-size 30000 - "Maximum size of file in which to fontify and/or highlight URLs. +(defcustom goto-address-fontify-maximum-size (* 128 1024) + "Maximum size of file in which to fontify and/or highlight URLs (in bytes). A value of t means there is no limit--fontify regardless of the size." - :type '(choice (integer :tag "Maximum size") (const :tag "No limit" t))) + :type '(choice (integer :tag "Maximum size") + (const :tag "No limit" t)) + :version "31.1") (defvar goto-address-mail-regexp ;; Actually pretty much any char could appear in the username part. -stef commit ba0c49ed662e1038cfdb34558c775cbcc4f663a7 Author: Stefan Kangas Date: Thu Dec 19 04:50:32 2024 +0100 Prefer defvar-keymap in goto-addr.el * lisp/net/goto-addr.el (goto-address-highlight-keymap): Convert to defvar-keymap. diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index ac36bfe05ce..298e11807c8 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -117,12 +117,10 @@ will have no effect.") thing-at-point-url-path-regexp) "A regular expression probably matching a URL.") -(defvar goto-address-highlight-keymap - (let ((m (make-sparse-keymap))) - (define-key m (kbd "") #'goto-address-at-point) - (define-key m (kbd "C-c RET") #'goto-address-at-point) - m) - "Keymap to hold goto-addr's mouse key defs under highlighted URLs.") +(defvar-keymap goto-address-highlight-keymap + :doc "Keymap to hold goto-addr's mouse key defs under highlighted URLs." + "" #'goto-address-at-point + "C-c RET" #'goto-address-at-point) (defun goto-address-context-menu (menu click) "Populate MENU with `goto-address' commands at CLICK." commit e3d1bab98d3d50375a97808cd1e422231f411c0a Author: Stefan Kangas Date: Thu Dec 19 04:45:21 2024 +0100 Prefer defvar-keymap in filecache.el * lisp/filecache.el (file-cache-completions-keymap): Convert to defvar-keymap. diff --git a/lisp/filecache.el b/lisp/filecache.el index 86d5e65df06..556e6456a03 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el @@ -238,13 +238,11 @@ It is a list of entries of the form (FILENAME DIRNAME1 DIRNAME2 ...) where FILENAME is a file name component and the entry represents N files of names DIRNAME1/FILENAME, DIRNAME2/FILENAME, ...") -(defvar file-cache-completions-keymap - (let ((map (make-sparse-keymap))) - (set-keymap-parent map completion-list-mode-map) - (define-key map [mouse-2] 'file-cache-choose-completion) - (define-key map "\C-m" 'file-cache-choose-completion) - map) - "Keymap for file cache completions buffer.") +(defvar-keymap file-cache-completions-keymap + :doc "Keymap for file cache completions buffer." + :parent completion-list-mode-map + "" #'file-cache-choose-completion + "RET" #'file-cache-choose-completion) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Functions to add files to the cache commit 4415102b573bb776e7f256633626f798b2ab9f28 Author: Stefan Kangas Date: Thu Dec 19 04:21:30 2024 +0100 Delete support for the Conkeror web browser The last release of Conkeror was in 2017. The project has been actively recommending people not to use it since 2019 due to security concerns, and it was removed from Debian in the same year. Emacs's browse-url support for Conkeror has been obsolete since in Emacs 28.1. * lisp/net/browse-url.el (browse-url-conkeror-new-window-is-buffer): (browse-url-conkeror-program, browse-url-conkeror-arguments): Delete variables. (browse-url-conkeror): Delete function. diff --git a/etc/NEWS b/etc/NEWS index c5396b4774c..7d352915114 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -306,6 +306,9 @@ a web browser to load them. For example, it could be used like this: For better integration with the Qutebrowser, set 'browse-url(-secondary)-browser-function' to 'browse-url-qutebrowser'. +*** Support for the Conkeror web browser has been removed. +It has been obsolete since Emacs 28.1. + ** CL-Lib +++ diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index b83a9db61aa..eea7dac2f97 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -403,16 +403,6 @@ If non-nil, then open the URL in a new tab rather than a new window if NEW-WINDOW argument." :type 'boolean) -(defcustom browse-url-conkeror-new-window-is-buffer nil - "Whether to open up new Conkeror windows in a buffer or a new window. -If non-nil, then open the URL in a new buffer rather than a new window if -`browse-url-conkeror' is asked to open it in a new window via the -NEW-WINDOW argument." - :version "25.1" - :type 'boolean) - -(make-obsolete-variable 'browse-url-conkeror-new-window-is-buffer nil "28.1") - (defcustom browse-url-epiphany-new-window-is-tab nil "Whether to open up new Epiphany windows in a tab or a new window. If non-nil, then open the URL in a new tab rather than a new window if @@ -434,20 +424,6 @@ Passing an interactive argument to \\[browse-url], or specific browser commands reverses the effect of this variable." :type 'boolean) -(defcustom browse-url-conkeror-program "conkeror" - "The name by which to invoke Conkeror." - :type 'string - :version "25.1") - -(make-obsolete-variable 'browse-url-conkeror-program nil "28.1") - -(defcustom browse-url-conkeror-arguments nil - "A list of strings to pass to Conkeror as arguments." - :version "25.1" - :type '(repeat (string :tag "Argument"))) - -(make-obsolete-variable 'browse-url-conkeror-arguments nil "28.1") - (defcustom browse-url-filename-alist `(("^/\\(ftp@\\|anonymous@\\)?\\([^:/]+\\):/*" . "ftp://\\2/") ;; The above loses the username to avoid the browser prompting for @@ -1504,46 +1480,6 @@ used instead of `browse-url-new-window-flag'." (function-put 'browse-url-gnome-moz 'browse-url-browser-kind 'external) -;; --- Conkeror --- -;;;###autoload -(defun browse-url-conkeror (url &optional new-window) - "Ask the Conkeror WWW browser to load URL. -Default to the URL around or before point. Also pass the strings -in the variable `browse-url-conkeror-arguments' to Conkeror. - -When called interactively, if variable -`browse-url-new-window-flag' is non-nil, load the document in a -new Conkeror window, otherwise use a random existing one. A -non-nil interactive prefix argument reverses the effect of -`browse-url-new-window-flag'. - -If variable `browse-url-conkeror-new-window-is-buffer' is -non-nil, then whenever a document would otherwise be loaded in a -new window, load it in a new buffer in an existing window instead. - -When called non-interactively, use optional second argument -NEW-WINDOW instead of `browse-url-new-window-flag'." - (declare (obsolete nil "28.1")) - (interactive (browse-url-interactive-arg "URL: ")) - (setq url (browse-url-encode-url url)) - (let* ((process-environment (browse-url-process-environment))) - (apply #'start-process (format "conkeror %s" url) - nil - browse-url-conkeror-program - (append - browse-url-conkeror-arguments - (list - "-e" - (format "load_url_in_new_%s('%s')" - (if (browse-url-maybe-new-window new-window) - (if browse-url-conkeror-new-window-is-buffer - "buffer" - "window") - "buffer") - url)))))) - -(function-put 'browse-url-conkeror 'browse-url-browser-kind 'external) - ;; --- W3 --- ;; External. commit cd7e462ea31491d93d5e781ec0343c37e024bea7 Author: Stefan Kangas Date: Thu Dec 19 01:33:56 2024 +0100 ; Fix more obsoletion warnings * lisp/progmodes/cc-awk.el (awk-font-lock-keywords): * lisp/progmodes/cc-fonts.el (c-basic-matchers-before): * lisp/progmodes/csharp-mode.el (c-basic-matchers-before): Use faces instead of variables to silence an obsoletion warning. (Bug#71469) diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index b71442c4751..a40999e6334 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el @@ -966,11 +966,11 @@ ;; Function declarations. `(,(c-make-font-lock-search-function "^\\s *\\(func\\(tion\\)?\\)\\s +\\(\\(\\sw+\\(::\\sw+\\)?\\)\\s *\\)?\\(([^()]*)\\)?" - '(1 font-lock-keyword-face t) + '(1 'font-lock-keyword-face t) ;; We can't use LAXMATCH in `c-make-font-lock-search-function', so.... '((when (match-beginning 4) (c-put-font-lock-face - (match-beginning 4) (match-end 4) font-lock-function-name-face) + (match-beginning 4) (match-end 4) 'font-lock-function-name-face) nil)) ;; Put warning face on any use of :: inside the parens. '((when (match-beginning 6) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index b18561667f8..b2752bddf43 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -898,7 +898,7 @@ casts and declarations are fontified. Used on level 2 and higher." (c-lang-const c-simple-ws) "*" "=\\(?:[^=]\\|$\\)") `((,(+ 1 (c-lang-const c-simple-ws-depth)) - font-lock-type-face t))))))))) + 'font-lock-type-face t))))))))) ;; Fontify the special declarations in Objective-C. ,@(when (c-major-mode-is 'objc-mode) diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el index 0438a25242b..4cc59cc0052 100644 --- a/lisp/progmodes/csharp-mode.el +++ b/lisp/progmodes/csharp-mode.el @@ -335,7 +335,7 @@ ;; Chained identifiers in using/namespace statements ,`(,(c-make-font-lock-search-function csharp--regex-using-or-namespace - `((csharp--color-forwards font-lock-variable-name-face) + `((csharp--color-forwards 'font-lock-variable-name-face) nil (goto-char (match-end 0))))) @@ -348,7 +348,7 @@ ;; Single identifier in attribute (eval . (list (concat "\\[" csharp--regex-type-name-matcher "\\][^;]") - 1 font-lock-variable-name-face t)) + 1 'font-lock-variable-name-face t)) ;; Function names (eval . (list "\\([A-Za-z0-9_]+\\)\\(<[a-zA-Z0-9, ]+>\\)?(" @@ -361,7 +361,7 @@ (eval . (list (concat "\\ *( *" csharp--regex-identifier-matcher " *) *") - 1 font-lock-variable-name-face)) + 1 'font-lock-variable-name-face)) ;; Catch statements with type only (eval . (list (concat "\\ *( *" commit 807b6172524a7b4f3fe19bc22a06afd48cc57b71 Author: Eli Zaretskii Date: Wed Dec 18 21:16:07 2024 +0200 Avoid MinGW compilation warning in lib/ * nt/mingw-cfg.site (ac_cv_func_malloc_0_nonnull) (gl_cv_malloc_ptrdiff, gl_cv_func_malloc_posix): * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_malloc-gnu): Set to avoid compiling lib/malloc.c, which is not needed and causes a compilation warning. diff --git a/nt/gnulib-cfg.mk b/nt/gnulib-cfg.mk index 048f812724a..c18a1d8e470 100644 --- a/nt/gnulib-cfg.mk +++ b/nt/gnulib-cfg.mk @@ -63,6 +63,7 @@ OMIT_GNULIB_MODULE_getdelim = true OMIT_GNULIB_MODULE_getline = true OMIT_GNULIB_MODULE_inttypes-incomplete = true OMIT_GNULIB_MODULE_lchmod = true +OMIT_GNULIB_MODULE_malloc-gnu = true OMIT_GNULIB_MODULE_malloc-posix = true OMIT_GNULIB_MODULE_nanosleep = true OMIT_GNULIB_MODULE_nproc = true diff --git a/nt/mingw-cfg.site b/nt/mingw-cfg.site index 9962cc46642..16b61de3bd0 100644 --- a/nt/mingw-cfg.site +++ b/nt/mingw-cfg.site @@ -167,6 +167,11 @@ ac_cv_func_strsignal=no # implementation of 'free' doesn't touch errno, and it emits a # compilation warning. gl_cv_func_free_preserves_errno=yes +# Don't build the Gnulib malloc.c: it is not needed, and it emits a +# compilation warning. +ac_cv_func_malloc_0_nonnull=yes +gl_cv_malloc_ptrdiff=yes +gl_cv_func_malloc_posix=yes # Don't build the Gnulib nanosleep module: it requires W2K or later, # and MinGW does have nanosleep. gl_cv_func_nanosleep=yes commit 4af978d650762f28e9089fa4d8fc9b85d4420763 Author: Michael Albinus Date: Wed Dec 18 11:53:52 2024 +0100 ; * etc/NEWS: Fix typos. Remove also text left over from NEWS.30. diff --git a/etc/NEWS b/etc/NEWS index 7529778378d..c5396b4774c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -31,13 +31,6 @@ host system supports SSE2) or '-fno-tree-sra' (if not). These GCC options work around GCC bug 58416, which can cause Emacs to behave incorrectly in rare cases. ---- -** New configuration option '--disable-gc-mark-trace'. -This disables the GC mark trace buffer for about 5% better garbage -collection performance. Doing so may make it more difficult for Emacs -developers to help finding GC-related bugs that you run into, which is -why the mark trace buffer is enabled by default. - * Startup Changes in Emacs 31.1 @@ -52,13 +45,14 @@ enabled, you can disable mouse tracking by putting '(xterm-mouse-mode +++ ** Several font-lock face variables are now obsolete. -The following variables are now obsolete: font-lock-comment-face, -font-lock-comment-delimiter-face, font-lock-string-face, -font-lock-doc-face, font-lock-doc-markup-face, font-lock-keyword-face, -font-lock-builtin-face, font-lock-function-name-face, -font-lock-variable-name-face, font-lock-type-face, -font-lock-constant-face, font-lock-warning-face, -font-lock-negation-char-face, and font-lock-preprocessor-face. +The following variables are now obsolete: 'font-lock-builtin-face', +'font-lock-comment-delimiter-face', 'font-lock-comment-face', +'font-lock-constant-face', 'font-lock-doc-face', +'font-lock-doc-markup-face', 'font-lock-function-name-face', +'font-lock-keyword-face', 'font-lock-negation-char-face', +'font-lock-preprocessor-face', 'font-lock-string-face', +'font-lock-type-face', 'font-lock-variable-name-face', and +'font-lock-warning-face'. These variables contributed both to confusion about the relation between faces and variables, and to inconsistency when major mode authors used @@ -91,36 +85,6 @@ The 'find-function', 'find-library', 'find-face-definition', and 'find-variable' commands now allow retrieving previous input using the usual minibuffer history commands. Each command has a separate history. -Loading a Tree-Sitter mode (such as by using 'M-x load-library' or with -'M-x load-file') by default causes the corresponding non-Tree-Sitter -mode be remapped to the Tree-Sitter mode. This remapping affects -visiting files for which 'auto-mode-alist' specifies a non-Tree-Sitter -mode, and also affects mode-specification cookies on the first line of a -file and mode specifications in file- and directory-local variables. To -revert to using a non-Tree-Sitter mode, reload the corresponding mode -file anew. To prevent file loading from turning on Tree-Sitter mode -when 'auto-mode-alist' or the file/directory-local variables specify a -non-Tree-Sitter mode, customize the user option 'major-mode-remap-alist' -to specify that a non-Tree-Sitter mode is "remapped" to itself. For -example: - - (add-to-list 'major-mode-remap-alist '(c-mode)) - -specifies that C Mode should not be remapped to 'c-ts-mode' even if and -when 'c-ts-mode' is loaded. Conversely, - - (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode)) - -tells Emacs to always invoke 'c-ts-mode' whenever 'c-mode' is -requested, either by 'auto-mode-alist' or by file/directory-local -variables. - -We recommend using 'major-mode-remap-alist' to express your preferences -for using Tree-Sitter or non-Tree-Sitter modes for files for which both -variants of major modes are available, because that variable overrides -the remapping Emacs might decide to perform as result of loading Lisp -files and features. - --- ** New minor mode 'find-function-mode' replaces 'find-function-setup-keys'. @@ -128,13 +92,13 @@ files and features. +++ *** New user option 'completion-eager-display'. -This option configures whether completion commands should display -the *Completions* buffer immediately. When the variable is set to t all -completion commands show *Completions* immediately, respectively nil +This option configures whether completion commands should display the +"*Completions*" buffer immediately. When the option is set to t, all +completion commands show "*Completions*" immediately, respectively nil disables the eager display for all commands. The default setting auto enables eager completion only if requested by the command. -For more fine-grained control you can also toggle this feature -by category using the symbol 'eager-display' in the user option +For more fine-grained control you can also toggle this feature by +category using the symbol 'eager-display' in the user option 'completion-category-overrides'. +++ @@ -158,12 +122,12 @@ applies for the styles configuration in 'completion-category-overrides' and 'completion-category-defaults'. --- -*** Selected completion candidate is preserved across *Completions* updates. -When point is on a completion candidate in the *Completions* buffer +*** Selected completion candidate is preserved across "*Completions*" updates. +When point is on a completion candidate in the "*Completions*" buffer (because of 'minibuffer-next-completion' or for any other reason), point -will still be on that candidate after *Completions* is updated with a +will still be on that candidate after "*Completions*" is updated with a new list of completions. The candidate is automatically deselected when -the *Completions* buffer is hidden. +the "*Completions*" buffer is hidden. ** Windows @@ -334,6 +298,7 @@ modal editing packages. *** New user option 'browse-url-transform-alist'. This user option is an alist that allows transforming URLs before asking a web browser to load them. For example, it could be used like this: + (add-to-list 'browse-url-transform-alist '("www.google.com" . "www.duckduckgo.com")) @@ -342,8 +307,9 @@ For better integration with the Qutebrowser, set 'browse-url(-secondary)-browser-function' to 'browse-url-qutebrowser'. ** CL-Lib + +++ -*** 'cl-labels' now also accepts (FUNC EXP) bindings, like 'cl-flet'. +*** 'cl-labels' now also accepts '(FUNC EXP)' bindings, like 'cl-flet'. Such bindings make it possible to compute which function to bind to FUNC. ** Whitespace @@ -456,7 +422,7 @@ your configuration: #'eshell-next-matching-input)) +++ -*** New user option 'eshell-history-isearch' +*** New user option 'eshell-history-isearch'. When 'eshell-history-isearch' is nil (the default), Isearch commands search in the buffer contents. If you customize it to t, those commands only search in input history. If you customize it to the symbol 'dwim', @@ -832,9 +798,9 @@ of seconds. Crossfading can be toggled using the command --- *** New command 'mpc-describe-song'. This command displays information about the currently playing song or -song at point in the MPC-Songs buffer. The list of tags to display can -be customized using the new user option 'mpc-song-viewer-tags' and the -appearance of the list with the new faces 'mpc-song-viewer-tag', +song at point in the "*MPC-Songs*" buffer. The list of tags to display +can be customized using the new user option 'mpc-song-viewer-tags' and +the appearance of the list with the new faces 'mpc-song-viewer-tag', 'mpc-song-viewer-value', and 'mpc-song-viewer-empty'. ** VC @@ -883,10 +849,10 @@ The commands that jump to some location use 'display-buffer' and specify the category 'xref-jump'. As a result, you can customize how the destination window is chosen using 'display-buffer-alist'. Example: - (setq display-buffer-alist '(((category . xref-jump) - (display-buffer-reuse-window - display-buffer-use-some-window) - (some-window . mru)))) + (setq display-buffer-alist '(((category . xref-jump) + (display-buffer-reuse-window + display-buffer-use-some-window) + (some-window . mru)))) * New Modes and Packages in Emacs 31.1 @@ -1034,10 +1000,10 @@ conventions. +++ ** 'make-vtable' can create an empty vtable. It is now possible to create a vtable without data, by leaving the -':objects' list empty, or by providing a ':objects-function' that +':objects' list empty, or by providing an ':objects-function' that (initially) produces no data. In such a case, it is necessary to provide a ':columns' spec, so that the number of columns and their -widths can be determined. Columns widths can be set explicitly, or they +widths can be determined. Column widths can be set explicitly, or they will be calculated based on the window width. +++ @@ -1052,7 +1018,7 @@ only continue the active repeating sequence. It offers a more concise way to create a completion table with metadata. +++ -** 'all-completions' and 'unintern' no longer support their old calling conventions. +** 'all-completions' and 'unintern' no longer support old calling conventions. * Changes in Emacs 31.1 on Non-Free Operating Systems commit a20f4c7ce192082caf0da5de5b8ab5b4d28c44d3 Author: Michael Albinus Date: Wed Dec 18 11:53:27 2024 +0100 Fix string used in recent obsolete variables spec * lisp/font-lock.el (font-lock-comment-face) (font-lock-comment-delimiter-face, font-lock-string-face) (font-lock-doc-face, font-lock-doc-markup-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face) (font-lock-warning-face, font-lock-negation-char-face) (font-lock-preprocessor-face): Don't quote the apostrophe in the CURRENT-NAME argument of `make-obsolete-variable', it isn't expanded by `substitute-command-keys'. diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 4c519ede88a..8103131315e 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -309,86 +309,86 @@ If a number, only buffers greater than this size have fontification messages." (make-obsolete-variable 'font-lock-comment-face - "use the quoted symbol instead: \\='font-lock-comment-face" "31.1") + "use the quoted symbol instead: 'font-lock-comment-face" "31.1") (defvar font-lock-comment-face 'font-lock-comment-face "Face name to use for comments.") (make-obsolete-variable 'font-lock-comment-delimiter-face - "use the quoted symbol instead: \\='font-lock-comment-delimiter-face" "31.1") + "use the quoted symbol instead: 'font-lock-comment-delimiter-face" "31.1") (defvar font-lock-comment-delimiter-face 'font-lock-comment-delimiter-face "Face name to use for comment delimiters.") (make-obsolete-variable 'font-lock-string-face - "use the quoted symbol instead: \\='font-lock-string-face" "31.1") + "use the quoted symbol instead: 'font-lock-string-face" "31.1") (defvar font-lock-string-face 'font-lock-string-face "Face name to use for strings.") (make-obsolete-variable 'font-lock-doc-face - "use the quoted symbol instead: \\='font-lock-doc-face" "31.1") + "use the quoted symbol instead: 'font-lock-doc-face" "31.1") (defvar font-lock-doc-face 'font-lock-doc-face "Face name to use for documentation.") (make-obsolete-variable 'font-lock-doc-markup-face - "use the quoted symbol instead: \\='font-lock-doc-markup-face" "31.1") + "use the quoted symbol instead: 'font-lock-doc-markup-face" "31.1") (defvar font-lock-doc-markup-face 'font-lock-doc-markup-face "Face name to use for documentation mark-up.") (make-obsolete-variable 'font-lock-keyword-face - "use the quoted symbol instead: \\='font-lock-keyword-face" "31.1") + "use the quoted symbol instead: 'font-lock-keyword-face" "31.1") (defvar font-lock-keyword-face 'font-lock-keyword-face "Face name to use for keywords.") (make-obsolete-variable 'font-lock-builtin-face - "use the quoted symbol instead: \\='font-lock-builtin-face" "31.1") + "use the quoted symbol instead: 'font-lock-builtin-face" "31.1") (defvar font-lock-builtin-face 'font-lock-builtin-face "Face name to use for builtins.") (make-obsolete-variable 'font-lock-function-name-face - "use the quoted symbol instead: \\='font-lock-function-name-face" "31.1") + "use the quoted symbol instead: 'font-lock-function-name-face" "31.1") (defvar font-lock-function-name-face 'font-lock-function-name-face "Face name to use for function names.") (make-obsolete-variable 'font-lock-variable-name-face - "use the quoted symbol instead: \\='font-lock-variable-name-face" "31.1") + "use the quoted symbol instead: 'font-lock-variable-name-face" "31.1") (defvar font-lock-variable-name-face 'font-lock-variable-name-face "Face name to use for variable names.") (make-obsolete-variable 'font-lock-type-face - "use the quoted symbol instead: \\='font-lock-type-face" "31.1") + "use the quoted symbol instead: 'font-lock-type-face" "31.1") (defvar font-lock-type-face 'font-lock-type-face "Face name to use for type and class names.") (make-obsolete-variable 'font-lock-constant-face - "use the quoted symbol instead: \\='font-lock-constant-face" "31.1") + "use the quoted symbol instead: 'font-lock-constant-face" "31.1") (defvar font-lock-constant-face 'font-lock-constant-face "Face name to use for constant and label names.") (make-obsolete-variable 'font-lock-warning-face - "use the quoted symbol instead: \\='font-lock-warning-face" "31.1") + "use the quoted symbol instead: 'font-lock-warning-face" "31.1") (defvar font-lock-warning-face 'font-lock-warning-face "Face name to use for things that should stand out.") (make-obsolete-variable 'font-lock-negation-char-face - "use the quoted symbol instead: \\='font-lock-negation-char-face" "31.1") + "use the quoted symbol instead: 'font-lock-negation-char-face" "31.1") (defvar font-lock-negation-char-face 'font-lock-negation-char-face "Face name to use for easy to overlook negation. This can be an \"!\" or the \"n\" in \"ifndef\".") (make-obsolete-variable 'font-lock-preprocessor-face - "use the quoted symbol instead: \\='font-lock-preprocessor-face" "31.1") + "use the quoted symbol instead: 'font-lock-preprocessor-face" "31.1") (defvar font-lock-preprocessor-face 'font-lock-preprocessor-face "Face name to use for preprocessor directives.")