emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: buffer-face-set changes the fringe, is it a bug?


From: Gregory Heytings
Subject: Re: buffer-face-set changes the fringe, is it a bug?
Date: Thu, 9 Jul 2020 09:01:16 +0200 (CEST)
User-agent: Alpine 2.21 (NEB 202 2017-01-01)



> > It is not recommended to omit the @var{face}, as an omitted > > @var{face} leads to unexpected behavior.

Why not make that an error instead?


Another possibility, which I didn't think about earlier, would be to (implicitly) use an empty face, that is, to make omitting the face equivalent to specifying an empty face in xdisp.c:handle_single_display_spec(). This works perfectly well:

(defface empty-face '((t nil)) "")
(set-face-attribute 'fringe nil :background "red" :foreground "yellow")
(overlay-put (make-overlay (point) (point)) 'before-string (propertize "_" 
'display `(left-fringe question-mark empty-face)))
(text-scale-adjust -1)
(text-scale-adjust +1)

Gregory



reply via email to

[Prev in Thread] Current Thread [Next in Thread]