649 |
debug-on-quit debug-on-error |
debug-on-quit debug-on-error |
650 |
tooltip-mode menu-bar-mode tool-bar-mode |
tooltip-mode menu-bar-mode tool-bar-mode |
651 |
save-place uniquify-buffer-name-style fringe-mode |
save-place uniquify-buffer-name-style fringe-mode |
652 |
fringe-indicators case-fold-search |
indicate-empty-lines indicate-buffer-boundaries |
653 |
display-time-mode auto-compression-mode |
case-fold-search display-time-mode auto-compression-mode |
654 |
current-language-environment default-input-method |
current-language-environment default-input-method |
655 |
;; Saving `text-mode-hook' is somewhat questionable, |
;; Saving `text-mode-hook' is somewhat questionable, |
656 |
;; as we might get more than we bargain for, if |
;; as we might get more than we bargain for, if |
717 |
(frame-visible-p |
(frame-visible-p |
718 |
(symbol-value 'speedbar-frame)))))) |
(symbol-value 'speedbar-frame)))))) |
719 |
|
|
720 |
|
(defvar menu-bar-showhide-fringe-menu (make-sparse-keymap "Fringe")) |
721 |
|
|
722 |
(defvar menu-bar-showhide-fringe-ind-menu (make-sparse-keymap "Indicators")) |
(defvar menu-bar-showhide-fringe-ind-menu |
723 |
|
(make-sparse-keymap "Buffer boundaries")) |
|
;; The real definition is in fringe.el. |
|
|
;; This is to prevent errors in the :radio conditions below. |
|
|
(setq fringe-indicators nil) |
|
724 |
|
|
725 |
(defun menu-bar-showhide-fringe-ind-empty () |
(defun menu-bar-showhide-fringe-ind-customize () |
726 |
"Display empty line indicators in the left or right fringe." |
"Show customization buffer for `indicate-buffer-boundaries'." |
727 |
(interactive) |
(interactive) |
728 |
(require 'fringe) |
(customize-variable 'indicate-buffer-boundaries)) |
|
(customize-set-variable 'fringe-indicators 'empty)) |
|
729 |
|
|
730 |
(define-key menu-bar-showhide-fringe-ind-menu [empty] |
(define-key menu-bar-showhide-fringe-ind-menu [customize] |
731 |
'(menu-item "Empty lines only" menu-bar-showhide-fringe-ind-empty |
'(menu-item "Other (customize)" |
732 |
:help "Show empty line indicators in fringe" |
menu-bar-showhide-fringe-ind-customize |
733 |
:visible (display-graphic-p) |
:help "Additional choices available through Custom buffer" |
734 |
:button (:radio . (eq fringe-indicators 'empty)))) |
:visible (display-graphic-p))) |
735 |
|
|
736 |
(defun menu-bar-showhide-fringe-ind-mixed () |
(defun menu-bar-showhide-fringe-ind-mixed () |
737 |
"Display top and bottom indicators in opposite fringes, arrow in right." |
"Display top and bottom indicators in opposite fringes, arrows in right." |
738 |
(interactive) |
(interactive) |
739 |
(require 'fringe) |
(customize-set-variable 'indicate-buffer-boundaries |
740 |
(customize-set-variable 'fringe-indicators 'mixed)) |
'((t . right) (top . left)))) |
741 |
|
|
742 |
(define-key menu-bar-showhide-fringe-ind-menu [mixed] |
(define-key menu-bar-showhide-fringe-ind-menu [mixed] |
743 |
'(menu-item "Opposite, arrows right" menu-bar-showhide-fringe-ind-mixed |
'(menu-item "Opposite, arrows right" menu-bar-showhide-fringe-ind-mixed |
744 |
:help "Show top/bottom indicators in opposite fringes, arrows in right" |
:help |
745 |
|
"Show top/bottom indicators in opposite fringes, arrows in right" |
746 |
:visible (display-graphic-p) |
:visible (display-graphic-p) |
747 |
:button (:radio . (eq fringe-indicators 'mixed)))) |
:button (:radio . (eq indicate-buffer-boundaries |
748 |
|
'((t . right) (top . left)))))) |
749 |
|
|
750 |
(defun menu-bar-showhide-fringe-ind-box () |
(defun menu-bar-showhide-fringe-ind-box () |
751 |
"Display top and bottom indicators in opposite fringes." |
"Display top and bottom indicators in opposite fringes." |
752 |
(interactive) |
(interactive) |
753 |
(require 'fringe) |
(customize-set-variable 'indicate-buffer-boundaries |
754 |
(customize-set-variable 'fringe-indicators 'box)) |
'((top . left) (bottom . right)))) |
755 |
|
|
756 |
(define-key menu-bar-showhide-fringe-ind-menu [box] |
(define-key menu-bar-showhide-fringe-ind-menu [box] |
757 |
'(menu-item "Opposite, no arrows" menu-bar-showhide-fringe-ind-box |
'(menu-item "Opposite, no arrows" menu-bar-showhide-fringe-ind-box |
758 |
:help "Show top/bottom indicators in opposite fringes, no arrows" |
:help "Show top/bottom indicators in opposite fringes, no arrows" |
759 |
:visible (display-graphic-p) |
:visible (display-graphic-p) |
760 |
:button (:radio . (eq fringe-indicators 'box)))) |
:button (:radio . (eq indicate-buffer-boundaries |
761 |
|
'((top . left) (bottom . right)))))) |
762 |
|
|
763 |
(defun menu-bar-showhide-fringe-ind-right () |
(defun menu-bar-showhide-fringe-ind-right () |
764 |
"Display fringe indicators in the right fringe." |
"Display buffer boundaries and arrows in the right fringe." |
765 |
(interactive) |
(interactive) |
766 |
(require 'fringe) |
(customize-set-variable 'indicate-buffer-boundaries 'right)) |
|
(customize-set-variable 'fringe-indicators 'right)) |
|
767 |
|
|
768 |
(define-key menu-bar-showhide-fringe-ind-menu [right] |
(define-key menu-bar-showhide-fringe-ind-menu [right] |
769 |
'(menu-item "In right fringe" menu-bar-showhide-fringe-ind-right |
'(menu-item "In right fringe" menu-bar-showhide-fringe-ind-right |
770 |
:help "Show indicators in right fringe" |
:help "Show buffer boundaries and arrows in right fringe" |
771 |
:visible (display-graphic-p) |
:visible (display-graphic-p) |
772 |
:button (:radio . (eq fringe-indicators 'right)))) |
:button (:radio . (eq indicate-buffer-boundaries 'right)))) |
773 |
|
|
774 |
(defun menu-bar-showhide-fringe-ind-left () |
(defun menu-bar-showhide-fringe-ind-left () |
775 |
"Display fringe indicators in the left fringe." |
"Display buffer boundaries and arrows in the left fringe." |
776 |
(interactive) |
(interactive) |
777 |
(require 'fringe) |
(customize-set-variable 'indicate-buffer-boundaries 'left)) |
|
(customize-set-variable 'fringe-indicators 'left)) |
|
778 |
|
|
779 |
(define-key menu-bar-showhide-fringe-ind-menu [left] |
(define-key menu-bar-showhide-fringe-ind-menu [left] |
780 |
'(menu-item "In left fringe" menu-bar-showhide-fringe-ind-left |
'(menu-item "In left fringe" menu-bar-showhide-fringe-ind-left |
781 |
:help "Show indicators in left fringe" |
:help "Show buffer boundaries and arrows in left fringe" |
782 |
:visible (display-graphic-p) |
:visible (display-graphic-p) |
783 |
:button (:radio . (eq fringe-indicators 'left)))) |
:button (:radio . (eq indicate-buffer-boundaries 'left)))) |
784 |
|
|
785 |
(defun menu-bar-showhide-fringe-ind-none () |
(defun menu-bar-showhide-fringe-ind-none () |
786 |
"Do not display any fringe indicators." |
"Do not display any buffer boundary indicators." |
787 |
(interactive) |
(interactive) |
788 |
(require 'fringe) |
(customize-set-variable 'indicate-buffer-boundaries nil)) |
|
(customize-set-variable 'fringe-indicators nil)) |
|
789 |
|
|
790 |
(define-key menu-bar-showhide-fringe-ind-menu [none] |
(define-key menu-bar-showhide-fringe-ind-menu [none] |
791 |
'(menu-item "No indicators" menu-bar-showhide-fringe-ind-none |
'(menu-item "No indicators" menu-bar-showhide-fringe-ind-none |
792 |
:help "Hide all fringe indicators" |
:help "Hide all buffer boundary indicators and arrows" |
793 |
:visible (display-graphic-p) |
:visible (display-graphic-p) |
794 |
:button (:radio . (eq fringe-indicators nil)))) |
:button (:radio . (eq indicate-buffer-boundaries nil)))) |
|
|
|
795 |
|
|
796 |
|
(define-key menu-bar-showhide-fringe-menu [showhide-fringe-ind] |
797 |
|
(list 'menu-item "Buffer boundaries" menu-bar-showhide-fringe-ind-menu |
798 |
|
:visible `(display-graphic-p) |
799 |
|
:help "Indicate buffer boundaries in fringe")) |
800 |
|
|
801 |
(defvar menu-bar-showhide-fringe-menu (make-sparse-keymap "Fringe")) |
(define-key menu-bar-showhide-fringe-menu [indicate-empty-lines] |
802 |
|
(menu-bar-make-toggle toggle-indicate-empty-lines indicate-empty-lines |
803 |
|
"Empty line indicators" |
804 |
|
"Indicating of empty lines %s" |
805 |
|
"Indicate trailing empty lines in fringe")) |
806 |
|
|
807 |
(defun menu-bar-showhide-fringe-menu-customize () |
(defun menu-bar-showhide-fringe-menu-customize () |
808 |
"Show customization buffer for `fringe-mode'." |
"Show customization buffer for `fringe-mode'." |
810 |
(customize-variable 'fringe-mode)) |
(customize-variable 'fringe-mode)) |
811 |
|
|
812 |
(define-key menu-bar-showhide-fringe-menu [customize] |
(define-key menu-bar-showhide-fringe-menu [customize] |
813 |
'(menu-item "Customize" menu-bar-showhide-fringe-menu-customize |
'(menu-item "Customize fringe" menu-bar-showhide-fringe-menu-customize |
814 |
:help "Detailed customization of fringe" |
:help "Detailed customization of fringe" |
815 |
:visible (display-graphic-p))) |
:visible (display-graphic-p))) |
816 |
|
|
819 |
(interactive) |
(interactive) |
820 |
(customize-set-variable 'fringe-mode nil)) |
(customize-set-variable 'fringe-mode nil)) |
821 |
|
|
|
(define-key menu-bar-showhide-fringe-menu [showhide-fringe-ind] |
|
|
(list 'menu-item "Indicators" menu-bar-showhide-fringe-ind-menu |
|
|
:visible `(display-graphic-p) |
|
|
:help "Select fringe mode")) |
|
|
|
|
|
;; The real definition is in fringe.el. |
|
|
;; This is to prevent errors in the :radio conditions below. |
|
|
(setq fringe-mode nil) |
|
|
|
|
822 |
(define-key menu-bar-showhide-fringe-menu [default] |
(define-key menu-bar-showhide-fringe-menu [default] |
823 |
'(menu-item "Default" menu-bar-showhide-fringe-menu-customize-reset |
'(menu-item "Default" menu-bar-showhide-fringe-menu-customize-reset |
824 |
:help "Default width fringe on both left and right side" |
:help "Default width fringe on both left and right side" |