From: Dmitry Gutov Date: Thu, 2 Nov 2023 23:40:36 +0000 (+0200) Subject: Remove 'M-.' binding from js-mode and js-ts-mode X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9cbf0bb3ee8871942f781c539acdeae1b7071224;p=emacs.git Remove 'M-.' binding from js-mode and js-ts-mode * lisp/progmodes/js.el (js-mode-map, js-ts-mode-map): Remove. The global binding must be a lot more useful for most users (https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg01295.html). --- diff --git a/etc/NEWS b/etc/NEWS index 54360e43322..1390cb1cf6f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1056,6 +1056,13 @@ additionally traverse the parent directories until a VCS root is found (if any), so that the ignore rules for that repository are used, and the file listing's performance is still optimized. +** JS Mode +The binding 'M-.' has been removed from the major mode keymaps in +'js-mode' and 'js-ts-mode', having it default to the global binding +which calls 'xref-find-definitions'. If the previous one worked +better for you, use 'define-key' in your init script to bind +'js-find-symbol' to that combination again. + * Incompatible Lisp Changes in Emacs 30.1 diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 6fd714940b6..5a669fdbd42 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -672,15 +672,6 @@ This variable is like `sgml-attribute-offset'." :type 'integer :safe 'integerp) -;;; Keymap - -(defvar-keymap js-mode-map - :doc "Keymap for `js-mode'." - "M-." #'js-find-symbol) - -(defvar js-ts-mode-map (copy-keymap js-mode-map) - "Keymap used in `js-ts-mode'.") - ;;; Syntax table and parsing (defvar js-mode-syntax-table