commit 20fd47e741342e160d774ae6afee7182bba0de65 (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Wed Nov 19 11:18:13 2025 -0800 Fix mis-declarations of non-const functions Problem for mpz_get_d_rounded reported by Helmut Eller in: https://lists.gnu.org/r/emacs-devel/2025-11/msg00795.html * lib-src/make-docfile.c (DEFUN_pure): New constant. (write_globals, scan_c_stream): Support "attributes: pure". * src/bignum.h (mpz_get_d_rounded): * src/data.c (Fsymbolp, Fmodule_function_p, Fintegerp, Fnumberp): * src/lisp.h (bignum_to_double, bignum_to_intmax) (bignum_to_uintmax, bignum_bufsize): Now pure, not const, since they depend on current state. For example, Fsymbolp now inspects symbols_with_pos_enabled, and the bignum functions inspect bignum contents in memory. * src/data.c (Feq): * src/xfaces.c (Fface_attribute_relative_p): No longer const, since they might abort when debugging. * src/pdumper.h (pdumper_object_p, pdumper_cold_object_p) (pdumper_find_object_type, pdumper_object_p_precise): These are not const functions. But there is no need to declare them to be pure, either, as they’re inline so the compiler can figure it out. diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 6243f666955..d0ea463f299 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -577,7 +577,13 @@ struct global }; /* Bit values for FLAGS field from the above. Applied for DEFUNs only. */ -enum { DEFUN_noreturn = 1, DEFUN_const = 2, DEFUN_noinline = 4 }; +enum + { + DEFUN_noreturn = 1, + DEFUN_const = 2, + DEFUN_noinline = 4, + DEFUN_pure = 8, + }; /* All the variable names we saw while scanning C sources in `-g' mode. */ @@ -752,6 +758,8 @@ write_globals (void) fputs (" ATTRIBUTE_COLD", stdout); if (globals[i].flags & DEFUN_const) fputs (" ATTRIBUTE_CONST", stdout); + if (globals[i].flags & DEFUN_pure) + fputs (" ATTRIBUTE_PURE", stdout); puts (";"); } @@ -1062,7 +1070,7 @@ scan_c_stream (FILE *infile) attributes: attribute1 attribute2 ...) (Lisp_Object arg...) - Now only `const', `noinline' and `noreturn' attributes + Now only 'const', 'noinline', 'noreturn', and 'pure' attributes are used. */ /* Advance to the end of docstring. */ @@ -1110,6 +1118,8 @@ scan_c_stream (FILE *infile) g->flags |= DEFUN_noreturn; if (strstr (input_buffer, "const")) g->flags |= DEFUN_const; + if (strstr (input_buffer, "pure")) + g->flags |= DEFUN_pure; /* Although the noinline attribute is no longer used, leave its support in, in case it's needed later. */ diff --git a/src/bignum.h b/src/bignum.h index 5693aae148a..132fa31f0f5 100644 --- a/src/bignum.h +++ b/src/bignum.h @@ -56,7 +56,7 @@ extern void emacs_mpz_mul_2exp (mpz_t, mpz_t const, EMACS_INT) ARG_NONNULL ((1, 2)); extern void emacs_mpz_pow_ui (mpz_t, mpz_t const, unsigned long) ARG_NONNULL ((1, 2)); -extern double mpz_get_d_rounded (mpz_t const) ATTRIBUTE_CONST; +extern double mpz_get_d_rounded (mpz_t const) ATTRIBUTE_PURE; extern Lisp_Object get_random_bignum (struct Lisp_Bignum const *); INLINE_HEADER_BEGIN diff --git a/src/data.c b/src/data.c index 333d908aedc..c619b8eb4ef 100644 --- a/src/data.c +++ b/src/data.c @@ -166,8 +166,7 @@ slow_eq (Lisp_Object x, Lisp_Object y) } DEFUN ("eq", Feq, Seq, 2, 2, 0, - doc: /* Return t if the two args are the same Lisp object. */ - attributes: const) + doc: /* Return t if the two args are the same Lisp object. */) (Lisp_Object obj1, Lisp_Object obj2) { if (EQ (obj1, obj2)) @@ -373,7 +372,7 @@ Ignore `symbols-with-pos-enabled'. */ DEFUN ("symbolp", Fsymbolp, Ssymbolp, 1, 1, 0, doc: /* Return t if OBJECT is a symbol. */ - attributes: const) + attributes: pure) (Lisp_Object object) { if (SYMBOLP (object)) @@ -551,7 +550,7 @@ DEFUN ("interpreted-function-p", Finterpreted_function_p, DEFUN ("module-function-p", Fmodule_function_p, Smodule_function_p, 1, 1, NULL, doc: /* Return t if OBJECT is a function loaded from a dynamic module. */ - attributes: const) + attributes: pure) (Lisp_Object object) { return MODULE_FUNCTIONP (object) ? Qt : Qnil; @@ -569,7 +568,7 @@ DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0, DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, doc: /* Return t if OBJECT is an integer. */ - attributes: const) + attributes: pure) (Lisp_Object object) { if (INTEGERP (object)) @@ -598,7 +597,7 @@ DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, doc: /* Return t if OBJECT is a number (floating point or integer). */ - attributes: const) + attributes: pure) (Lisp_Object object) { if (NUMBERP (object)) diff --git a/src/lisp.h b/src/lisp.h index eb1aa437dba..fe8e2aaea72 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -619,7 +619,7 @@ INLINE void set_sub_char_table_contents (Lisp_Object, ptrdiff_t, /* Defined in bignum.c. */ extern int check_int_nonnegative (Lisp_Object); extern intmax_t check_integer_range (Lisp_Object, intmax_t, intmax_t); -extern double bignum_to_double (Lisp_Object) ATTRIBUTE_CONST; +extern double bignum_to_double (Lisp_Object) ATTRIBUTE_PURE; extern Lisp_Object make_bigint (intmax_t); extern Lisp_Object make_biguint (uintmax_t); extern uintmax_t check_uinteger_max (Lisp_Object, uintmax_t); @@ -4105,9 +4105,9 @@ set_sub_char_table_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val) /* Defined in bignum.c. This part of bignum.c's API does not require the caller to access bignum internals; see bignum.h for that. */ -extern intmax_t bignum_to_intmax (Lisp_Object) ATTRIBUTE_CONST; -extern uintmax_t bignum_to_uintmax (Lisp_Object) ATTRIBUTE_CONST; -extern ptrdiff_t bignum_bufsize (Lisp_Object, int) ATTRIBUTE_CONST; +extern intmax_t bignum_to_intmax (Lisp_Object) ATTRIBUTE_PURE; +extern uintmax_t bignum_to_uintmax (Lisp_Object) ATTRIBUTE_PURE; +extern ptrdiff_t bignum_bufsize (Lisp_Object, int) ATTRIBUTE_PURE; extern ptrdiff_t bignum_to_c_string (char *, ptrdiff_t, Lisp_Object, int); extern Lisp_Object bignum_to_string (Lisp_Object, int); extern Lisp_Object make_bignum_str (char const *, int); diff --git a/src/pdumper.h b/src/pdumper.h index fa402942e98..7ec04da5494 100644 --- a/src/pdumper.h +++ b/src/pdumper.h @@ -158,7 +158,7 @@ extern struct pdumper_loaded_dump dump_public; /* Return whether the OBJ points somewhere into the loaded dump image. Works even when we have no dump loaded --- in this case, it just returns false. */ -INLINE _GL_ATTRIBUTE_CONST bool +INLINE bool pdumper_object_p (const void *obj) { #ifdef HAVE_PDUMPER @@ -176,7 +176,7 @@ extern bool pdumper_cold_object_p_impl (const void *obj); Only bool-vectors and floats should end up there. pdumper_object_p() and pdumper_object_p_precise() must have returned true for OBJ before calling this function. */ -INLINE _GL_ATTRIBUTE_CONST bool +INLINE bool pdumper_cold_object_p (const void *obj) { #ifdef HAVE_PDUMPER @@ -193,7 +193,7 @@ extern int pdumper_find_object_type_impl (const void *obj); /* Return the type of the dumped object that starts at OBJ. It is a programming error to call this routine for an OBJ for which pdumper_object_p would return false. */ -INLINE _GL_ATTRIBUTE_CONST int +INLINE int pdumper_find_object_type (const void *obj) { #ifdef HAVE_PDUMPER @@ -216,7 +216,7 @@ pdumper_valid_object_type_p (int type) the loaded dump image. It is a programming error to call this routine for an OBJ for which pdumper_object_p would return false. */ -INLINE _GL_ATTRIBUTE_CONST bool +INLINE bool pdumper_object_p_precise (const void *obj) { #ifdef HAVE_PDUMPER diff --git a/src/xfaces.c b/src/xfaces.c index 6189337ff68..83d4c3f1f2c 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -4194,8 +4194,7 @@ with the value VALUE is relative. A relative value is one that doesn't entirely override whatever is inherited from another face. For most possible attributes, the only relative value that users see is `unspecified'. -However, for :height, floating point values are also relative. */ - attributes: const) +However, for :height, floating point values are also relative. */) (Lisp_Object attribute, Lisp_Object value) { if (EQ (value, Qunspecified) || (EQ (value, QCignore_defface))) commit a1f36dc3b852494d6d4c2a2a949153a2dac86f2d Author: Eli Zaretskii Date: Wed Nov 19 17:32:21 2025 +0200 ; * admin/authors.el (authors-aliases): Update. diff --git a/admin/authors.el b/admin/authors.el index 66346b46091..abb4acb4324 100644 --- a/admin/authors.el +++ b/admin/authors.el @@ -305,6 +305,7 @@ files.") ("Yilkal Argaw" "yilkalargaw" "yilkalargawworkneh@gmail\\.com") ("Yoni Rabkin" "Yoni Rabkin Katzenell") ("Yoshinori Koseki" "KOSEKI Yoshinori" "小関 吉則") + ("Yuhei Kikuchi" "8\\.slashes@gmail\\.com") ("Yuzhana Ego" "YugaEgo" "yet@ego\\.team") ("Yutaka NIIBE" "NIIBE Yutaka") (nil "stardiviner") commit 784d5b4954f7162c45ff7c265b11a30c1f260b8d Author: Spencer Baugh Date: Thu Jun 19 17:20:12 2025 -0400 Fix implicit usage of the current window-width in vtable.el Previously, many functions in vtable.el called 'vtable--cache', which computed 'vtable--cache-key' based on the current selected window and frame; this could cause vtable functions to fail or misbehave if they were not called from the selected window and frame that 'vtable-insert' was last called in. Now, the vtable cache is stored with the text of the vtable, so that functions which need to interact with some vtable text can do so reliably without having to use the same selected window and frame. Also, 'vtable-update-object' has always required TABLE to be present at point in the current buffer; now its docstring states this. * lisp/emacs-lisp/vtable.el (vtable--current-cache) (vtable--cache-widths, vtable--cache-lines): Add. (vtable-insert): Save cache in 'vtable-cache. (vtable--ensure-cache, vtable--recompute-cache): Inline into 'vtable-insert'. (vtable--widths, vtable--cache): Delete. (vtable-update-object): Use 'vtable--current-cache' and update docstring. (Bug#69837) (vtable-remove-object, vtable-insert-object): Use 'vtable--current-cache' and save cache in 'vtable-cache'. (vtable--sort, vtable--alter-column-width) (vtable-previous-column, vtable-next-column): Use 'vtable--current-cache'. diff --git a/lisp/emacs-lisp/vtable.el b/lisp/emacs-lisp/vtable.el index 00785113edb..bcdd280fb92 100644 --- a/lisp/emacs-lisp/vtable.el +++ b/lisp/emacs-lisp/vtable.el @@ -282,10 +282,9 @@ If it can't be found, return nil and don't move point." "Update OBJECT's representation in TABLE. If OLD-OBJECT is non-nil, replace OLD-OBJECT with OBJECT and display it. In either case, if the existing object is not found in the table (being -compared with `equal'), signal an error. Note a limitation: if TABLE's -buffer is not in a visible window, or if its window has changed width -since it was updated, updating the TABLE is not possible, and an error -is signaled." +compared with `equal'), signal an error. + +TABLE must be at point in the current buffer." (unless old-object (setq old-object object)) (let* ((objects (vtable-objects table)) @@ -299,17 +298,16 @@ is signaled." (while (and (cdr objects) (not (eq (cadr objects) old-object))) (setq objects (cdr objects))) - (unless objects + (unless (cdr objects) (error "Can't find the old object")) (setcar (cdr objects) object)) - ;; Then update the cache... - ;; FIXME: If the table's buffer has no visible window, or if its - ;; width has changed since the table was updated, the cache key will - ;; not match and the object can't be updated. (Bug #69837). - (if-let* ((line-number (seq-position (car (vtable--cache table)) old-object - (lambda (a b) - (equal (car a) b)))) - (line (elt (car (vtable--cache table)) line-number))) + ;; Then update the rendered vtable in the current buffer. + (if-let* ((cache (vtable--current-cache)) + (line-number (seq-position (vtable--cache-lines cache) + old-object + (lambda (a b) + (equal (car a) b)))) + (line (elt (vtable--cache-lines cache) line-number))) (progn (setcar line object) (setcdr line (vtable--compute-cached-line table object)) @@ -320,10 +318,11 @@ is signaled." (start (point))) (delete-line) (vtable--insert-line table line line-number - (nth 1 (vtable--cache table)) + (vtable--cache-widths cache) (vtable--spacer table)) (add-text-properties start (point) (list 'keymap keymap - 'vtable table)))) + 'vtable table + 'vtable-cache cache)))) ;; We may have inserted a non-numerical value into a previously ;; all-numerical table, so recompute. (vtable--recompute-numerical table (cdr line))) @@ -335,11 +334,12 @@ This will also remove the displayed line." ;; First remove from the objects. (setf (vtable-objects table) (delq object (vtable-objects table))) ;; Then adjust the cache and display. - (let ((cache (vtable--cache table)) - (inhibit-read-only t)) - (setcar cache (delq (assq object (car cache)) (car cache))) - (save-excursion - (vtable-goto-table table) + (save-excursion + (vtable-goto-table table) + (let ((cache (vtable--current-cache)) + (inhibit-read-only t)) + (setcar cache (delq (assq object (vtable--cache-lines cache)) + (vtable--cache-lines cache))) (when (vtable-goto-object object) (delete-line))))) @@ -400,7 +400,7 @@ This also updates the displayed table." ;; Then adjust the cache and display. (save-excursion (vtable-goto-table table) - (let* ((cache (vtable--cache table)) + (let* ((cache (vtable--current-cache)) (inhibit-read-only t) (keymap (get-text-property (point) 'keymap)) (ellipsis (if (vtable-ellipsis table) @@ -408,13 +408,14 @@ This also updates the displayed table." 'face (vtable-face table)) "")) (ellipsis-width (string-pixel-width ellipsis)) + (lines (vtable--cache-lines cache)) (elem (if location ; This binding mirrors the binding of `pos' above. (if (integerp location) - (nth location (car cache)) - (or (assq location (car cache)) - (and before (caar cache)))) - (if before (caar cache)))) - (pos (memq elem (car cache))) + (nth location lines) + (or (assq location lines) + (and before (car lines)))) + (if before (car lines)))) + (pos (memq elem lines)) (line (cons object (vtable--compute-cached-line table object)))) (if (or before (and pos (integerp location))) @@ -433,16 +434,17 @@ This also updates the displayed table." (forward-line 1) ; Insert *after*. (vtable-end-of-table))) ;; Otherwise, append the object. - (setcar cache (nconc (car cache) (list line))) + (setcar cache (nconc lines (list line))) (vtable-end-of-table))) (let ((start (point))) ;; FIXME: We have to adjust colors in lines below this if we ;; have :row-colors. (vtable--insert-line table line 0 - (nth 1 cache) (vtable--spacer table) + (vtable--cache-widths cache) (vtable--spacer table) ellipsis ellipsis-width) (add-text-properties start (point) (list 'keymap keymap - 'vtable table))) + 'vtable table + 'vtable-cache cache))) ;; We may have inserted a non-numerical value into a previously ;; all-numerical table, so recompute. (vtable--recompute-numerical table (cdr line)))))) @@ -512,15 +514,11 @@ recompute the column specs when the table data has changed." (defun vtable--spacer (table) (vtable--compute-width table (vtable-separator-width table))) -(defun vtable--recompute-cache (table) - (let* ((data (vtable--compute-cache table)) - (widths (vtable--compute-widths table data))) - (setf (gethash (vtable--cache-key) (slot-value table '-cache)) - (list data widths)))) +(defun vtable--cache-widths (cache) + (nth 1 cache)) -(defun vtable--ensure-cache (table) - (or (vtable--cache table) - (vtable--recompute-cache table))) +(defun vtable--cache-lines (cache) + (car cache)) (defun vtable-insert (table) (let* ((spacer (vtable--spacer table)) @@ -533,7 +531,12 @@ recompute the column specs when the table data has changed." ;; We maintain a cache per screen/window width, so that we render ;; correctly if Emacs is open on two different screens (or the ;; user resizes the frame). - (widths (nth 1 (vtable--ensure-cache table)))) + (cache (or (gethash (vtable--cache-key) (slot-value table '-cache)) + (let* ((data (vtable--compute-cache table)) + (widths (vtable--compute-widths table data))) + (setf (gethash (vtable--cache-key) (slot-value table '-cache)) + (list data widths))))) + (widths (vtable--cache-widths cache))) ;; Don't insert any header or header line if the user hasn't ;; specified the columns. (when (slot-value table '-has-column-spec) @@ -546,18 +549,20 @@ recompute the column specs when the table data has changed." (add-text-properties start (point) (list 'keymap vtable-header-line-map 'rear-nonsticky t - 'vtable table)) + 'vtable table + 'vtable-cache cache)) (setq start (point)))) - (vtable--sort table) + (vtable--sort table cache) ;; Insert the data. (let ((line-number 0)) - (dolist (line (car (vtable--cache table))) + (dolist (line (vtable--cache-lines cache)) (vtable--insert-line table line line-number widths spacer ellipsis ellipsis-width) (setq line-number (1+ line-number)))) (add-text-properties start (point) (list 'rear-nonsticky t - 'vtable table)) + 'vtable table + 'vtable-cache cache)) (goto-char start))) (defun vtable--insert-line (table line line-number widths spacer @@ -659,16 +664,22 @@ recompute the column specs when the table data has changed." (defun vtable--cache-key () (cons (frame-terminal) (window-width))) -(defun vtable--cache (table) - (gethash (vtable--cache-key) (slot-value table '-cache))) +(defun vtable--current-cache () + "Return the current cache for the table at point. + +In `vtable-insert', the lines and widths of the vtable text are computed +based on the current selected frame and window and stored in a cache. +Subsequent interaction with the text of the vtable should use that cache +via this function rather than by calling `vtable--cache-key' to look up +the cache." + (get-text-property (point) 'vtable-cache)) (defun vtable--clear-cache (table) (setf (gethash (vtable--cache-key) (slot-value table '-cache)) nil)) -(defun vtable--sort (table) +(defun vtable--sort (table cache) (pcase-dolist (`(,index . ,direction) (vtable-sort-by table)) - (let ((cache (vtable--cache table)) - (numerical (vtable-column--numerical + (let ((numerical (vtable-column--numerical (elt (vtable-columns table) index))) (numcomp (if (eq direction 'descend) #'> #'<)) @@ -971,9 +982,6 @@ CACHE is TABLE's cache data as returned by `vtable--compute-cache'." (when column (vtable-goto-column column)))) -(defun vtable--widths (table) - (nth 1 (vtable--ensure-cache table))) - ;;; Commands. (defvar-keymap vtable-header-mode-map @@ -998,7 +1006,7 @@ Interactively, N is the prefix argument." (- (* (vtable--char-width table) (or n 1)))))) (defun vtable--alter-column-width (table column delta) - (let ((widths (vtable--widths table))) + (let ((widths (vtable--cache-widths (vtable--current-cache)))) (setf (aref widths column) (max (* (vtable--char-width table) 2) (+ (aref widths column) delta))) @@ -1020,14 +1028,14 @@ Interactively, N is the prefix argument." (interactive) (vtable-goto-column (max 0 (1- (or (vtable-current-column) - (length (vtable--widths (vtable-current-table)))))))) + (length (vtable--cache-widths (vtable--current-cache)))))))) (defun vtable-next-column () "Go to the next column." (interactive) (when (vtable-current-column) (vtable-goto-column - (min (1- (length (vtable--widths (vtable-current-table)))) + (min (1- (length (vtable--cache-widths (vtable--current-cache)))) (1+ (vtable-current-column)))))) (defun vtable-revert-command () commit 97d2ac4f95c02698e5d1145b4681b60b8bad6c78 Author: 10sr <8.slashes@gmail.com> Date: Wed Nov 19 10:17:30 2025 -0500 Editorconfig: Fix for `spaces_in_middle_key` test * lisp/editorconfig-core-handle.el (editorconfig-core-handle--parse-file): fix for `spaces_in_middle_key` test. Cherrypick of commit 72b8847275cb from upstream. diff --git a/lisp/editorconfig-core-handle.el b/lisp/editorconfig-core-handle.el index b75568dbde9..2e0f1ed9989 100644 --- a/lisp/editorconfig-core-handle.el +++ b/lisp/editorconfig-core-handle.el @@ -187,8 +187,8 @@ If CONF is not found return nil." (setq props nil) (setq pattern newpattern))) - ((looking-at "\\([^=: \t]+\\)[ \t]*[=:][ \t]*\\(.*?\\)[ \t]*$") - (let ((key (downcase (match-string 1))) + ((looking-at "\\([^=: \t][^=:]*\\)[ \t]*[=:][ \t]*\\(.*?\\)[ \t]*$") + (let ((key (downcase (string-trim (match-string 1)))) (value (match-string 2))) (when (and (< (length key) 51) (< (length value) 256)) commit 7ec541ae2cc92814053373ebe7f5484ffd38d732 Author: Ron Parker Date: Wed Nov 19 10:12:39 2025 -0500 Editorconfig: Fix parsing section lines with trailing comments (#363) Copyright-paperwork-exempt: yes * lisp/editorconfig-core-handle.el (editorconfig-core-handle--parse-file): Fix parsing section lines with trailing comments. Cherrypick of commit 183cfa105c2e from upstream. diff --git a/lisp/editorconfig-core-handle.el b/lisp/editorconfig-core-handle.el index 0849b7bbefd..b75568dbde9 100644 --- a/lisp/editorconfig-core-handle.el +++ b/lisp/editorconfig-core-handle.el @@ -177,7 +177,7 @@ If CONF is not found return nil." nil) ;; Start of section - ((looking-at "\\[\\(.*\\)\\][ \t]*$") + ((looking-at "\\[\\(.*\\)\\][ \t]*\\(?:[#;].*\\)?$") (let ((newpattern (match-string 1))) (when pattern (push (make-editorconfig-core-handle-section commit 5e10b7fe4ebe8ffeb2a6f31886fe524718beb3e9 Author: Stefan Monnier Date: Wed Nov 19 09:57:29 2025 -0500 Fix `editorconfig-display-current-properties` In Emacs-30, `editorconfig-display-current-properties` was broken in that it displayed only the properties set by `editorconfig-apply` but not those set in the "normal" way, i.e. by `hack-local-variables`. Fix that along with a few docstrings that had misleading old info. * lisp/editorconfig-tools.el (editorconfig-apply) (editorconfig-mode-apply): Fix docstring and declare obsolete. * lisp/editorconfig.el (editorconfig-properties-hash): (editorconfig-call-get-properties-function): Remove elements of docstring that aren't true any more. (editorconfig-call-get-properties-function): Set `editorconfig-properties-hash`. diff --git a/etc/NEWS b/etc/NEWS index 0d3c8938139..fdb1ee02819 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -857,6 +857,12 @@ you could already use 'C-u C-x C-n' to clear the goal column. * Changes in Specialized Modes and Packages in Emacs 31.1 +** Editorconfig +--- +*** 'editorconfig-apply' is declared obsolete. +You can now use 'editorconfig-display-current-properties' without having +to call 'editorconfig-apply'. + ** Auth Source +++ diff --git a/lisp/editorconfig-tools.el b/lisp/editorconfig-tools.el index 2fec1a94f8b..474f46b0527 100644 --- a/lisp/editorconfig-tools.el +++ b/lisp/editorconfig-tools.el @@ -41,11 +41,8 @@ ;;;###autoload (defun editorconfig-apply () - "Get and apply EditorConfig properties to current buffer. - -This function does not respect the values of `editorconfig-exclude-modes' and -`editorconfig-exclude-regexps' and always applies available properties. -Use `editorconfig-mode-apply' instead to make use of these variables." + "Get and apply EditorConfig properties to current buffer." + (declare (obsolete hack-local-variables "31.1")) (interactive) (when buffer-file-name (condition-case err @@ -76,14 +73,12 @@ Use `editorconfig-mode-apply' instead to make use of these variables." :error))))) (defun editorconfig-mode-apply () - "Get and apply EditorConfig properties to current buffer. - -This function does nothing when the major mode is listed in -`editorconfig-exclude-modes', or variable `buffer-file-name' matches -any of regexps in `editorconfig-exclude-regexps'." + "Get and apply EditorConfig properties to current buffer." + (declare (obsolete editorconfig-apply "31.1")) (interactive) (when (and major-mode buffer-file-name) - (editorconfig-apply))) + (with-suppressed-warnings ((obsolete editorconfig-apply)) + (editorconfig-apply)))) ;;;###autoload diff --git a/lisp/editorconfig.el b/lisp/editorconfig.el index b0888c4377b..04c7314369d 100644 --- a/lisp/editorconfig.el +++ b/lisp/editorconfig.el @@ -251,9 +251,7 @@ Otherwise, use `delete-trailing-whitespace'." :type 'function) (defvar-local editorconfig-properties-hash nil - "Hash object of EditorConfig properties that was enabled for current buffer. -Set by `editorconfig-apply' and nil if that is not invoked in -current buffer yet.") + "Hash object of EditorConfig properties that was enabled for current buffer.") (put 'editorconfig-properties-hash 'permanent-local t) (defvar editorconfig-lisp-use-default-indent nil @@ -527,9 +525,7 @@ This function will revert buffer when the coding-system has been changed." (defun editorconfig-call-get-properties-function (filename) "Call `editorconfig-core-get-properties-hash' with FILENAME and return result. - -This function also removes `unset' properties and calls -`editorconfig-hack-properties-functions'." +This function also removes `unset' properties." (if (stringp filename) (setq filename (expand-file-name filename)) (editorconfig-error "Invalid argument: %S" filename)) @@ -541,6 +537,12 @@ This function also removes `unset' properties and calls err))) (cl-loop for k being the hash-keys of props using (hash-values v) when (equal v "unset") do (remhash k props)) + ;; E.g. for `editorconfig-display-current-properties'. + ;; FIXME: Use it for memoization as well to avoid the duplicate + ;; calls to `editorconfig-core-get-properties-hash' (one for + ;; `editorconfig--get-coding-system' and one for + ;; `editorconfig--get-dir-local-variables')? + (setq editorconfig-properties-hash props) props)) (defvar editorconfig-get-local-variables-functions commit 788b39740a657b6359162ad79cc511b461ee6a27 Author: Martin Rudalics Date: Wed Nov 19 09:31:28 2025 +0100 Fix 'make_lispy_position' for left margin clicks (Bug#79846) * src/keyboard.c (make_lispy_position): When calculating a position in the left margin skip any scroll bar on the left of the associated window (Bug#79846). diff --git a/src/keyboard.c b/src/keyboard.c index 016a79082aa..6c01811c2d8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -5872,7 +5872,8 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, ptrdiff_t charpos; posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin; - col = wx; + /* Skip any scroll bar on the left (Bug#79846). */ + col = wx - WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w); row = wy; string = marginal_area_string (w, part, &col, &row, &charpos, &object, &dx, &dy, &width, &height);