From: Ken Manheimer Date: Tue, 21 Jul 2020 14:56:55 +0000 (-0400) Subject: Revert "Resolve missing button-region keymap bindings." X-Git-Tag: emacs-27.1-rc1~14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=db479d635411e352529cb9378f0455b2abb2637f;p=emacs.git Revert "Resolve missing button-region keymap bindings." This reverts commit dd7c191291c8eb1afeac0f1512745491c5c7a317. Backporting it to emacs-27 was not appropriate. --- diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 629f6762dd5..bdfcaa2e55d 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -415,17 +415,15 @@ not altered with an escape sequence.") ;;;_ , Widget element formatting ;;;_ = allout-item-icon-keymap (defvar allout-item-icon-keymap - (let ((km (make-sparse-keymap)) - (as-parent (if (current-local-map) - (make-composed-keymap (current-local-map) - (current-global-map)) - (current-global-map)))) - ;; The keymap parent is reset on the each local var when mode starts. - (set-keymap-parent km as-parent) + (let ((km (make-sparse-keymap))) (dolist (digit '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")) (define-key km digit 'digit-argument)) (define-key km "-" 'negative-argument) +;; (define-key km [(return)] 'allout-tree-expand-command) +;; (define-key km [(meta return)] 'allout-toggle-torso-command) +;; (define-key km [(down-mouse-1)] 'allout-item-button-click) +;; (define-key km [(down-mouse-2)] 'allout-toggle-torso-event-command) ;; Override underlying mouse-1 and mouse-2 bindings in icon territory: (define-key km [(mouse-1)] (lambda () (interactive) nil)) (define-key km [(mouse-2)] (lambda () (interactive) nil)) @@ -435,16 +433,17 @@ not altered with an escape sequence.") km) "General tree-node key bindings.") -(make-variable-buffer-local 'allout-item-icon-keymap) ;;;_ = allout-item-body-keymap (defvar allout-item-body-keymap (let ((km (make-sparse-keymap)) - (as-parent (if (current-local-map) - (make-composed-keymap (current-local-map) - (current-global-map)) - (current-global-map)))) - ;; The keymap parent is reset on the each local var when mode starts. - (set-keymap-parent km as-parent) + (local-map (current-local-map))) +;; (define-key km [(control return)] 'allout-tree-expand-command) +;; (define-key km [(meta return)] 'allout-toggle-torso-command) + ;; XXX We need to reset this per buffer's mode; we do so in + ;; allout-widgets-mode. + (if local-map + (set-keymap-parent km local-map)) + km) "General key bindings for the text content of outline items.") (make-variable-buffer-local 'allout-item-body-keymap) @@ -457,7 +456,6 @@ not altered with an escape sequence.") (set-keymap-parent km allout-item-icon-keymap) km) "Keymap used in the item cue area - the space between the icon and headline.") -(make-variable-buffer-local 'allout-cue-span-keymap) ;;;_ = allout-escapes-category (defvar allout-escapes-category nil "Symbol for category of text property used to hide escapes of prefix-like @@ -568,13 +566,8 @@ outline hot-spot navigation (see `allout-mode')." (add-to-invisibility-spec '(allout-torso . t)) (add-to-invisibility-spec 'allout-escapes) - (let ((as-parent (if (current-local-map) - (make-composed-keymap (current-local-map) - (current-global-map)) - (current-global-map)))) - (set-keymap-parent allout-item-body-keymap as-parent) - ;; allout-cue-span-keymap uses allout-item-icon-keymap as parent. - (set-keymap-parent allout-item-icon-keymap as-parent)) + (if (current-local-map) + (set-keymap-parent allout-item-body-keymap (current-local-map))) (add-hook 'allout-exposure-change-functions 'allout-widgets-exposure-change-recorder nil 'local)