+ (setq default-gutter-position val)))
+
+;;; Gutter helper functions
+
+;; called by Fset_default_gutter_position()
+(defvar default-gutter-position-changed-hook nil
+ "Function or functions to be called when the gutter position is changed.
+The value of this variable may be buffer-local.")
+
+;; called by set-gutter-element-visible-p
+(defvar gutter-element-visibility-changed-hook nil
+ "Function or functions to be called when the visibility of an
+element in the gutter changes. The value of this variable may be
+buffer-local. The gutter element symbol is passed as an argument to
+the hook, as is the visibility flag.")
+
+(defun set-gutter-element (gutter-specifier prop val &optional locale tag-set)
+ "Set GUTTER-SPECIFIER gutter element PROP to VAL in optional LOCALE.
+This is a convenience function for setting gutter elements."
+ (map-extents #'(lambda (extent arg)
+ (set-extent-property extent 'duplicable t)) val)
+ (modify-specifier-instances gutter-specifier #'plist-put (list prop val)
+ 'force nil locale tag-set))
+
+(defun remove-gutter-element (gutter-specifier prop &optional locale tag-set)
+ "Remove gutter element PROP from GUTTER-SPECIFIER in optional LOCALE.
+This is a convenience function for removing gutter elements."
+ (modify-specifier-instances gutter-specifier #'plist-remprop (list prop)
+ 'force nil locale tag-set))
+
+(defun set-gutter-element-visible-p (gutter-visible-specifier-p
+ prop &optional visible-p
+ locale tag-set)
+ "Change the visibility of gutter elements.
+Set the visibility of element PROP to VISIBLE-P for
+GUTTER-SPECIFIER-VISIBLE-P in optional LOCALE.
+This is a convenience function for hiding and showing gutter elements."
+ (modify-specifier-instances
+ gutter-visible-specifier-p #'(lambda (spec prop visible-p)
+ (if (consp spec)
+ (if visible-p
+ (if (memq prop spec) spec
+ (cons prop spec))
+ (delq prop spec))
+ (if visible-p (list prop))))
+ (list prop visible-p)
+ 'force nil locale tag-set)
+ (run-hook-with-args 'gutter-element-visibility-changed-hook prop visible-p))
+
+(defun gutter-element-visible-p (gutter-visible-specifier-p
+ prop &optional domain)
+ "Determine whether a gutter element is visible.
+Given GUTTER-VISIBLE-SPECIFIER-P and gutter element PROP, return
+non-nil if it is visible in optional DOMAIN."
+ (let ((spec (specifier-instance gutter-visible-specifier-p domain)))
+ (or (and (listp spec) (memq 'buffers-tab spec))
+ spec)))
+
+(defun init-gutter ()
+ "Initialize the gutter."
+ ;; do nothing as yet.
+ )