bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#56896: 29.0.50; [PATCHv3] Make the bookmark fringe icon look like a


From: Jim Porter
Subject: bug#56896: 29.0.50; [PATCHv3] Make the bookmark fringe icon look like a bookmark
Date: Sat, 13 Aug 2022 14:59:49 -0700

On 8/4/2022 9:41 PM, Jim Porter wrote:
Ok, I figured out a way to do this. I added a proxy object ('bookmark--fringe-mark') that I can dynamically set the 'fringe' property on, and then the :set function will update that and the display code will Just Work. Well, so long as a redisplay is triggered, but I think happens when you set options via Customize? It worked in my tests, anyway.

This method feels kind of hacky, but I can't think of a better way, and it's certainly more feasible than trying to find all the fringe markers manually. (Given that code can define custom bookmark handler functions, I'm not even sure that would have been possible...)

Here's a better version of this patch. Rather than a proxy object, it just sets the 'fringe' property on the defcustom, which the rest of the bookmark code can then use like a "regular" fringe bitmap (essentially, it's just an alias to a real fringe bitmap). I also added a 'fringe-custom-set-bitmap' function that anyone can use as a :set function.

This should be general enough that it could be used wherever anyone wants to allow users to use Customize to change the fringe bitmap that gets used for a particular purpose. Potentially, it could even be used for *every* use of a fringe bitmap. That would let users pick icons they like for a particular purpose based on their general description (e.g. 'right-triangle'), but they could also independently adjust the bitmaps (e.g. redefining all the fringe bitmaps to be larger for high DPI monitors). For the latter case, maybe users could download a package from ELPA to do that.

Attachment: 0001-Make-the-bookmark-fringe-icon-look-like-a-bookmark.patch
Description: Text document


reply via email to

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