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.
+(defun set-gutter-element (gutter-specifier prop value &optional locale tag-set)
+ "Set GUTTER-SPECIFIER gutter element PROP to VALUE in optional LOCALE.
This is a convenience function for setting gutter elements.
-VAL in general must be a string. If VAL is a glyph then a string will be
-created to put the glyph into."
- (let ((spec val))
- (when (glyphp val)
+VALUE in general must be a string. If VALUE is a glyph then a string
+will be created to put the glyph into."
+ (let ((spec value))
+ (when (glyphp value)
(setq spec (copy-sequence "\n"))
- (set-extent-begin-glyph (make-extent 0 1 spec) val))
+ (set-extent-begin-glyph (make-extent 0 1 spec) value))
(map-extents #'(lambda (extent arg)
(set-extent-property extent 'duplicable t)) spec)
(modify-specifier-instances gutter-specifier #'plist-put (list prop spec)
(or (and (listp spec) (memq 'buffers-tab spec))
spec)))
+(defun set-gutter-dirty-p (gutter-or-location)
+ "Make GUTTER-OR-LOCATION dirty to force redisplay updates."
+ ;; set-glyph-image will not make the gutter dirty
+ (when (or (gutter-specifier-p gutter-or-location)
+ (eq gutter-or-location 'top)
+ (eq gutter-or-location 'bottom)
+ (eq gutter-or-location 'left)
+ (eq gutter-or-location 'right))
+ (or (gutter-specifier-p gutter-or-location)
+ (setq gutter-or-location
+ (eval (intern (concat
+ (symbol-name gutter-or-location)
+ "-gutter")))))
+ (set-specifier-dirty-flag gutter-or-location)))
+
(defun make-gutter-specifier (spec-list)
"Return a new `gutter' specifier object with the given specification list.
SPEC-LIST can be a list of specifications (each of which is a cons of a