vermiculus / sx.el

Stack Exchange for Emacs
http://stackapps.com/q/3950
709 stars 40 forks source link

Add spacing between adjacent <kbd> elements. Use custom face? #275

Closed phil-s closed 9 years ago

phil-s commented 9 years ago

When there are multiple kbd elements in sequence (e.g.: <kbd>C-x</kbd><kbd>C-s</kbd>), sx.el displays them squashed together: C-xC-s

It would be nice if it separated them visually: C-x C-s

I also thought it would be useful if kbd content was displayed in a custom face, so they can be made to stand out if desired.

Malabarba commented 9 years ago

Good point. I can get to this when I'm back from holiday.

Defining a custom face for it should be the easy part, if anyone wants to try. It's handled by a function in sx-question-print.el. Just search for kbd.

Malabarba commented 9 years ago

done and done!

phil-s commented 9 years ago

Thanks Malabarba! The box attribute is a nice touch :)

I think there's a bug in the :weight attribute. It should be semi-bold rather than semibold, unless that's changed at any point?

With the current value, the customize interface only shows the lisp form rather than the nice editing interface, due (I presume) to it not recognising the value.

Malabarba commented 9 years ago

True. My bad