Mercurial > emacs
changeset 13388:af2bb7490ca9
(minor-mode-map-alist): Use substitute-key-definition
to find the appropriate bindings for window enlarge/shrink.
(2C-shrink-window-horizontally, 2C-enlarge-window-horizontally):
Renamed from shrink-window-horizontally, enlarge-window-horizontally
to avoid redefining the standard functions.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 03 Nov 1995 03:11:24 +0000 |
parents | 14442ed0da63 |
children | 3b84f89755f4 |
files | lisp/textmodes/two-column.el |
diffstat | 1 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/two-column.el Fri Nov 03 02:30:17 1995 +0000 +++ b/lisp/textmodes/two-column.el Fri Nov 03 03:11:24 1995 +0000 @@ -150,8 +150,6 @@ (define-key map [f2] '2C-two-columns) (define-key map "b" '2C-associate-buffer) (define-key map "s" '2C-split) - (define-key map "{" 'shrink-window-horizontally) - (define-key map "}" 'enlarge-window-horizontally) map) "Keymap for commands for setting up two-column mode.") @@ -178,6 +176,8 @@ (define-key map "o" '2C-associated-buffer) (define-key map "\^m" '2C-newline) (define-key map "|" '2C-toggle-autoscroll) + (define-key map "{" '2C-shrink-window-horizontally) + (define-key map "}" '2C-enlarge-window-horizontally) map) "Keymap for commands for use in two-column mode.") @@ -187,6 +187,12 @@ (let ((map (make-sparse-keymap))) (substitute-key-definition '2C-command 2C-minor-mode-map map (current-global-map)) + (substitute-key-definition 'enlarge-window-horizontally + '2C-enlarge-window-horizontally + map (current-global-map)) + (substitute-key-definition 'shrink-window-horizontally + '2C-shrink-window-horizontally + map (current-global-map)) map)) minor-mode-map-alist)) @@ -597,7 +603,7 @@ -(defun enlarge-window-horizontally (arg) +(defun 2C-enlarge-window-horizontally (arg) "Make current window ARG columns wider." (interactive "p") (enlarge-window arg t) @@ -606,10 +612,10 @@ (set-buffer (2C-other)) (setq 2C-window-width (- 2C-window-width arg)))) -(defun shrink-window-horizontally (arg) +(defun 2C-shrink-window-horizontally (arg) "Make current window ARG columns narrower." (interactive "p") - (enlarge-window-horizontally (- arg))) + (2C-enlarge-window-horizontally (- arg)))