Dave Pearson: kbdify.el v1.0.0

Wait 5 sec.

When I'm writing documentation in Markdown I like, wherepossible, to mark up keys with the tag. This was the reason for oneof the updates to BlogMore: I'd not doneany good default markup for and the moment I realised, I knew I hadto fix it.Now that I'm writing more on this blog, and especially aboutcoding, I'm mentioning keys pretty often (even more so givenI'm doing a lot of tidying up of my Emacs Lisppackages). The thing is though: I find having to type out and kind of tedious, and it's something I mistype from time to time. Iguess I could use some sort of HTML tag inserting tool or whatever, but Igot to thinking that it would be handy if I could point an Emacs command ata particular sequence in a buffer and have it mark up the whole thing.This resulted in a small bit of code I'm callingkbdify.el. It's pretty simple, ifpoint is sat on some text that looks like this:C-M-S-s-and I run kbdify I get this:C-M-S-s-<up>The result rendering asC-M-S-s-.I could probably take it a bit further, have it optionally work on a regionand stuff like that, but even in its current simplistic form it's going tobe loads quicker and a lot more accurate and will probably perfectly cover99% of the times I need it. There is the issue that it's not going to handlesomething like M-x some-command RET in the way I might like, but thenagain some-command isn't a key. Like, does it make more sense to have:M-x some-command RETanyway? Personally I think this:M-x some-command RETprobably makes more sense.I think I'm good for now.