aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1995-11-03 03:11:24 +0000
committerKarl Heuer1995-11-03 03:11:24 +0000
commit30a7d33c2b33eb65ed5a571d1a4ba861153898bc (patch)
tree022d51bff67ea35fd1d4acfe669508af52ec1bcc
parentb4b1e78a9a3d7c6d46030b9772c03ff8c73b9c90 (diff)
downloademacs-30a7d33c2b33eb65ed5a571d1a4ba861153898bc.tar.gz
emacs-30a7d33c2b33eb65ed5a571d1a4ba861153898bc.zip
(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.
-rw-r--r--lisp/textmodes/two-column.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el
index 9b27b5ee37c..9452a4f9e54 100644
--- a/lisp/textmodes/two-column.el
+++ b/lisp/textmodes/two-column.el
@@ -150,8 +150,6 @@
150 (define-key map [f2] '2C-two-columns) 150 (define-key map [f2] '2C-two-columns)
151 (define-key map "b" '2C-associate-buffer) 151 (define-key map "b" '2C-associate-buffer)
152 (define-key map "s" '2C-split) 152 (define-key map "s" '2C-split)
153 (define-key map "{" 'shrink-window-horizontally)
154 (define-key map "}" 'enlarge-window-horizontally)
155 map) 153 map)
156 "Keymap for commands for setting up two-column mode.") 154 "Keymap for commands for setting up two-column mode.")
157 155
@@ -178,6 +176,8 @@
178 (define-key map "o" '2C-associated-buffer) 176 (define-key map "o" '2C-associated-buffer)
179 (define-key map "\^m" '2C-newline) 177 (define-key map "\^m" '2C-newline)
180 (define-key map "|" '2C-toggle-autoscroll) 178 (define-key map "|" '2C-toggle-autoscroll)
179 (define-key map "{" '2C-shrink-window-horizontally)
180 (define-key map "}" '2C-enlarge-window-horizontally)
181 map) 181 map)
182 "Keymap for commands for use in two-column mode.") 182 "Keymap for commands for use in two-column mode.")
183 183
@@ -187,6 +187,12 @@
187 (let ((map (make-sparse-keymap))) 187 (let ((map (make-sparse-keymap)))
188 (substitute-key-definition '2C-command 2C-minor-mode-map 188 (substitute-key-definition '2C-command 2C-minor-mode-map
189 map (current-global-map)) 189 map (current-global-map))
190 (substitute-key-definition 'enlarge-window-horizontally
191 '2C-enlarge-window-horizontally
192 map (current-global-map))
193 (substitute-key-definition 'shrink-window-horizontally
194 '2C-shrink-window-horizontally
195 map (current-global-map))
190 map)) 196 map))
191 minor-mode-map-alist)) 197 minor-mode-map-alist))
192 198
@@ -597,7 +603,7 @@ When autoscrolling is turned on, this also realigns the two buffers."
597 603
598 604
599 605
600(defun enlarge-window-horizontally (arg) 606(defun 2C-enlarge-window-horizontally (arg)
601 "Make current window ARG columns wider." 607 "Make current window ARG columns wider."
602 (interactive "p") 608 (interactive "p")
603 (enlarge-window arg t) 609 (enlarge-window arg t)
@@ -606,10 +612,10 @@ When autoscrolling is turned on, this also realigns the two buffers."
606 (set-buffer (2C-other)) 612 (set-buffer (2C-other))
607 (setq 2C-window-width (- 2C-window-width arg)))) 613 (setq 2C-window-width (- 2C-window-width arg))))
608 614
609(defun shrink-window-horizontally (arg) 615(defun 2C-shrink-window-horizontally (arg)
610 "Make current window ARG columns narrower." 616 "Make current window ARG columns narrower."
611 (interactive "p") 617 (interactive "p")
612 (enlarge-window-horizontally (- arg))) 618 (2C-enlarge-window-horizontally (- arg)))
613 619
614 620
615 621