all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#39373: 27.0.50; [PATCH] mode-local-print-bindings broken with lexical-binding
@ 2020-01-31 17:08 Mattias Engdegård
  2020-01-31 19:27 ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Mattias Engdegård @ 2020-01-31 17:08 UTC (permalink / raw)
  To: 39373

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

'mode-local-print-bindings' in mode-local.el seems to be broken since the file was converted to lexical binding.
Straightforward patch attached -- acceptable for emacs-27? (It's a regression from Emacs 26.)


[-- Attachment #2: 0001-Fix-describe-mode-local-bindings-lexical-binding-dam.patch --]
[-- Type: application/octet-stream, Size: 1463 bytes --]

From ded807b01792e966a4ce4905cc3ed2483c52294a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= <mattiase@acm.org>
Date: Fri, 31 Jan 2020 17:37:17 +0100
Subject: [PATCH] Fix describe-mode-local-bindings lexical-binding damage

* lisp/cedet/mode-local.el (mode-local-print-bindings):
Repair code that relied on dynamic binding.
---
 lisp/cedet/mode-local.el | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index a6e143cfcd..70ed62f4fb 100644
--- a/lisp/cedet/mode-local.el
+++ b/lisp/cedet/mode-local.el
@@ -819,14 +819,11 @@ mode-local-print-bindings
         )
     ;; Order symbols by type
     (mapatoms
-     #'(lambda (s)
-         (add-to-list (cond
-                       ((get s 'mode-variable-flag)
-                        (if (get s 'constant-flag) 'mc 'mv))
-                       ((get s 'override-flag)
-                        (if (get s 'constant-flag) 'fo 'ov))
-                       ('us))
-                      s))
+     (lambda (s) (push s (cond ((get s 'mode-variable-flag)
+                                (if (get s 'constant-flag) mc mv))
+                               ((get s 'override-flag)
+                                (if (get s 'constant-flag) fo ov))
+                               (t us))))
      table)
     ;; Print symbols by type
     (when us
-- 
2.21.1 (Apple Git-122.3)


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-08-09 19:42 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-31 17:08 bug#39373: 27.0.50; [PATCH] mode-local-print-bindings broken with lexical-binding Mattias Engdegård
2020-01-31 19:27 ` Eli Zaretskii
2020-01-31 19:38   ` Mattias Engdegård
2020-01-31 20:25     ` Eli Zaretskii
2020-01-31 20:51       ` Mattias Engdegård
2020-02-01  7:48         ` Eli Zaretskii
2020-02-01 15:53           ` Drew Adams
2020-02-01 19:24           ` Mattias Engdegård
2020-02-01 19:28             ` Eli Zaretskii
2020-02-01 20:15             ` Stefan Monnier
2020-02-01 21:40               ` Mattias Engdegård
2020-02-02  3:31                 ` Eli Zaretskii
2020-02-02 11:58                   ` Mattias Engdegård
2020-02-02 13:55                     ` Stefan Monnier
2020-02-02 14:14                       ` Mattias Engdegård
2020-08-09 11:39                         ` Lars Ingebrigtsen
2020-08-09 13:28                           ` Mattias Engdegård
2020-08-09 19:42                             ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.