aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2002-06-12 13:55:59 +0000
committerStefan Monnier2002-06-12 13:55:59 +0000
commite7b6ee945adc9879838f29e082e5ec15ec69a0d3 (patch)
tree492107c2a3b53f96bf5fbcecaffff76d26d0fb8b
parent91b5390444faade507218117568ae5793b883efd (diff)
downloademacs-e7b6ee945adc9879838f29e082e5ec15ec69a0d3.tar.gz
emacs-e7b6ee945adc9879838f29e082e5ec15ec69a0d3.zip
(menu-bar-showhide-fringe-menu): Don't use `fringe-mode'
without first making sure it's bound.
-rw-r--r--lisp/menu-bar.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 8201335a4e6..8fd17c16329 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -674,7 +674,8 @@ Do the same for the keys of the same name."
674 '(menu-item "Default" menu-bar-showhide-fringe-menu-customize-reset 674 '(menu-item "Default" menu-bar-showhide-fringe-menu-customize-reset
675 :help "Default width fringe on both left and right side" 675 :help "Default width fringe on both left and right side"
676 :visible (display-graphic-p) 676 :visible (display-graphic-p)
677 :button (:radio . (eq fringe-mode nil)))) 677 :button (:radio . (or (not (boundp 'fringe-mode))
678 (eq fringe-mode nil)))))
678 679
679(defun menu-bar-showhide-fringe-menu-customize-left () 680(defun menu-bar-showhide-fringe-menu-customize-left ()
680 "Make fringes appear only on the left." 681 "Make fringes appear only on the left."
@@ -686,7 +687,8 @@ Do the same for the keys of the same name."
686 '(menu-item "On the Left" menu-bar-showhide-fringe-menu-customize-left 687 '(menu-item "On the Left" menu-bar-showhide-fringe-menu-customize-left
687 :help "Fringe only on the left side" 688 :help "Fringe only on the left side"
688 :visible (display-graphic-p) 689 :visible (display-graphic-p)
689 :button (:radio . (equal fringe-mode '(nil . 0))))) 690 :button (:radio . (and (boundp 'fringe-mode)
691 (equal fringe-mode '(nil . 0))))))
690 692
691(defun menu-bar-showhide-fringe-menu-customize-right () 693(defun menu-bar-showhide-fringe-menu-customize-right ()
692 "Make fringes appear only on the right." 694 "Make fringes appear only on the right."
@@ -698,7 +700,8 @@ Do the same for the keys of the same name."
698 '(menu-item "On the Right" menu-bar-showhide-fringe-menu-customize-right 700 '(menu-item "On the Right" menu-bar-showhide-fringe-menu-customize-right
699 :help "Fringe only on the right side" 701 :help "Fringe only on the right side"
700 :visible (display-graphic-p) 702 :visible (display-graphic-p)
701 :button (:radio . (equal fringe-mode '(0 . nil))))) 703 :button (:radio . (and (boundp 'fringe-mode)
704 (equal fringe-mode '(0 . nil))))))
702 705
703(defun menu-bar-showhide-fringe-menu-customize-disable () 706(defun menu-bar-showhide-fringe-menu-customize-disable ()
704 "Make fringes disappear." 707 "Make fringes disappear."
@@ -710,7 +713,8 @@ Do the same for the keys of the same name."
710 '(menu-item "None" menu-bar-showhide-fringe-menu-customize-disable 713 '(menu-item "None" menu-bar-showhide-fringe-menu-customize-disable
711 :help "Turn off fringe" 714 :help "Turn off fringe"
712 :visible (display-graphic-p) 715 :visible (display-graphic-p)
713 :button (:radio . (eq fringe-mode 0)))) 716 :button (:radio . (and (boundp 'fringe-mode)
717 (eq fringe-mode 0)))))
714 718
715(define-key menu-bar-showhide-menu [showhide-fringe] 719(define-key menu-bar-showhide-menu [showhide-fringe]
716 (list 'menu-item "Fringe" menu-bar-showhide-fringe-menu 720 (list 'menu-item "Fringe" menu-bar-showhide-fringe-menu