all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#41073: [PATCH] Adjust outline-minor-mode-map when prefix is changed
@ 2020-05-04  9:48 Philip K
  2020-08-08 11:53 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Philip K @ 2020-05-04  9:48 UTC (permalink / raw)
  To: 41073

---
 lisp/outline.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/outline.el b/lisp/outline.el
index 15fd6ea02e..aa8ed58ad9 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -289,12 +289,18 @@ outline-mode
 	(list (list nil (concat "^\\(?:" outline-regexp "\\).*$") 0)))
   (add-hook 'change-major-mode-hook 'outline-show-all nil t))
 
+(defvar outline-minor-mode-map)
+
 (defcustom outline-minor-mode-prefix "\C-c@"
   "Prefix key to use for Outline commands in Outline minor mode.
 The value of this variable is checked as part of loading Outline mode.
 After that, changing the prefix key requires manipulating keymaps."
   :type 'key-sequence
-  :group 'outlines)
+  :group 'outlines
+  :set (lambda (sym val)
+         (define-key outline-minor-mode-map outline-minor-mode-prefix nil)
+         (define-key outline-minor-mode-map val outline-mode-prefix-map)
+         (set-default sym val)))
 
 ;;;###autoload
 (define-minor-mode outline-minor-mode
-- 
2.20.1






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

* bug#41073: [PATCH] Adjust outline-minor-mode-map when prefix is changed
  2020-05-04  9:48 bug#41073: [PATCH] Adjust outline-minor-mode-map when prefix is changed Philip K
@ 2020-08-08 11:53 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-08 11:53 UTC (permalink / raw)
  To: Philip K; +Cc: 41073

Philip K <philip@warpmail.net> writes:

> +(defvar outline-minor-mode-map)
> +
>  (defcustom outline-minor-mode-prefix "\C-c@"
>    "Prefix key to use for Outline commands in Outline minor mode.
>  The value of this variable is checked as part of loading Outline mode.
>  After that, changing the prefix key requires manipulating keymaps."
>    :type 'key-sequence
> -  :group 'outlines)
> +  :group 'outlines
> +  :set (lambda (sym val)
> +         (define-key outline-minor-mode-map outline-minor-mode-prefix nil)
> +         (define-key outline-minor-mode-map val outline-mode-prefix-map)
> +         (set-default sym val)))

I don't use outline mode, but this makes sense to me (if I understand
what it's doing correctly), so I've applied the patch.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2020-08-08 11:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-04  9:48 bug#41073: [PATCH] Adjust outline-minor-mode-map when prefix is changed Philip K
2020-08-08 11:53 ` 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.