+(defvar menu-bar-showhide-fringe-ind-menu
+ (make-sparse-keymap "Buffer boundaries"))
+
+(defun menu-bar-showhide-fringe-ind-customize ()
+ "Show customization buffer for `indicate-buffer-boundaries'."
+ (interactive)
+ (customize-variable 'indicate-buffer-boundaries))
+
+(define-key menu-bar-showhide-fringe-ind-menu [customize]
+ '(menu-item "Other (Customize)"
+ menu-bar-showhide-fringe-ind-customize
+ :help "Additional choices available through Custom buffer"
+ :visible (display-graphic-p)))
+
+(defun menu-bar-showhide-fringe-ind-mixed ()
+ "Display top and bottom indicators in opposite fringes, arrows in right."
+ (interactive)
+ (customize-set-variable 'indicate-buffer-boundaries
+ '((t . right) (top . left))))
+
+(define-key menu-bar-showhide-fringe-ind-menu [mixed]
+ '(menu-item "Opposite, Arrows Right" menu-bar-showhide-fringe-ind-mixed
+ :help
+ "Show top/bottom indicators in opposite fringes, arrows in right"
+ :visible (display-graphic-p)
+ :button (:radio . (eq indicate-buffer-boundaries
+ '((t . right) (top . left))))))
+
+(defun menu-bar-showhide-fringe-ind-box ()
+ "Display top and bottom indicators in opposite fringes."
+ (interactive)
+ (customize-set-variable 'indicate-buffer-boundaries
+ '((top . left) (bottom . right))))
+
+(define-key menu-bar-showhide-fringe-ind-menu [box]
+ '(menu-item "Opposite, No Arrows" menu-bar-showhide-fringe-ind-box
+ :help "Show top/bottom indicators in opposite fringes, no arrows"
+ :visible (display-graphic-p)
+ :button (:radio . (eq indicate-buffer-boundaries
+ '((top . left) (bottom . right))))))
+
+(defun menu-bar-showhide-fringe-ind-right ()
+ "Display buffer boundaries and arrows in the right fringe."
+ (interactive)
+ (customize-set-variable 'indicate-buffer-boundaries 'right))
+
+(define-key menu-bar-showhide-fringe-ind-menu [right]
+ '(menu-item "In Right Fringe" menu-bar-showhide-fringe-ind-right
+ :help "Show buffer boundaries and arrows in right fringe"
+ :visible (display-graphic-p)
+ :button (:radio . (eq indicate-buffer-boundaries 'right))))
+
+(defun menu-bar-showhide-fringe-ind-left ()
+ "Display buffer boundaries and arrows in the left fringe."
+ (interactive)
+ (customize-set-variable 'indicate-buffer-boundaries 'left))
+
+(define-key menu-bar-showhide-fringe-ind-menu [left]
+ '(menu-item "In Left Fringe" menu-bar-showhide-fringe-ind-left
+ :help "Show buffer boundaries and arrows in left fringe"
+ :visible (display-graphic-p)
+ :button (:radio . (eq indicate-buffer-boundaries 'left))))
+
+(defun menu-bar-showhide-fringe-ind-none ()
+ "Do not display any buffer boundary indicators."
+ (interactive)
+ (customize-set-variable 'indicate-buffer-boundaries nil))
+
+(define-key menu-bar-showhide-fringe-ind-menu [none]
+ '(menu-item "No Indicators" menu-bar-showhide-fringe-ind-none
+ :help "Hide all buffer boundary indicators and arrows"
+ :visible (display-graphic-p)
+ :button (:radio . (eq indicate-buffer-boundaries nil))))
+
+(define-key menu-bar-showhide-fringe-menu [showhide-fringe-ind]
+ (list 'menu-item "Buffer Boundaries" menu-bar-showhide-fringe-ind-menu
+ :visible `(display-graphic-p)
+ :help "Indicate buffer boundaries in fringe"))
+
+(define-key menu-bar-showhide-fringe-menu [indicate-empty-lines]
+ (menu-bar-make-toggle toggle-indicate-empty-lines indicate-empty-lines
+ "Empty Line Indicators"
+ "Indicating of empty lines %s"
+ "Indicate trailing empty lines in fringe"))
+