Mercurial > emacs
comparison lisp/frame.el @ 16295:8915604a050c
(ctl-x-5-map, ctl-x-5-prefix): Duplicate defs deleted.
(scroll-bar-side): New variable.
(toggle-scroll-bar): Use scroll-bar-side.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 23 Sep 1996 04:29:50 +0000 |
parents | a2e77dc54e24 |
children | e47c5d7e9c5d |
comparison
equal
deleted
inserted
replaced
16294:07cfbdac7ec5 | 16295:8915604a050c |
---|---|
663 (if (cdr (assq 'auto-lower (frame-parameters (selected-frame)))) | 663 (if (cdr (assq 'auto-lower (frame-parameters (selected-frame)))) |
664 -1 1))) | 664 -1 1))) |
665 (modify-frame-parameters (selected-frame) | 665 (modify-frame-parameters (selected-frame) |
666 (list (cons 'auto-lower (> arg 0))))) | 666 (list (cons 'auto-lower (> arg 0))))) |
667 | 667 |
668 (defvar scroll-bar-side 'left | |
669 "*Specify which side scroll bars should be on. Value is `left' or `right'.") | |
670 | |
668 (defun toggle-scroll-bar (arg) | 671 (defun toggle-scroll-bar (arg) |
669 "Toggle whether or not the selected frame has vertical scroll bars. | 672 "Toggle whether or not the selected frame has vertical scroll bars. |
670 With arg, turn vertical scroll bars on if and only if arg is positive." | 673 With arg, turn vertical scroll bars on if and only if arg is positive." |
671 (interactive "P") | 674 (interactive "P") |
672 (if (null arg) | 675 (if (null arg) |
673 (setq arg | 676 (setq arg |
674 (if (cdr (assq 'vertical-scroll-bars | 677 (if (cdr (assq 'vertical-scroll-bars |
675 (frame-parameters (selected-frame)))) | 678 (frame-parameters (selected-frame)))) |
676 -1 1))) | 679 -1 1))) |
677 (modify-frame-parameters (selected-frame) | 680 (modify-frame-parameters (selected-frame) |
678 (list (cons 'vertical-scroll-bars (> arg 0))))) | 681 (list (cons 'vertical-scroll-bars |
682 (if (> arg 0) | |
683 scroll-bar-side))))) | |
679 | 684 |
680 (defun toggle-horizontal-scroll-bar (arg) | 685 (defun toggle-horizontal-scroll-bar (arg) |
681 "Toggle whether or not the selected frame has horizontal scroll bars. | 686 "Toggle whether or not the selected frame has horizontal scroll bars. |
682 With arg, turn horizontal scroll bars on if and only if arg is positive. | 687 With arg, turn horizontal scroll bars on if and only if arg is positive. |
683 Horizontal scroll bars aren't implemented yet." | 688 Horizontal scroll bars aren't implemented yet." |
710 (make-obsolete 'set-screen-width 'set-frame-width) | 715 (make-obsolete 'set-screen-width 'set-frame-width) |
711 (make-obsolete 'set-screen-height 'set-frame-height) | 716 (make-obsolete 'set-screen-height 'set-frame-height) |
712 | 717 |
713 | 718 |
714 ;;;; Key bindings | 719 ;;;; Key bindings |
715 (defvar ctl-x-5-map (make-sparse-keymap) | |
716 "Keymap for frame commands.") | |
717 (defalias 'ctl-x-5-prefix ctl-x-5-map) | |
718 (define-key ctl-x-map "5" 'ctl-x-5-prefix) | |
719 | 720 |
720 (define-key ctl-x-5-map "2" 'make-frame-command) | 721 (define-key ctl-x-5-map "2" 'make-frame-command) |
721 (define-key ctl-x-5-map "0" 'delete-frame) | 722 (define-key ctl-x-5-map "0" 'delete-frame) |
722 (define-key ctl-x-5-map "o" 'other-frame) | 723 (define-key ctl-x-5-map "o" 'other-frame) |
723 | 724 |